Showing results for 
Show  only  | Search instead for 
Did you mean: 

AppDynamics unable to connect with java agent


While connecting java agent with AppDynamics observed below error. please help to resolve this and connect the java agent to AppDynamics:


C:\Windows\system32> java -Xbootclasspath/a:"C:\Program Files\Java\jdk1.8.0_131\lib\tools.jar" -jar "D:\2019\Monitoring_utilities\AppServerAgent\javaagent.jar" 4875
Attaching to VM [4875]
java.util.ServiceConfigurationError: Provider could not be instantiated
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
Caused by: no providers installed


I am stuck due to this & unable to use AppDynamics for java resources. 




AppDynamics Team

Hi Rahul,


I see that you are using Dynamic Attach to connect to a live Java process. Is there any reason you can't start the process using the "-javaagent" parameter instead?


Dynamic Attach isn't really an AppDynamics feature, rather, a feature of the JVM. The JVM needs to have the correct libraries loaded in order for Dynamic Attach to be successful.


It seems that at least for this Windows system that library was not loaded and it's very tricky to get a Native library loaded once the JVM has started.


There is some information on this StackOverflow Thread:


I recommend either starting the process with the Javaagent command line parameter and if that is not possible you need the process to be started with the correct java.library.path to the attach.dll native library.


Kind Regards,



With command line parameter application get successfully started but still shows waiting for the connection. we are referring "Getting started wizard - java".

so please provide details steps if any.

Hi Rahul,


Can you upload a screenshot showing the output, please?


Kind Regards,




I noticed in the command line you didn't specify the required properties:


C:\Windows\system32> java -Xbootclasspath/a:"C:\Program Files\Java\jdk1.8.0_131\lib\tools.jar" -jar "D:\2019\Monitoring_utilities\AppServerAgent\javaagent.jar" 4875


Try something like this instead with all the values set:


java -Xbootclasspath/a:"C:/Program Files/Java/jdk1.8.0_151/lib/tools.jar" -jar C:/appdynamics/AppServerAgent- 14760 appdynamics.controller.hostName=somehost,appdynamics.controller.port=someport,appdynamics.controller.ssl.enabled=false,appdynamics.agent.accountAccessKey=somevalue,appdynamics.agent.applicationName=Doughuts,appdynamics.agent.tierName=DT1,appdynamics.agent.nodeName=DN1,appdynamics.agent.accountName=someaccount


Failing that, are there any logs in the following folder with any useful information?




Kind Regards,







I have already tried this. please check screenshot for error. also, the specified log folder is empty, no log file get generated

I have still observed the same issue, even after following the steps provided in the mail.

HI Rahul/David,


I am getting same error, I am not able to connect javaagent to my apache tomcat based application.


Please help me if found solution.




Hi Ankur,


Are you also using Dynamic Attach? Have you tried to do this using the normal method (by adding -javaagent to the startup command)?


Kind Regards,