java.lang.NoClassDefFoundError:部署到Google App Engine时无法初始化类net.sf.cglib.proxy.Enhancer

tho*_*tbk 3 java google-app-engine spring-mvc

我正在使用Spring框架和Google App Engine构建Web应用程序.在开发服务器中它可以工作但是在部署到Google App Engine服务器时我遇到了这个错误

Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer
Run Code Online (Sandbox Code Playgroud)

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
Run Code Online (Sandbox Code Playgroud)

第一个错误显示我似乎错过了cglib.jar中的net.sf.cglib.proxy.Enhancer但是当我检查它已经存在时.我无法理解第二个日志

我在classpath中使用了几个jar文件:

asm-4.0
asm-util-4.0
cglib-3.0
app engine sdk 1.7.6
spring framework 3.2.0
Run Code Online (Sandbox Code Playgroud)

有什么问题?我该如何解决?

提前致谢

小智 9

看起来Spring 3.2已经包含了cglib和asm(参见发行说明的第4.21项:http://static.springsource.org/spring-framework/docs/3.2.0.RELEASE/spring-framework-reference/html/new -in-3.2.html).他们在弹簧核心罐子里.

您应该尝试从类路径中删除asm和cglib jar,看看它是否有任何区别.