Element type "web-app" must be declared

造成错误的原因:web.xml文件中引入的web-app_2_3.dtd文件和jboss支持的不匹

 

org.xml.sax.SAXParseException: Element type "web-app" must be declared. at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1196) at org.apache.xerces.validators.common.XMLValidator.reportRecoverableXMLError(XMLValidator.java:1737) at org.apache.xerces.validators.common.XMLValidator.validateElementAndAttributes(XMLValidator.java:3552) at org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidator.java:1159) at org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanner.java:1806) at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:949) at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1081) at javax.xml.parsers.SAXParser.parse(SAXParser.java:345) at org.mortbay.xml.XmlParser.parse(XmlParser.java:125) at org.mortbay.xml.XmlParser.parse(XmlParser.java:140) at org.mortbay.jetty.servlet.WebApplicationContext.start(WebApplicationContext.java:387) at org.mortbay.j2ee.J2EEWebApplicationContext.start(J2EEWebApplicationContext.java:85) at org.jboss.jetty.JBossWebApplicationContext.start(JBossWebApplicationContext.java:89) at org.jboss.jetty.Jetty.deploy(Jetty.java:331) at org.jboss.jetty.JettyService.performDeploy(JettyService.java:242) at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:357) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:640) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613) at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549) at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177) at $Proxy7.deploy(Unknown Source) at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302) at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:476) at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:200) at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:273) at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549) at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:966) at $Proxy0.start(Unknown Source) at org.jboss.system.ServiceController.start(ServiceController.java:392) at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549) at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177) at $Proxy5.start(Unknown Source) at org.jboss.deployment.SARDeployer.start(SARDeployer.java:226) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:640) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:597) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549) at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177) at $Proxy6.deploy(Unknown Source) at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:365) at org.jboss.system.server.ServerImpl.start(ServerImpl.java:272) at org.jboss.Main.boot(Main.java:150) at org.jboss.Main$1.run(Main.java:388) at java.lang.Thread.run(Thread.java:534)

你可能感兴趣的:(java,apache,Web,jboss,sun)