cl4cds icon indicating copy to clipboard operation
cl4cds copied to clipboard

Managing duplicate classes in resulting /tmp/tomcat.cls

Open eldada opened this issue 7 years ago • 0 comments

I'm following the provided example to try and harness CDS for running multiple Tomcats.

I'm seeing file duplication errors when I get to stages 5 and 6 (running my Tomcat). Errors look like:

An error has occurred while processing class list file /tmp/tomcat.cls 6016:74.
Duplicated class javax/annotation/Resource:
javax/annotation/Resource id: 9189609 super: 1 interfaces: 41401 source: /opt/artifactory-oss-6.0.1/tomcat/webapps/artifactory/WEB-INF/lib/jsr250-api-1.0.jar

When I grep the class in /tmp/tomcat.cls file, I see multiple locations:

$ grep javax/annotation/Resource /tmp/tomcat.cls
javax/annotation/Resource id: 2047065 super: 1 interfaces: 41401 source: /opt/artifactory-oss-6.0.1/tomcat/lib/annotations-api.jar
javax/annotation/Resources id: 2047537 super: 1 interfaces: 41401 source: /opt/artifactory-oss-6.0.1/tomcat/lib/annotations-api.jar
javax/annotation/Resource id: 9189609 super: 1 interfaces: 41401 source: /opt/artifactory-oss-6.0.1/tomcat/webapps/artifactory/WEB-INF/lib/jsr250-api-1.0.jar

I'm running Artifactory 6, which uses Tomcat 8. Internally, artifactory calls catalina.sh.

Is there a way to avoid or ignore duplicate entries? There are many more of these....

eldada avatar Jun 07 '18 11:06 eldada