升级到Struts2.3.15-Convention插件会导致启动时崩溃



我正在将Struts2安装升级到2.3.15。添加struts2-convention-plugin-2.3.15.jar后,我的web应用程序无法启动。例外情况清单的相关部分是:;

Caused by: Attribute "order" must be declared for element type "struts". - jar:file:/H:/apache-tomcat-7.0.20/wtpwebapps/FaultmateGenesis-Server/WEB-INF/lib/struts2-convention-plugin-2.3.15.jar!/struts-plugin.xml:29:20
at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:119)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:1017)
... 16 more

有人知道发生了什么事吗?

编辑:

完整的轨迹为;

SEVERE: Exception sending context initialized event to listener instance of class org.apache.struts2.dispatcher.ng.listener.StrutsListener
Unable to load configuration. - jar:file:/H:/apache-tomcat-7.0.20/wtpwebapps/FaultmateGenesis-Server/WEB-INF/lib/struts2-convention-plugin-2.3.15.jar!/struts-plugin.xml:29:20
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:502)
at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
at org.apache.struts2.dispatcher.ng.listener.StrutsListener.contextInitialized(StrutsListener.java:46)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4701)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5204)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5199)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
 Caused by: Unable to load configuration. - jar:file:/H:/apache-tomcat-7.0.20/wtpwebapps/FaultmateGenesis-Server/WEB-INF/lib/struts2-convention-plugin-2.3.15.jar!/struts-plugin.xml:29:20
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:446)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:490)
... 10 more
Caused by: Unable to load jar:file:/H:/apache-tomcat-7.0.20/wtpwebapps/FaultmateGenesis-Server/WEB-INF/lib/struts2-convention-plugin-2.3.15.jar!/struts-plugin.xml - jar:file:/H:/apache-tomcat-7.0.20/wtpwebapps/FaultmateGenesis-Server/WEB-INF/lib/struts2-convention-plugin-2.3.15.jar!/struts-plugin.xml:29:20
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:1022)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:165)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:132)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:225)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
... 12 more
 Caused by: Attribute "order" must be declared for element type "struts". - jar:file:/H:/apache-tomcat-7.0.20/wtpwebapps/FaultmateGenesis-Server/WEB-INF/lib/struts2-convention-plugin-2.3.15.jar!/struts-plugin.xml:29:20
at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:119)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:1017)
... 16 more
 Caused by: org.xml.sax.SAXParseException; systemId: jar:file:/H:/apache-tomcat-7.0.20/wtpwebapps/FaultmateGenesis-Server/WEB-INF/lib/struts2-convention-plugin-2.3.15.jar!/struts-plugin.xml; lineNumber: 29; columnNumber: 20; Attribute "order" must be declared for element type "struts".
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.addDTDDefaultAttrsAndValidate(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:117)
... 17 more

您应该在struts.xml 中使用正确的doctype

<!DOCTYPE struts PUBLIC
  "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
  "http://struts.apache.org/dtds/struts-2.3.dtd">

相关内容

  • 没有找到相关文章

最新更新