question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IllegalArgumentException in BridgeMethodResolver using JDK 9

See original GitHub issue

Hi 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:open
  • Created 6 years ago
  • Comments:18 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
foraxcommented, Jul 4, 2017

Expect a beta next week end 😃

As Raphael said, the full release is coordinated with the Java release (as for ASM 4 & 5).

1reaction
foraxcommented, Jul 5, 2017

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 😦 )

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found