Modify the tomcat configuration in docker, causing javaagent to report agent library failed to init instrument

A project in the Docker Tomcat container needs to modify the JavaAgent parameter, which was modified previously as follows
In the catalina.sh file, add the JAVA_OPTS parameter as follows
Export JAVA_OPTS = “$JAVA_OPTS – javaagent:/aspectjweaver – 1.8.13. Jar”
Restart the container, error, jar cannot be found
After checking, the JavaAgent parameter should be followed by a full path. Relative paths cannot be used.
 
To:
Export JAVA_OPTS = “$JAVA_OPTS – javaagent:/usr/local/tomcat/bin/aspectjweaver – 1.8.13. Jar”
 

Read More: