For Artifactory 6.x:

ARTIFACTORY: How to troubleshoot NoClassDefFound errors?

AuthorFullName__c
Venu Reddy
articleNumber
000005177
ft:sourceType
Salesforce
FirstPublishedDate
2021-12-13T07:47:47Z
lastModifiedDate
2021-12-13
VersionNumber
4

Modify JAVA_OPTIONS in $ARTIFACTORY_HOME/bin/artifactory.default file or as outlined at: Setting JVM parameters. For e.g.

export JAVA_OPTIONS="-server -Xms512m -Xmx4g -Xss256k -XX:+UseG1GC -XX:OnOutOfMemoryError=\"kill -9 %p\" -verbose:class"

Sample entries from catalina.out:
[2.139s][info][class,load] java.sql.Driver source: jrt:/java.sql

[2.139s][info][class,load] org.apache.derby.jdbc.EmbeddedDriver source: file:/Users/venur/dev/art-rel/artifactory-pro-6.23.21/tomcat/lib/derby-10.14.2.0.jar

[2.139s][info][class,load] java.sql.SQLNonTransientException source: jrt:/java.sql

[2.139s][info][class,load] java.sql.SQLFeatureNotSupportedException source: jrt:/java.sql

[2.140s][info][class,load] org.springframework.format.datetime.joda.YearMonthFormatter source: file:/Users/venur/dev/art-rel/artifactory-pro-6.23.21/tomcat/webapps/access/WEB-INF/lib/spring-context-5.1.15.RELEASE.jar

[2.140s][info][class,load] java.sql.DriverManager source: jrt:/java.sql

[2.140s][info][class,load] java.sql.SQLPermission source: jrt:/java.sql

[2.141s][info][class,load] org.apache.derby.iapi.jdbc.JDBCBoot source: file:/Users/venur/dev/art-rel/artifactory-pro-6.23.21/tomcat/lib/derby-10.14.2.0.jar

[2.141s][info][class,load] org.joda.time.MonthDay source: file:/Users/venur/dev/art-rel/artifactory-pro-6.23.21/tomcat/webapps/access/WEB-INF/lib/joda-time-2.9.7.jar

[2.141s][info][class,load] org.springframework.format.datetime.joda.MonthDayFormatter source: file:/Users/venur/dev/art-rel/artifactory-pro-6.23.21/tomcat/webapps/access/WEB-INF/lib/spring-context-5.1.15.RELEASE.jar

[2.142s][info][class,load] org.apache.derby.iapi.services.monitor.ModuleControl source: file:/Users/venur/dev/art-rel/artifactory-pro-6.23.21/tomcat/lib/derby-10.14.2.0.jar

[2.142s][info][class,load] org.springframework.format.datetime.joda.JodaDateTimeFormatAnnotationFormatterFactory source: file:/Users/venur/dev/art-rel/artifactory-pro-6.23.21/tomcat/webapps/access/WEB-INF/lib/spring-context-5.1.15.RELEASE.jar

[2.142s][info][class,load] org.apache.derby.jdbc.InternalDriver source: file:/Users/venur/dev/art-rel/artifactory-pro-6.23.21/tomcat/lib/derby-10.14.2.0.jar

[2.143s][info][class,load] org.apache.derby.iapi.services.io.TypedFormat source: file:/Users/venur/dev/art-rel/artifactory-pro-6.23.21/tomcat/lib/derby-10.14.2.0.jar
  • If nothing is being loaded from the expected location of the class, take a look at Java CLASSPATH and make sure it’s part of it.
  • If some classes are being loaded from that location, it could be that another JAR file that contains that class is missing. Check Javadocs for the class in question.

Note: Once the problem is resolved, turn off the verbose logging as it can affect the application’s performance.