严重: Exception starting filter struts java.lang.NoSuchMethodError: com.opensympho

用之有弗盈 2017-11-17 10:45:10
lib是这样的:


web.xml是这样配置的
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<filter>
<filter-name>struts</filter-name>
<filter-class>
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
</filter-class>

</filter>
<filter-mapping>
<filter-name>struts</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>
错误是这样的:
十一月 17, 2017 10:44:12 上午 org.apache.catalina.core.AprLifecycleListener init
信息: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files (x86)\Java\jdk1.8.0_20\bin;H:\BookStore资源\apache-tomcat-6.0.13\bin
十一月 17, 2017 10:44:12 上午 org.apache.coyote.http11.Http11Protocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
十一月 17, 2017 10:44:12 上午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 277 ms
十一月 17, 2017 10:44:12 上午 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
十一月 17, 2017 10:44:12 上午 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.13
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console. Set system property 'org.apache.logging.log4j.simplelog.StatusLogger.level' to TRACE to show Log4j2 internal initialization logging.
十一月 17, 2017 10:44:14 上午 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter struts
java.lang.NoSuchMethodError: com.opensymphony.xwork2.config.ConfigurationManager.addConfigurationProvider(Lcom/opensymphony/xwork2/config/ConfigurationProvider;)V
at org.apache.struts2.dispatcher.Dispatcher.init_DefaultProperties(Dispatcher.java:310)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:411)
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:275)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3693)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4340)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

十一月 17, 2017 10:44:14 上午 org.apache.catalina.core.StandardContext start
严重: Error filterStart
十一月 17, 2017 10:44:14 上午 org.apache.catalina.core.StandardContext start
严重: Context [/BookStore] startup failed due to previous errors
十一月 17, 2017 10:44:14 上午 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter struts2
java.lang.ClassNotFoundException: org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:249)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3693)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4340)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

十一月 17, 2017 10:44:14 上午 org.apache.catalina.core.StandardContext start
严重: Error filterStart
十一月 17, 2017 10:44:14 上午 org.apache.catalina.core.StandardContext start
严重: Context [/BookStore2] startup failed due to previous errors
十一月 17, 2017 10:44:15 上午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
信息: Parsing configuration file [struts-default.xml]
十一月 17, 2017 10:44:15 上午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
信息: Parsing configuration file [struts-plugin.xml]
十一月 17, 2017 10:44:15 上午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
信息: Parsing configuration file [struts.xml]
十一月 17, 2017 10:44:16 上午 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: contextInitialized()
十一月 17, 2017 10:44:16 上午 org.apache.catalina.core.ApplicationContext log
信息: SessionListener: contextInitialized()
十一月 17, 2017 10:44:16 上午 org.apache.coyote.http11.Http11Protocol start
信息: Starting Coyote HTTP/1.1 on http-8080
十一月 17, 2017 10:44:16 上午 org.apache.jk.common.ChannelSocket init
信息: JK: ajp13 listening on /0.0.0.0:8009
十一月 17, 2017 10:44:16 上午 org.apache.jk.server.JkMain start
信息: Jk running ID=0 time=0/16 config=null
十一月 17, 2017 10:44:16 上午 org.apache.catalina.startup.Catalina start
信息: Server startup in 4274 ms

求大神指导一下
...全文
156 5 点赞 打赏 收藏 举报
写回复
5 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
用之有弗盈 2017-11-19
又是渣渣又是新手,让各位大佬见笑了
  • 打赏
  • 举报
回复
kampoo 2017-11-17
手工添加还真不好确认那个jar包漏掉了,需要逐个确认一下。从你的jar文件清单看,struts-core-2.1.8和 2.5.13两个版本同时加入,很容易引起调用关系混乱,编译或者运行出错几乎不可避免。 你可以登录search.maven.apache.org来确认每个jar包版本的依赖项,然后手工下载加入到你的lib文件夹下。当然强烈建议: 使用maven构建工具,可以自动加载依赖的jar包链。
  • 打赏
  • 举报
回复
kampoo 2017-11-17
手工添加还真不好确认那个jar包漏掉了,需要逐个确认一下。从你的jar文件清单看,struts-core-2.1.8和 2.5.13两个版本同时加入,很容易引起调用关系混乱,编译或者运行出错几乎不可避免。 你可以登录search.maven.apache.org来确认每个jar包版本的依赖项,然后手工下载加入到你的lib文件夹下。当然强烈]建议: [color=#FF0000使用maven构建工具,可以自动加载依赖的jar包链。[/color]
  • 打赏
  • 举报
回复
yql1986 2017-11-17
包冲突了!!! 把重复的包的都给删除了,只保留一个。 工程存在多个不同版本的JAR包,如若有些方法只存在某一版本的JAR包中,保证不了这个版本的JAR包一定会被加载到JVM中 如果JVM加载了其它没有这些方法的JAR包,就会报错。
  • 打赏
  • 举报
回复
李德胜1995 2017-11-17
不用maven....一种包还导入多个版本???
  • 打赏
  • 举报
回复
相关推荐
发帖
Java EE
加入

6.7w+

社区成员

J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
申请成为版主
帖子事件
创建了帖子
2017-11-17 10:45
社区公告
暂无公告