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

objenesis incompatible with JDK9 b142 #2

Closed
ywelsch opened this issue Oct 31, 2016 · 1 comment
Closed

objenesis incompatible with JDK9 b142 #2

ywelsch opened this issue Oct 31, 2016 · 1 comment

Comments

@ywelsch
Copy link

ywelsch commented Oct 31, 2016

The latest JDK 9 build (b142) has introduced incompatible changes that break objenesis, the library used by mockito (and thus securemock) to reflectively create objects (details here: easymock/objenesis#45). We should upgrade securemock as soon as the patch for objenesis has been released.

Elasticsearch build failures: https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+5.x+java9-periodic/492/consoleFull

   > Throwable #1: org.objenesis.ObjenesisException: java.lang.NoSuchMethodException: sun.reflect.ReflectionFactory.newConstructorForSerialization(java.lang.Class, java.lang.reflect.Constructor)
   > 	at __randomizedtesting.SeedInfo.seed([A398D4E899C25102:5C46FC7B504C0076]:0)
   > 	at org.objenesis.instantiator.sun.SunReflectionFactoryHelper.getNewConstructorForSerializationMethod(SunReflectionFactoryHelper.java:94)
   > 	at org.objenesis.instantiator.sun.SunReflectionFactoryHelper.newConstructorForSerialization(SunReflectionFactoryHelper.java:41)
   > 	at org.objenesis.instantiator.sun.SunReflectionFactoryInstantiator.<init>(SunReflectionFactoryInstantiator.java:38)
   > 	at org.objenesis.strategy.StdInstantiatorStrategy.newInstantiatorOf(StdInstantiatorStrategy.java:58)
   > 	at org.objenesis.ObjenesisBase.getInstantiatorOf(ObjenesisBase.java:91)
   > 	at org.objenesis.ObjenesisBase.newInstance(ObjenesisBase.java:73)
   > 	at org.mockito.internal.creation.jmock.ClassImposterizer.createProxy(ClassImposterizer.java:152)
@ywelsch
Copy link
Author

ywelsch commented Nov 7, 2016

No need to update, this has been fixed in JDK9 b143: https://bugs.openjdk.java.net/browse/JDK-8168980

@ywelsch ywelsch closed this as completed Nov 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant