Issue Details (XML | Word | Printable)

Key: HK2-140
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Duplicate
Priority: Major Major
Assignee: jwells
Reporter: Mikhail Mazursky
Votes: 5
Watchers: 4
Operations

If you were logged in you would be able to see more operations.
hk2

Upgrade to latest ASM

Created: 09/Apr/13 11:19 AM   Updated: 06/Dec/13 11:46 AM   Resolved: 06/Dec/13 11:46 AM
Component/s: None
Affects Version/s: 2.2.0
Fix Version/s: 2.2.0

Time Tracking:
Not Specified

Issue Links:
Duplicate
 

Tags:
Participants: danlangford, jwells, Marek Potociar, Michal Gajdos and Mikhail Mazursky


 Description  « Hide

Tried to use com.jayway.restassured:rest-assured:1.8.0 in my integration tests but it uses newer ASM version (4.0) and that creates conflict with Jersey.

java.lang.IncompatibleClassChangeError: Found interface org.objectweb.asm.MethodVisitor, but class was expected
	at org.codehaus.groovy.runtime.callsite.CallSiteGenerator.genConstructor(CallSiteGenerator.java:141)
	at org.codehaus.groovy.runtime.callsite.CallSiteGenerator.genPojoMetaMethodSite(CallSiteGenerator.java:181)
	at org.codehaus.groovy.runtime.callsite.CallSiteGenerator.compilePojoMethod(CallSiteGenerator.java:227)
	at org.codehaus.groovy.reflection.CachedMethod.createPojoMetaMethodSite(CachedMethod.java:257)
	at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.createCachedMethodSite(PojoMetaMethodSite.java:159)
	at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.createPojoMetaMethodSite(PojoMetaMethodSite.java:148)
	at groovy.lang.MetaClassImpl.createPojoCallSite(MetaClassImpl.java:3082)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.createPojoSite(CallSiteArray.java:129)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallSite(CallSiteArray.java:163)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
	at com.jayway.restassured.internal.ResponseParserRegistrar.<init>(ResponseParserRegistrar.groovy:44)
	at com.jayway.restassured.RestAssured.createTestSpecification(RestAssured.java:1092)
	at com.jayway.restassured.RestAssured.given(RestAssured.java:746)

Please, upgrade to latest ASM version.



Mikhail Mazursky added a comment - 09/Apr/13 12:51 PM

Also new ASM have proper OSGi manifest so this upgrade will make it less troublesome to use Jersey under OSGi.


danlangford added a comment - 25/Jul/13 01:45 AM

in recent versions of AppEngine they are encouraging a change to JDO 3 / DataNucleus 2 which has a dependency on ASM 4.0. this is problematic because we love using jersey. we get the same error as listed above.

granted there is a work around. this error only happens if we want to use Jerseys built in package scanning. our workaround was to implement our own CustomApplication. then use the [Reflections](https://code.google.com/p/reflections/) library to easily scan the class path ourself for Types annotated with @Path or @Provider.


Michal Gajdos added a comment - 18/Oct/13 12:49 PM

Do a spike whether ASM 4.0 is backward compatible / how much effort would it take to switch. In 2.x - make sure the GF 4 works with newer ASM.


Marek Potociar added a comment - 29/Oct/13 04:07 PM

Jersey gets ASM via HK2, this needs to be decided in HK2 as such - moving the issue to HK2.


jwells added a comment - 29/Oct/13 08:18 PM

HK2 uses cglib to generate proxies for classes. cglib 3.0 is the latest cglib and it only works with asm 4.0 (it does NOT work with asm 4.2 nor asm 5.0_BETA).

In order to enable glassfish to pick this up, we will first have to integrate this change with jersey, and then do an uptake of hk2 and jersey at the same time.


jwells added a comment - 31/Oct/13 07:45 PM

Duplicate of HK2-138