java.lang.NoClassDefFoundError:部署到Google App Engine时无法初始化net.sf.cglib.proxy.Enhancer类 [英] java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer when deploying to Google App Engine
问题描述
我正在使用Spring框架和Google App Engine构建Web应用程序。在开发服务器中它可以工作,但是当部署到Google App Engine服务器时,我遇到了这个错误。
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
和
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
第一个错误表明我似乎错过了cglib.jar中的net.sf.cglib.proxy.Enhancer,但是当我检查它已经存在时。我无法理解第二个日志
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
我在classpath中使用了几个jars文件:
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
推荐答案
看起来像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 )。它们位于Spring-Core jar中。
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.
您应该尝试从classpath中移除asm和cglib jar,并查看它是否有所不同。
You should try removing the asm and cglib jars from the classpath and see if it makes any difference.
这篇关于java.lang.NoClassDefFoundError:部署到Google App Engine时无法初始化net.sf.cglib.proxy.Enhancer类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!