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: com.singularity.ee.agent.appagent.entrypoint.bciengine.FastMethodInterceptorDelegatorBoot 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/config.properties 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, \
com.singularity.*
(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:
-javaagent:/opt/appd/current/appagent/javaagent.jar
-Dappdynamics.http.proxyHost=internet.proxy.foo.com
-Dappdynamics.http.proxyPort=3128
-Dappdynamics.agent.applicationName=ContinuousIntegration-6143
-Dappdynamics.agent.tierName=Nexus-Repo-6143
-Dappdynamics.agent.nodeName=c0009269.test.cloud.foo.com
-Dappdynamics.controller.ssl.enabled=true
-Dappdynamics.controller.sslPort=443
-Dappdynamics.agent.logs.dir=/var/foo/appd/logs/6143
-Dappdynamics.agent.runtime.dir=/var/foo/appd/logs
-Dappdynamics.controller.hostName=foo1-test.saas.appdynamics.com
-Dappdynamics.controller.port=443
-Dappdynamics.agent.accountName=foo1-test
-Dappdynamics.agent.accountAccessKey=15fc52c17abc