struts2.3+hibernate3.6+spring3.1整合时候出现错误,各位帮忙一下啊~

2011-8-28 14:17:25 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter struts2
java.lang.NoClassDefFoundError: org/objectweb/asm/ClassVisitor
at org.apache.struts2.convention.PackageBasedActionConfigBuilder.findActions(PackageBasedActionConfigBuilder.java:376)
at org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildActionConfigs(PackageBasedActionConfigBuilder.java:334)
at org.apache.struts2.convention.ClasspathPackageProvider.loadPackages(ClasspathPackageProvider.java:53)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:215)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:380)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:424)
at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:69)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422)
at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:115)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4071)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4725)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1079)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1002)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:506)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1315)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.lang.ClassNotFoundException: org.objectweb.asm.ClassVisitor
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
... 36 more
2011-8-28 14:17:26 org.apache.catalina.core.StandardContext start
严重: Error filterStart
2011-8-28 14:17:26 org.apache.catalina.core.StandardContext start
严重: Context [/FoShanGongAn] startup failed due to previous errors
2011-8-28 14:17:26 org.apache.catalina.core.ApplicationContext log
信息: Closing Spring root WebApplicationContext
2011-8-28 14:17:26 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
严重: The web application [/FoShanGongAn] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
2011-8-28 14:17:26 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
严重: The web application [/FoShanGongAn] registered the JDBC driver [oracle.jdbc.driver.OracleDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
2011-8-28 14:17:26 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
严重: The web application [/FoShanGongAn] appears to have started a thread named [Timer-0] but has failed to stop it. This is very likely to create a memory leak.
2011-8-28 14:17:26 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
严重: The web application [/FoShanGongAn] created a ThreadLocal with key of type com.opensymphony.xwork2.inject.ContainerImpl$10 and a value of type java.lang.Object[] but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
2011-8-28 14:17:26 org.apache.catalina.loader.WebappClassLoader clearThreadLocalMap
严重: The web application [/FoShanGongAn] created a ThreadLocal with key of type com.opensymphony.xwork2.inject.ContainerImpl$10 and a value of type java.lang.Object[] but failed to remove it when the web application was stopped. This is very likely to create a memory leak.
2011-8-28 14:17:27 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory ROOT
2011-8-28 14:17:27 org.apache.coyote.http11.Http11Protocol start
信息: Starting Coyote HTTP/1.1 on http-8080
2011-8-28 14:17:28 org.apache.jk.common.ChannelSocket init
信息: JK: ajp13 listening on /0.0.0.0:8009
2011-8-28 14:17:28 org.apache.jk.server.JkMain start
信息: Jk running ID=0 time=0/30 config=null
2011-8-28 14:17:28 org.apache.catalina.startup.Catalina start
信息: Server startup in 11137 ms

5个回答

你这个根本没有asm的包啊 缺少这个包。

asm的包不兼容 你看一下asm的jar包是不是有两个
删除asm-2.2.3.jar 然后重启。

缺少asm*.jar或者冲突导致的,试试下面的方式,其中asm*.jar有多个

1.去掉类路径上的关于Hibernate的asm*.jar和cglib*.jar
2.加入Spring中的asm*.jar和cglib*.jar

反正原因就是你的包冲突

SpringAOP Liberaries里的asm2.2.3.jar和Hiberate中的生成代理用的asm.jar冲突

把asm2.2.3.jar , asm-util-2.2.3.jar, asm-commons-2.2.3.jar 这三个包删除就可以了。。。

你试试。

估计hibernate3.6已经把这个包并入自己的包了。要不我把我的包发给你吧。

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!