Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does "No compatible attachment provider is available" mean

Recently I developed a java agent using byte buddy. The development in eclipse was fine, then I put the agent to production and the message:

No compatible attachment provider is available

along with some stacktraces originating from the lines

static {
  ByteBuddyAgent.install();
}
like image 479
CoronA Avatar asked Apr 11 '18 06:04

CoronA


1 Answers

After some debugging I found the problem. The message "No compatible attachment provider is not available" occurs if the agent was called with a jre instead of a jdk.

Unfortunately calling java -version does not return whether java is a jdk or a jre (the message is displaying Java runtime Environment for both).

In my case (OS:Windows) it was tricky, because newer jsdk-installations attach C:\ProgramData\Oracle\Java\javapath to the system path, which contains a jre and not a jdk. The formerly added entry %JAVA_HOME%/bin got hidden through this modification. When I removed the entry C:\ProgramData\Oracle\Java\javapath everything worked fine.

like image 195
CoronA Avatar answered Oct 25 '22 22:10

CoronA