You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using [email protected] for running integration tests for a Quarkus application. After upgrading to Quarkus version 3.16.3 I keeps receiving an exception "stacktrace added below", its mainly related to a NPE handler from QuarkusClassLoaderHandler from io.github.classgraph. Doing some investigation I've seen that you're using maven-shade-plugin to relocate some package to different names with Karate prefix, so this QuarkusClassLoaderHandler class is being added to Karate package.
Below is the exception trace I'm receiving.
Caused by: java.lang.NullPointerException: Cannot invoke "java.util.Collection.iterator()" because the return value of "karate.nonapi.io.github.classgraph.reflection.ReflectionUtils.getFieldVal(boolean, Object, String)" is null at karate.nonapi.io.github.classgraph.classloaderhandler.QuarkusClassLoaderHandler.findClasspathOrderForQuarkusClassloader(QuarkusClassLoaderHandler.java:120) at karate.nonapi.io.github.classgraph.classloaderhandler.QuarkusClassLoaderHandler.findClasspathOrder(QuarkusClassLoaderHandler.java:111) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ... 18 more
Runner.path("path").parallel(1); is to reproduce the issue.
Hi @ptrthomas thanks for your quick response. Unfortunately classifier "all" not solving the problem. I believe its because of the relocation of the packages.
Even when trying to exclude the target library io.github.classgraph from karate to explicitly add the desired version, Karate doesn't see the new version for some reason.
Hello everyone
I'm using
[email protected]
for running integration tests for a Quarkus application. After upgrading to Quarkus version 3.16.3 I keeps receiving an exception "stacktrace added below", its mainly related to a NPE handler fromQuarkusClassLoaderHandler
from io.github.classgraph. Doing some investigation I've seen that you're usingmaven-shade-plugin
to relocate some package to different names withKarate
prefix, so thisQuarkusClassLoaderHandler
class is being added toKarate
package.Below is the exception trace I'm receiving.
Caused by: java.lang.NullPointerException: Cannot invoke "java.util.Collection.iterator()" because the return value of "karate.nonapi.io.github.classgraph.reflection.ReflectionUtils.getFieldVal(boolean, Object, String)" is null at karate.nonapi.io.github.classgraph.classloaderhandler.QuarkusClassLoaderHandler.findClasspathOrderForQuarkusClassloader(QuarkusClassLoaderHandler.java:120) at karate.nonapi.io.github.classgraph.classloaderhandler.QuarkusClassLoaderHandler.findClasspathOrder(QuarkusClassLoaderHandler.java:111) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ... 18 more
Runner.path("path").parallel(1);
is to reproduce the issue.After doing some investigation I found out that this error is coming from
io.github.classgraph
and being solved here classgraph/classgraph#893 which is fixing classgraph/classgraph#891 .My suggestion is basically upgrade
io.github.classgraph
dependency version for 4.1.178 at least and I believe it will fix it.My environment is as follows.
JDK: 21
Quarkus: 3.16.3
Karate: 1.5.0
The text was updated successfully, but these errors were encountered: