IllegalArgumentException in BridgeMethodResolver using JDK 9
See original GitHub issueHi team,
We’re trying to upgrade the Gradle build to make it run on JDK 9, and we’re facing issues with our tests that use mocking. Some of them are failing with the following exception:
Caused by: java.lang.IllegalArgumentException
at net.sf.cglib.proxy.BridgeMethodResolver.resolveAll(BridgeMethodResolver.java:63)
at net.sf.cglib.proxy.Enhancer.emitMethods(Enhancer.java:1132)
at net.sf.cglib.proxy.Enhancer.generateClass(Enhancer.java:630)
at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
at net.sf.cglib.core.AbstractClassGenerator.generate(AbstractClassGenerator.java:329)
at net.sf.cglib.proxy.Enhancer.generate(Enhancer.java:492)
at net.sf.cglib.core.AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:93)
at net.sf.cglib.core.AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:91)
at net.sf.cglib.core.internal.LoadingCache$2.call(LoadingCache.java:54)
at java.util.concurrent.FutureTask.run(FutureTask.java:264)
at net.sf.cglib.core.internal.LoadingCache.createEntry(LoadingCache.java:61)
at net.sf.cglib.core.internal.LoadingCache.get(LoadingCache.java:34)
at net.sf.cglib.core.AbstractClassGenerator$ClassLoaderData.get(AbstractClassGenerator.java:116)
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:291)
at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:480)
at net.sf.cglib.proxy.Enhancer.createClass(Enhancer.java:337)
at org.spockframework.mock.runtime.ProxyBasedMockFactory$CglibMockFactory.createMock(ProxyBasedMockFactory.java:91)
at org.spockframework.mock.runtime.ProxyBasedMockFactory.create(ProxyBasedMockFactory.java:49)
at org.spockframework.mock.runtime.JavaMockFactory.create(JavaMockFactory.java:51)
at org.spockframework.mock.runtime.CompositeMockFactory.create(CompositeMockFactory.java:44)
at org.spockframework.lang.SpecInternals.createMock(SpecInternals.java:45)
at org.spockframework.lang.SpecInternals.createMockImpl(SpecInternals.java:281)
at org.spockframework.lang.SpecInternals.MockImpl(SpecInternals.java:83)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at ReproSpec.should not throw IllegalArgumentException(ReproSpec.groovy:6)
The reproduction instructions can be found in this repository: https://github.com/melix/repro-cglib-bug-jdk9
Let me know if I can help.
Issue Analytics
- State:
- Created 6 years ago
- Comments:18 (9 by maintainers)
Top Results From Across the Web
IllegalArgumentException (Java SE 9 & JDK 9 )
public class IllegalArgumentException extends RuntimeException. Thrown to indicate that a method has been passed an illegal or inappropriate argument.
Read more >cglib throws an IllegalArgumentException when enhancing ...
It seems like your are using a JDK in version 8 which includes class files in version 8. These class files are not...
Read more >JDK modules compilation fails with IllegalArgumentException
Since IDEA 2019 I am unable to build my jdk.compiler project with different errors like tihs one: "Error:java: java.lang.IllegalArgumentException: .
Read more >Error running DHIS 2 on Jetty on Ubuntu - DHIS2 Community
Hi, I am getting this when running DHIS 2 on Jetty on Ubuntu. Installed Sun Java JDK 1.6_17 with apt-get install.
Read more >[JDK-8190512] PngReader incorrectly throws ...
OpenJDK 64-Bit Server VM (build 9.0.1+11, mixed mode) ... IllegalArgumentException with message "Empty Region! ... A workaround is to use ImageReader.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
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
Expect a beta next week end 😃
As Raphael said, the full release is coordinated with the Java release (as for ASM 4 & 5).
We are close to announce that we have migrated to git (issues are not yet migrated) https://gitlab.ow2.org/asm/asm
It’s not on github but i’m sure there is a way to mirror the source from gitlab to github (i’ve just checked, it’s a feature of gitlab EE but OW2 is using the community edition 😦 )