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
Additional context
I haven't been able to get clear reproduction steps in a standalone project, but within one of our company's microservices, when updating to springdoc-openapi-ui to 1.6.3 we started seeing weird reflection errors on startup of our Spring Boot service that can be traced back to this release.
Same, I have issue with starting the Spring Boot app after updating to 1.6.3 with this error:
Caused by: io.github.toolfactory.jvm.Driver$InitializationException: Could not initiliaze DefaultDriver
at io.github.toolfactory.jvm.DefaultDriver.throwException(DefaultDriver.java:324) ~[jvm-driver-4.0.0.jar:na]
at io.github.toolfactory.jvm.DefaultDriver.<init>(DefaultDriver.java:121) ~[jvm-driver-4.0.0.jar:na]
at nonapi.io.github.classgraph.utils.ReflectionUtils.<clinit>(ReflectionUtils.java:48) ~[classgraph-4.8.117.jar:4.8.117]
... 36 common frames omitted
Caused by: io.github.toolfactory.jvm.ObjectProvider$BuildingException: Unable to build the related object of io.github.toolfactory.jvm.function.catalog.GetDeclaredFieldsMethodHandleSupplier
at io.github.toolfactory.jvm.ObjectProvider.getOrBuildObject(ObjectProvider.java:57) ~[jvm-driver-4.0.0.jar:na]
at io.github.toolfactory.jvm.DefaultDriver.initDeclaredFieldsRetriever(DefaultDriver.java:294) ~[jvm-driver-4.0.0.jar:na]
at io.github.toolfactory.jvm.DefaultDriver.<init>(DefaultDriver.java:105) ~[jvm-driver-4.0.0.jar:na]
... 37 common frames omitted
Caused by: java.lang.reflect.InvocationTargetException: null
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:na]
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490) ~[na:na]
at io.github.toolfactory.jvm.ObjectProvider.getOrBuildObject(ObjectProvider.java:51) ~[jvm-driver-4.0.0.jar:na]
... 39 common frames omitted
Caused by: java.lang.NoSuchMethodException: null
at java.base/java.lang.invoke.PrimitiveHandle.finishMethodInitialization(PrimitiveHandle.java:198) ~[na:na]
at java.base/java.lang.invoke.DirectHandle.<init>(DirectHandle.java:51) ~[na:na]
at java.base/java.lang.invoke.DirectHandle.<init>(DirectHandle.java:43) ~[na:na]
at java.base/java.lang.invoke.MethodHandles$Lookup.findSpecialImpl(MethodHandles.java:619) ~[na:na]
at java.base/java.lang.invoke.MethodHandles$Lookup.findSpecial(MethodHandles.java:587) ~[na:na]
at io.github.toolfactory.jvm.function.catalog.GetDeclaredFieldsMethodHandleSupplier$ForJava7.<init>(GetDeclaredFieldsMethodHandleSupplier.java:55) ~[jvm-driver-4.0.0.jar:na]
... 44 common frames omitted
Caused by: java.lang.NoSuchMethodError: java/lang/Class.getDeclaredFields0(Z)[Ljava/lang/reflect/Field; (loaded from jrt:/java.base by <Bootstrap Loader>) called from class java.lang.Class (loaded from jrt:/java.base by <Bootstrap Loader>).
at java.base/java.lang.invoke.PrimitiveHandle.lookupMethod(Native Method) ~[na:na]
at java.base/java.lang.invoke.PrimitiveHandle.finishMethodInitialization(PrimitiveHandle.java:196) ~[na:na]
... 49 common frames omitted
Activity
youming-lin commentedon Jan 4, 2022
Same, I have issue with starting the Spring Boot app after updating to 1.6.3 with this error:
Based on my Googling there was a similar issue reported in
classgraph: classgraph/classgraph#568I manually overrode
classgraphversion to their latest,4.8.138, and the app starts fine.TL;DR
Can Springdoc update to a good
classgraphversion ASAP?Edit:
I see there is a PR already: #1423
[-]Regression with classgraph-4.8.117[/-][+]Upgrade classgraph[/+]Only UI to depend on Classgraph. Fixes #1424.
Rely on Classgraph version of webjars-locator-core. Fixes #1424.
Managing outdated Classgraph version of webjars-locator-core. Fixes #…
FrelliBB commentedon Jan 6, 2022
Thanks for resolving this @bnasslahsen, do you have an indication of when the new version will be released?
bnasslahsen commentedon Jan 6, 2022
@FrelliBB,
Today
FrelliBB commentedon Jan 6, 2022
Perfect, thank you!
Only UI to depend on Classgraph. Fixes springdoc#1424.
Rely on Classgraph version of webjars-locator-core. Fixes springdoc#1424
Managing outdated Classgraph version of webjars-locator-core. Fixes s…