On enabling class trace, found that WebSphere is loading other classes present in the same package (com.google.common.util.concurrent) from same guava-30.0-jre.jar
Total classes present in com.google.common.util.concurrent package: 310 and Total classes loaded: 285 (as per class load trace)
Solutions tried:
- Class load order is set to Parent Last
- Have also explicitly set jar path in Generic JVM Arguments under Application servers > server1 > Process definition > Java Virtual Machine
- Also tried creating a shared library and referencing it with the web app deployed. Steps followed to create shared library are from this URL
- JAR File is also okay and decompiling without any issue
- Machine Restart
Below is a stack trace for reference:
Caused by: java.lang.NoClassDefFoundError: com/google/common/util/concurrent/SettableFuture
at com.google.common.cache.LocalCache$LoadingValueReference.<init>(LocalCache.java:3472) ~[?:?]
at com.google.common.cache.LocalCache$LoadingValueReference.<init>(LocalCache.java:3476) ~[?:?]
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2134) ~[?:?]
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2045) ~[?:?]
at com.google.common.cache.LocalCache.get(LocalCache.java:3951) ~[?:?]
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3974) ~[?:?]
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4935) ~[?:?]
at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4941) ~[?:?]
at com.google.inject.internal.Annotations$AnnotationChecker.hasAnnotations(Annotations.java:248) ~[guice-4.0.jar:?]
at com.google.inject.internal.Annotations.isBindingAnnotation(Annotations.java:314) ~[guice-4.0.jar:?]
at com.google.inject.internal.Annotations.findBindingAnnotation(Annotations.java:295) ~[guice-4.0.jar:?]
at com.google.inject.internal.ProviderMethodsModule.getKey(ProviderMethodsModule.java:280) ~[guice-4.0.jar:?]
at com.google.inject.internal.ProviderMethodsModule.createProviderMethod(ProviderMethodsModule.java:264) ~[guice-4.0.jar:?]
at com.google.inject.internal.ProviderMethodsModule.getProviderMethods(ProviderMethodsModule.java:144) ~[guice-4.0.jar:?]
at com.google.inject.internal.ProviderMethodsModule.configure(ProviderMethodsModule.java:123) ~[guice-4.0.jar:?]
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:340) ~[guice-4.0.jar:?]
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:349) ~[guice-4.0.jar:?]
at com.google.inject.spi.Elements.getElements(Elements.java:110) ~[guice-4.0.jar:?]
at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:138) ~[guice-4.0.jar:?]
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104) ~[guice-4.0.jar:?]
at com.google.inject.Guice.createInjector(Guice.java:96) ~[guice-4.0.jar:?]
at com.google.inject.Guice.createInjector(Guice.java:73) ~[guice-4.0.jar:?]
Please note everything works fine when the same web app is deployed in WebLogic, Tomcat and JBoss
you may miss the InternalFutureFailureAccess.class and this is in another jar which named failureaccess-1.0.1.jar 。 check the jar or the InternalFutureFailureAccess.class is in your classpath.