I'm currently configuring a Java app in tomcat7 to use elastic-apm-agent.
Java - elastic-apm-agent-1.6.1
Tomcat is running on a linux ec2-instance, its' currently at tomcat-7.0.94.
I've copied the agent in, added the configuration to my tomcat7.conf, and started the tomcat service, and in catalina.out i get:
2019-06-10 07:38:47.860 [localhost-startStop-1] ERROR
co.elastic.apm.agent.bci.bytebuddy.CustomElementMatchers - Cannot read implementation
version based on ProtectionDomain ProtectionDomain
(file:/var/lib/tomcat7/webapps/portal%23%23k000226/WEB-INF/lib/httpclient-4.5.2.jar )
WebappClassLoader
context: /portal##k000226
delegate: false
repositories:
/WEB-INF/classes/
----------> Parent Classloader:
java.net.URLClassLoader@2f490758
<no principals>
java.security.Permissions@31421bfe (
("java.io.FilePermission" "/var/lib/tomcat7/webapps/portal##k000226/WEB-INF/lib/httpclient-4.5.2.jar" "read")
)
If i remove the application version from the deployed war, this problem goes away. It seems like the filename is corrupted when checking for ProtectionDomain? Is there any other way I can get this to work and still retain the application version in the context path?