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

Exception in thread, NoClassDefFoundError in 1.3.1 and 1.4.1RC2 #2229

Closed
gerben86 opened this issue Dec 30, 2022 · 1 comment
Closed

Exception in thread, NoClassDefFoundError in 1.3.1 and 1.4.1RC2 #2229

gerben86 opened this issue Dec 30, 2022 · 1 comment
Labels

Comments

@gerben86
Copy link
Contributor

gerben86 commented Dec 30, 2022

We're running the Karate test on Linx (via Jenkins) with OpenJDK (and the error is about GraalVM...).
After all tests are finished we're getting this error:

Test run finished after 18014 ms
[        61 containers found      ]
[         0 containers skipped    ]
[        61 containers started    ]
[         0 containers aborted    ]
[        31 containers successful ]
[        30 containers failed     ]
[         3 tests found           ]
[         0 tests skipped         ]
[         3 tests started         ]
[         0 tests aborted         ]
[         3 tests successful      ]
[         0 tests failed          ]

Exception in thread "Thread-0" java.lang.NoClassDefFoundError: org/graalvm/collections/EconomicMapImpl$3
	at org.graalvm.collections.EconomicMapImpl.iterator(EconomicMapImpl.java:854)
	at com.oracle.truffle.polyglot.PolyglotEngineImpl.collectAliveContexts(PolyglotEngineImpl.java:1285)
	at com.oracle.truffle.polyglot.PolyglotEngineImpl.ensureClosed(PolyglotEngineImpl.java:1170)
	at com.oracle.truffle.polyglot.PolyglotEngineImpl.onVMShutdown(PolyglotEngineImpl.java:2175)
	at com.oracle.truffle.polyglot.PolyglotEngineDispatch.shutdown(PolyglotEngineDispatch.java:301)
	at org.graalvm.polyglot.Engine$EngineShutDownHook.run(Engine.java:1112)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.lang.ClassNotFoundException: org.graalvm.collections.EconomicMapImpl$3
	at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:476)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
	at java.base/java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:904)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
	... 7 more

We didn't have this error on the version 1.1.0, but now we're migrating to 1.3.1 this issues pops up.

Command we're using to run the Karate-tests:
java "-Dtest=RegressionTest" "-Dkarate.env=TST" -jar lib/junit-platform-console-standalone.jar --classpath "karate-1.0-SNAPSHOT-dependencies.jar;karate-1.0-SNAPSHOT-tests.jar" --scan-classpath "--include-package=karate" --fail-if-no-tests --details=verbose --include-classname=^.*Test$ --exclude-engine=junit-vintage

The karate-1.0-SNAPSHOT-dependencies.jar and karate-1.0-SNAPSHOT-tests.jar are created via the maven-assembly-plugin in our pom.xml.
We don't have Maven on the Jenkins-machine, so that's why we're creating to jar's in the Azure-pipeline which deploys it to our Jenkins-machine (Jenkins is only for test-ochestration, not for building/compiling).

I'm a little bit stuck in how to get rid of this error.

@ptrthomas
Copy link
Member

@gerben86 I'm sorry I don't think I can help with a custom jar packaging situation. if you can create a minimal way to repro, of course. you can try using the "fatter jar" option: #1916 (comment)

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