JDK9 NoClassDefFoundError
See original GitHub issueBuilding with jdk9-ea build 130 and Mockito 2.0.96-beta fails with,
java.lang.NoClassDefFoundError: Could not initialize class com.github.benmanes.caffeine.cache.CacheWriter$MockitoMock$1566132372
at jdk.internal.reflect.GeneratedSerializationConstructorAccessor13.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(java.base@9-ea/Constructor.java:453)
at org.objenesis.instantiator.sun.SunReflectionFactoryInstantiator.newInstance(SunReflectionFactoryInstantiator.java:45)
at org.objenesis.ObjenesisBase.newInstance(ObjenesisBase.java:73)
at org.mockito.internal.creation.instance.ObjenesisInstantiator.newInstance(ObjenesisInstantiator.java:14)
at org.mockito.internal.creation.bytebuddy.ByteBuddyMockMaker.createMock(ByteBuddyMockMaker.java:32)
at org.mockito.internal.util.MockUtil.createMock(MockUtil.java:35)
at org.mockito.internal.MockitoCore.mock(MockitoCore.java:63)
at org.mockito.Mockito.mock(Mockito.java:1560)
at org.mockito.Mockito.mock(Mockito.java:1473)
at com.github.benmanes.caffeine.cache.testing.CacheSpec$Writer$2.get(CacheSpec.java:515)
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
NoClassDefFoundError (Java SE 9 & JDK 9 )
Constructs a NoClassDefFoundError with the specified detail message. Method Summary. Methods inherited from class java.lang.Object · clone, equals, ...
Read more >Handling NoClassDefFoundError for JAXBException in Java 9
Learn how to solve the JAXBException when migrating to Java 9.
Read more >How to resolve java.lang.NoClassDefFoundError: javax/xml ...
When I run the same code with Java 9, at runtime I get errors indicating that JAXB classes can not be found. The...
Read more >NoClassDefFoundError JAXBException under JDK9 #8254
Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException at org.hibernate.boot.spi.XmlMappingBinderAccess.
Read more >javax/xml/bind/JAXBException for JDK9 - Help/Discuss
Hi, Building my project with Gradle. For Java8 build passes, for Java9 it fails with Caused by: java.lang.NoClassDefFoundError: ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think this will be decided soon, as soon as I know more, I will try to get Mockito Java 9 ready.
Yep, that’s fair and my viewpoint as well. A user decided to pitch in and see if he could migrate my project and this was a blocker.