java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer when deploying to Google App Engine

23,434

It looks like Spring 3.2 already includes cglib and asm (see item 4.21 of the release notes: http://static.springsource.org/spring-framework/docs/3.2.0.RELEASE/spring-framework-reference/html/new-in-3.2.html). They are in the spring-core jar.

You should try removing the asm and cglib jars from the classpath and see if it makes any difference.

Share:
23,434
thoitbk
Author by

thoitbk

Updated on April 29, 2020

Comments

  • thoitbk
    thoitbk almost 4 years

    I 'm building web application using Spring framework and Google App Engine. In dev server it works but when deploying to Google App Engine server I hit this error

    Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer
    

    and

    Initialization of bean failed; nested exception is java.lang.IncompatibleClassChangeError: class net.sf.cglib.core.DebuggingClassWriter has interface org.objectweb.asm.ClassVisitor as super class
    

    The first error show that I seem to miss net.sf.cglib.proxy.Enhancer in cglib.jar but when I check it's already existed. I can't understand the second log

    I use several jars file in classpath:

    asm-4.0
    asm-util-4.0
    cglib-3.0
    app engine sdk 1.7.6
    spring framework 3.2.0
    

    What is problem ? and how can I fix ?

    Thanks in advance