java.lang.IncompatibleClassChangeError: Implementing class deploying to app engine

前端 未结 8 1047
迷失自我
迷失自我 2020-11-27 18:12

I wrote a couple of REST services using Jersey 1.13 on JRE 1.6. Everything runs fine locally, but after I deploy to GAE I get this error:

****Uncaught excep         


        
相关标签:
8条回答
  • 2020-11-27 18:42

    This exception is caused by compatibility issues between asm-4.0.jar and asm-3.1.jar. With the new Version of AppEngine, asm-4.0.jar is used and it is not compatible with Jersey, which relies on asm-3.1.jar. To make Jersey still work on GAE 1.7, you have to remove the dependency on asm-4.0.jar.

    See this post : http://cloudvane.com/2012/09/23/problem-with-google-appengine-and-jersey-with-java/

    It s tested and verified, like that:

    1. add asm-3.3.1.jar to your war->lib
    2. add it to you re build path
    3. remove physically the asm-4.0.jar
    4. Project -> Properties -> Google -> AppEngine: switch Datanuclueus to v1

    That s it!

    0 讨论(0)
  • 2020-11-27 18:45

    I got this error working on a maven project using Jersey-1.11 to develop a REST service: cglib-3.0 depends on asm-4.0, and so I excluded it, leaving asm-3.0 to stand. This is because the Jersey version I am using uses asm-3.0.

    <dependency>
        <groupId>cglib</groupId>
        <artifactId>cglib</artifactId>
        <version>3.0</version>
        <exclusions>
            <exclusion>
                <artifactId>asm</artifactId>
                <groupId>org.ow2.asm</groupId>
            </exclusion>
        </exclusions>
    </dependency>
    
    0 讨论(0)
提交回复
热议问题