How to resolve “Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter” when upgrading to Artifactory 7.x?

Muhammed Kashif
2020-04-06 10:01

Artifactory 7.x is compatible with Java 11 and JDK is already bundled in the Application. In Artifactory 7.x while Artifactory is started, the JDBC driver will be copied from $JFROG_HOME/artifactory/var/bootstrap/artifactory/tomcat/lib location to $JFROG_HOME/artifactory/app/artifactory/tomcat/lib location.

Whenever we upgrade the Artifactory to 7.x, the below error can be encountered and Artifactory will not start.Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter

The above errors means that the JDBC driver for the external Database which is being used is incompatible with Java 11. To overcome this error, change the JDBC driver to the compatible one under $JFROG_HOME/artifactory/var/bootstrap/artifactory/tomcat/lib and restart the Artifactory.

If the same error is encountered after changing the compatible JDBC driver, kindly navigate to $JFROG_HOME/artifactory/app/artifactory/tomcat/lib, remove all the JDBC drivers (old ones and the new ones that are copied) and restart the Artifactory.

This issue is caused due to the incompatible JDBC driver available at $JFROG_HOME/artifactory/app/artifactory/tomcat/lib location.