Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 2.2.0
    • Fix Version/s: 2.2.0
    • Component/s: None
    • Labels:
      None

      Description

      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.

        Issue Links

          Activity

          Hide
          Mikhail Mazursky added a comment -

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

          Show
          Mikhail Mazursky added a comment - Also new ASM have proper OSGi manifest so this upgrade will make it less troublesome to use Jersey under OSGi.
          Hide
          danlangford added a comment -

          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.

          Show
          danlangford added a comment - 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.
          Hide
          Michal Gajdos added a comment -

          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.

          Show
          Michal Gajdos added a comment - 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.
          Hide
          Marek Potociar added a comment -

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

          Show
          Marek Potociar added a comment - Jersey gets ASM via HK2, this needs to be decided in HK2 as such - moving the issue to HK2.
          Hide
          jwells added a comment -

          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.

          Show
          jwells added a comment - 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.
          Hide
          jwells added a comment -

          Duplicate of HK2-138

          Show
          jwells added a comment - Duplicate of HK2-138

            People

            • Assignee:
              jwells
              Reporter:
              Mikhail Mazursky
            • Votes:
              5 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: