java编程中struts2的搭建时,出问题 10
严重:Exceptionstartingfilterstruts2java.lang.NoSuchMethodError:com.opensymphony.xwork2....
严重: Exception starting filter struts2
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:307)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:408)
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.(ApplicationFilterConfig.java:108)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3709)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4363)
at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1116)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1214)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
at java.lang.Thread.run(Unknown Source)
2013-7-26 13:57:20 org.apache.catalina.core.StandardContext start
严重: Error filterStart
2013-7-26 13:57:20 org.apache.catalina.core.StandardContext start
严重: Context [/HellowWorld] startup failed due to previous errors
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="default" extends="struts-default">
<action name="helloword" class="Helloworld.hellowordA.HelloworldAction" method="execute">
<result name="success">/helloworld_result.jsp</result>
</action>
</package>
</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:307)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:408)
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.(ApplicationFilterConfig.java:108)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3709)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4363)
at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1116)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1214)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
at java.lang.Thread.run(Unknown Source)
2013-7-26 13:57:20 org.apache.catalina.core.StandardContext start
严重: Error filterStart
2013-7-26 13:57:20 org.apache.catalina.core.StandardContext start
严重: Context [/HellowWorld] startup failed due to previous errors
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="default" extends="struts-default">
<action name="helloword" class="Helloworld.hellowordA.HelloworldAction" method="execute">
<result name="success">/helloworld_result.jsp</result>
</action>
</package>
</struts> 展开
9个回答
2013-07-26
展开全部
你查看下你的jar包,xwork相关的包是不是有两个,如果有删掉一个重启就没问题了。
追问
只有一个、亲
追答
commons-logging-*.jar
freemarker-*.jar
ognl-*.jar
struts2-core-*.jar
xwork-core-*.jar
commons-fileupload-*.jar 这些包你都有吗,检查下。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
xwork-core-2.2.1.jar这个包是不是有2个,或者没有...
追问
只有一个、亲
只有一个、亲
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
struts跳转时没有找到你的action方法,原因是你的struts配置文件错误。你把你的struts的配置文件贴上来,我帮你看看哪里出错了
更多追问追答
追问
贴上来了
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
没有找到方法Helloworld.hellowordA.HelloworldAction这个类继承了action吗?里面有public string execute(){}这个方法吗
追问
还要继承action吗?、原来没继承都可以,好像不需要继承吧,有那个方法
追答
要的吧。。你自己封装了吗?继承你封装的也成。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询