Skip to content

Can't attach to jre/jdk 9 using ByteBuddy #374

@GotoFinal

Description

@GotoFinal

ByteBuddy agent fails for jdk/jre 9.

java version "9.0.1"
Java(TM) SE Runtime Environment (build 9.0.1+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)

For jdk i got:

Exception in thread "main" java.lang.IllegalStateException: Could not self-attach to current VM using external process
	at net.bytebuddy.agent.ByteBuddyAgent.installExternal(ByteBuddyAgent.java:433)
	at net.bytebuddy.agent.ByteBuddyAgent.install(ByteBuddyAgent.java:371)
	at net.bytebuddy.agent.ByteBuddyAgent.install(ByteBuddyAgent.java:352)
	at net.bytebuddy.agent.ByteBuddyAgent.install(ByteBuddyAgent.java:320)
	at net.bytebuddy.agent.ByteBuddyAgent.install(ByteBuddyAgent.java:306)

I tried to debug that code, and all I can see is that process return 1, but I don't see anything in output/error stream of process. But if throw is skipped (via debugger) it still does fail (returns null instead of instrumentation)
For sure it does see my java_home, as I changed command to -version and it does work fine.

For JRE I got:

Exception in thread "main" java.lang.IllegalStateException: No compatible attachment provider is not available
	at net.bytebuddy.agent.ByteBuddyAgent.install(ByteBuddyAgent.java:367)
	at net.bytebuddy.agent.ByteBuddyAgent.install(ByteBuddyAgent.java:352)
	at net.bytebuddy.agent.ByteBuddyAgent.install(ByteBuddyAgent.java:320)
	at net.bytebuddy.agent.ByteBuddyAgent.install(ByteBuddyAgent.java:306)

I used 1.7.9 version of ByteBuddy agent

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions