Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/384.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 升级到Struts 2.3.15-约定插件会导致启动时崩溃_Java_Configuration_Struts2_Dtd_Struts2 Convention Plugin_Xml - Fatal编程技术网

Java 升级到Struts 2.3.15-约定插件会导致启动时崩溃

Java 升级到Struts 2.3.15-约定插件会导致启动时崩溃,java,configuration,struts2,dtd,struts2-convention-plugin,xml,Java,Configuration,Struts2,Dtd,Struts2 Convention Plugin,Xml,我正在将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

我正在将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 struts PUBLIC
  "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
  "http://struts.apache.org/dtds/struts-2.3.dtd">


更新了struts.xml——恐怕我还是收到了同样的信息。所有struts库和xwork core都有2.3.15后缀,加上我在之前的2.2.1安装中使用的库的2.3.15版本。我已经试着翻阅发行说明,以防出现突破性的变化,但我没有找到任何排序(除非我错过了)。出于某种原因,我有Struts-2.3.dtd文件的独立副本,这些文件是我的web应用程序中Struts-2.0.dtd的副本。我模模糊糊地记得这是对一些早期问题的修复,但我不记得细节了。不管怎样,工作已经安排好了,谢谢你的帮助