ClassNotFoundException thrown when attempting to attach AppDynamics agent to Nexus Repository 3

When attempting to integrate AppDynamics with Nexus Repository 3, the agent attachment may fail with the following ClassNotFoundException being thrown in the Nexus log:

Caused by: java.lang.ClassNotFoundException: not found by com.orientechnologies.orientdb-core

Nexus Repository 3 is based on the OSGI architecture and this AppDynamics documentation link states to add org.osgi.framework.bootdelegation=com.singularity.* to the OSGI container config in order for the agent to attach correctly.

Nexus Repository uses Karaf, and the relevant OSGI settings will be located within the <nexus-installdir>/etc/karaf/ file.

Within this properties file you should see an existing org.osgi.framework.bootdelegation entry where you can add com.singularity.* as follows:

org.osgi.framework.bootdelegation = \
    com.sun.*, \
    javax.transaction, \
    javax.transaction.*, \
    javax.xml.crypto, \
    javax.xml.crypto.*, \
    jdk.nashorn.*, \
    sun.*, \
    jdk.internal.reflect, \
    jdk.internal.reflect.*, \
    org.apache.karaf.jaas.boot, \
    org.apache.karaf.jaas.boot.principal, \

(Ensure that you add the comma and backward-slash (, \) after the last entry before adding com.singularity.* to the list.

A restart of Nexus Repository will be needed for the change to take effect.

This will be needed in addition to the properties AppDynamics recommends to add in the <nexus-installdir>/bin/nexus.vmoptions file for non-dynamic attachment, which will look similar to the following:

Have more questions? Submit a request


Article is closed for comments.