Struts错误NoSuchMethodError: com.opensymphony.xwork2

严重: Exception starting filter struts2
java.lang.NoSuchMethodError: com.opensymphony.xwork2.util.finder.UrlSet.includeClassesUrl(Lcom/opensymphony/xwork2/util/finder/ClassLoaderInterface;)Lcom/opensymphony/xwork2/util/finder/UrlSet;
 at org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildUrlSet(PackageBasedActionConfigBuilder.java:417)
 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:260)
 at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
 at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:429)
 at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:473)
 at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
 at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51)
 at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:273)
 at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:254)
 at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:372)
 at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:98)
 at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4562)
 at org.apache.catalina.core.StandardContext$2.call(StandardContext.java:5240)
 at org.apache.catalina.core.StandardContext$2.call(StandardContext.java:5235)
 at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
 at java.util.concurrent.FutureTask.run(Unknown Source)
 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
 at java.lang.Thread.run(Unknown Source)
2013-8-1 16:22:34 org.apache.catalina.core.StandardContext startInternal

解决方法:

我使用的jar包:struts2-core-2.3.12.jar + struts2-convention-plugin-2.2.16.jar + xwork-core-2.3.12.jar。解决方法是把struts2-convention-plugin-2.2.16.jar换成struts2-convention-plugin-2.3.12.jar就可以。版本号要与struts-core、xwork-core版本号一致

时间: 2024-10-20 07:10:21

Struts错误NoSuchMethodError: com.opensymphony.xwork2的相关文章

java.lang.NoClassDefFoundError: com/opensymphony/xwork2/util/TextUtils

java.lang.NoSuchMethodError: com.opensymphony.xwork2.ActionContext.get(Ljava/lang/String;)Ljava/lang /Object;”异常,导致该异常的是jsonplugin的jar包与Struts2的jar包不匹配引起的. jsonplugin-0.33.jar     Struts 2 JSON Plugin 0.33 匹配 Struts 2.1.x Compatiblejsonplugin-0.32.ja

com.opensymphony.xwork2.config.ConfigurationManager.addConfigurationProvider

一月 31, 2016 5:06:31 下午 org.apache.catalina.core.StandardContext filterStart 严重: Exception starting filter Struts2 java.lang.NoSuchMethodError: com.opensymphony.xwork2.config.ConfigurationManager.addConfigurationProvider(Lcom/opensymphony/xwork2/confi

struts2启动报错com/opensymphony/xwork2/spring/SpringObjectFactory.java:220:-1

好久没有搞struts2,今天配置strut2.2.1,启动时遇到个小问题.记录下. tomcat启动报错: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 Class: com.opensymphony.xwork2.spring.SpringObjectFactory File: SpringObjectFactory.java Method: getClassInstance Line: 220

com.opensymphony.xwork2.util.logging.jdk.JdkLogger info 错误

在启动Tomcat时出现了如下的错误: 警告: Could not create JarEntryRevision for [jar:file:/E:/Programming/apache-tomcat-6.0.26/webapps/Struts2/WEB-INF/lib/struts2-core-2.2.1.jar] ... 2010-9-24 11:16:02 com.opensymphony.xwork2.util.logging.jdk.JdkLogger info 信息: Parsin

Caused by: Unable to load configuration. - action - file:/C:/apache-tomcat-7.0.70/webapps/Structs/WEB-INF/classes/struts.xml:7:72 at com.opensymphony.xwork2.config.ConfigurationManager.getConfigurati

Unable to load configuration. - action - file:/C:/apache-tomcat-7.0.70/webapps/Structs/WEB-INF/classes/struts.xml:7:72 at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:431) at org.apache.struts2.dispatcher.ng.InitOperations.initDispat

Caused by: Unable to load bean: type:com.opensymphony.xwork2.ObjectFactory class:org.apache.struts2.

1.错误描述 严重: Dispatcher initialization failed Unable to load configuration. - bean - jar:file:/home/youhaidong/workspaces/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/SSH/WEB-INF/lib/struts2-spring-plugin-2.3.24.1.jar!/struts-plugin.x

struts2.1.6出现at com.opensymphony.xwork2.util.FileManager$FileRevision.needsReloading

struts2中的配置文件中只要添加以下配置,那么以后修改配置文件不用重启tomcat的方法.于是自己手动试了试,没想到这一试竟然试出问题来 要添加的代码: view plaincopy to clipboardprint? <constant name="struts.devMode" value="true" /> Xhtml代码 <constant name="struts.devMode" value="tru

struts2出现at com.opensymphony.xwork2.util.FileManager$FileRevision.needsReloading(FileManager.java:20 .

今天看视频看到struts2中的配置文件中只要添加以下配置,那么以后修改配置文件不用重启tomcat的方法.于是自己手动试了试,没想到这一试竟然试出问题来 要添加的代码: [xhtml] view plaincopyprint? <constant name="struts.devMode" value="true" /> <constant name="struts.devMode" value="true"

com.opensymphony.xwork2.ognl.OgnlValueStack - Error setting expression &#39;customer.applyRate&#39; with value &#39;[Ljava.lang.String;@7d3fae2c&#39;

出错的3个最可能的原因:我是第二种错误 1.action配置错误 <action name="doCreateMeetingInfo" class="meetingInfoAction" method="doCreateMeetingInfo"> <result type="json"> <param name="includeProperties">result<