Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for jvm 17 thread mechanism #25

Open
shakhar opened this issue Sep 3, 2023 · 0 comments
Open

Add support for jvm 17 thread mechanism #25

shakhar opened this issue Sep 3, 2023 · 0 comments
Assignees
Labels

Comments

@shakhar
Copy link

shakhar commented Sep 3, 2023

I tried to use junit4git with junit5 on my jvm 17 project and it seems the the classpath context of my application doesn't pass to the agent's thread and I am getting many of the following error:

ERROR org.walkmod.junit4git.core.bytecode.AgentClassTransformer - Error instrumenting ${myAppClass}
javassist.NotFoundException: ${myAppClass}
	at javassist.ClassPool.get(ClassPool.java:430)
	at org.walkmod.junit4git.javassist.JavassistUtils.instrumentClassWithStaticStmt(JavassistUtils.java:72)
	at org.walkmod.junit4git.core.bytecode.AgentClassTransformer.instrumentClass(AgentClassTransformer.java:95)
	at org.walkmod.junit4git.core.bytecode.AgentClassTransformer.transform(AgentClassTransformer.java:78)
	at java.instrument/java.lang.instrument.ClassFileTransformer.transform(ClassFileTransformer.java:244)
	at java.instrument/sun.instrument.TransformerManager.transform(TransformerManager.java:188)
	at java.instrument/sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:541)
	at java.base/java.lang.ClassLoader.defineClass1(Native Method)
	at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1012)
	at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
	at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:862)
	at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:760)
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:681)
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:639)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
@rpau rpau added the bug label Nov 30, 2023
@rpau rpau self-assigned this Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants