Email:roose2008@gmail.com QQ:79212131
使用IDE是netbeans6.1, tomcat6.0 struts-2.0.11.2最新版的。 部署不成功,部署不成功部署不成功部署不成功部署不成功部署不成功部署不成功部署不成功部署不成功 这是我的部署文件: web.xml文件:
struts.xml代码:
StrutsAction.java代码
-----------------------------------------------部署错误:--------------------------------------------------------------- 部署错误: 尚未部署该模块。 有关详细信息,请参见服务器日志。 at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:166) at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:104) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) at sun.reflect.GeneratedMethodAccessor62.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:357) at org.apache.tools.ant.Target.performTasks(Target.java:385) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329) at org.apache.tools.ant.Project.executeTarget(Project.java:1298) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1181) at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:277) at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:460) at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:151) Caused by: 尚未部署该模块。 at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:160) ... 16 more 生成失败(总时间:9 秒) -------------------------------------------------------------------------------------------------------------- --------------------------------------------tomcat错误信息------------------------------------------------ sing CATALINA_BASE: E:\Websever Using CATALINA_HOME: D:\Apache Tomcat 6.0.16 Using CATALINA_TMPDIR: E:\Websever\temp Using JRE_HOME: D:\jdk1.6.0_07 2008-10-15 22:53:30 org.apache.catalina.core.AprLifecycleListener init 信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\jdk1.6.0_07\bin;.;C:\WINDOWS.0\Sun\Java\bin;C:\WINDOWS.0\system32;C:\WINDOWS.0;D:\oracle\product\11.1.0\db_1\bin;C:\WINDOWS.0\system32;C:\WINDOWS.0;C:\WINDOWS.0\System32\Wbem;C:\Program Files\Common Files\Adobe\AGL;D:\jdk1.6.0_07\bin;D:\MySQL Server 5.1\bin;D:\StormII\Codec;D:\StormII 2008-10-15 22:53:30 org.apache.coyote.http11.Http11Protocol init 信息: Initializing Coyote HTTP/1.1 on http-8080 2008-10-15 22:53:30 org.apache.catalina.startup.Catalina load 信息: Initialization processed in 1278 ms 2008-10-15 22:53:30 org.apache.catalina.core.StandardService start 信息: Starting service Catalina 2008-10-15 22:53:30 org.apache.catalina.core.StandardEngine start 信息: Starting Servlet Engine: Apache Tomcat/6.0.16 2008-10-15 22:53:31 org.apache.catalina.core.StandardContext addApplicationListener 信息: The listener "com.bjsxt.shopping.util.listener.LoggedUserCounter" is already configured for this context. The duplicate definition has been ignored. IPFilter init authfilter init 2008-10-15 22:53:32 org.apache.struts.tiles.TilesPlugin initDefinitionsFactory 信息: Tiles definition factory loaded for module ''. 2008-10-15 22:53:32 org.apache.struts.validator.ValidatorPlugIn initResources 信息: Loading validation rules file from '/WEB-INF/validator-rules.xml' 2008-10-15 22:53:32 org.apache.struts.validator.ValidatorPlugIn initResources 信息: Loading validation rules file from '/WEB-INF/validation.xml' 2008-10-15 22:53:33 org.apache.tomcat.util.digester.Digester fatalError 严重: Parse Fatal Error at line 22 column 1: Premature end of file. org.xml.sax.SAXParseException: Premature end of file. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195) at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:174) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:388) at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1411) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1058) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522) at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1644) at org.apache.catalina.startup.ContextConfig.applicationWebConfig(ContextConfig.java:369) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:1062) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:261) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4252) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1147) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:578) 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:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) 2008-10-15 22:53:33 org.apache.catalina.startup.ContextConfig applicationWebConfig 严重: Parse error in application web.xml file at jndi:/localhost/Struts2.x/WEB-INF/web.xml org.xml.sax.SAXParseException: Premature end of file. at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1231) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522) at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1644) at org.apache.catalina.startup.ContextConfig.applicationWebConfig(ContextConfig.java:369) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:1062) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:261) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4252) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1147) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:578) 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:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) 2008-10-15 22:53:33 org.apache.catalina.startup.ContextConfig applicationWebConfig 严重: Occurred at line 22 column 1 2008-10-15 22:53:33 org.apache.catalina.startup.ContextConfig start 严重: Marking this application unavailable due to previous error(s) 2008-10-15 22:53:33 org.apache.catalina.core.StandardContext start 严重: Error getConfigured 2008-10-15 22:53:33 org.apache.catalina.core.StandardContext start 严重: Context [/Struts2.x] startup failed due to previous errors 2008-10-15 22:53:33 org.apache.coyote.http11.Http11Protocol start 信息: Starting Coyote HTTP/1.1 on http-8080 2008-10-15 22:53:34 org.apache.jk.common.ChannelSocket init 信息: JK: ajp13 listening on /0.0.0.0:8009 2008-10-15 22:53:34 org.apache.jk.server.JkMain start 信息: Jk running ID=0 time=0/109 config=null 2008-10-15 22:53:34 org.apache.catalina.startup.Catalina start 信息: Server startup in 3741 ms 2008-10-15 22:53:34 org.apache.catalina.core.ApplicationContext log 信息: Manager: init: Associated with Deployer 'Catalina:type=Deployer,host=localhost' 2008-10-15 22:53:34 org.apache.catalina.core.ApplicationContext log 信息: Manager: init: Global resources are available 2008-10-15 22:53:34 org.apache.catalina.core.ApplicationContext log 信息: Manager: list: Listing contexts for virtual host 'localhost' 2008-10-15 22:53:34 org.apache.catalina.core.ApplicationContext log 信息: Manager: list: Listing contexts for virtual host 'localhost' 2008-10-15 22:53:34 org.apache.catalina.core.ApplicationContext log 信息: Manager: stop: Stopping web application at '/Struts2.x' 2008-10-15 22:53:34 org.apache.catalina.core.StandardContext stop 信息: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/Struts2.x] has not been started 2008-10-15 22:53:34 org.apache.catalina.core.ApplicationContext log 信息: Manager: start: Starting web application at '/Struts2.x' 2008-10-15 22:53:34 org.apache.tomcat.util.digester.Digester fatalError 严重: Parse Fatal Error at line 22 column 1: Premature end of file. org.xml.sax.SAXParseException: Premature end of file. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195) at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:174) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:388) at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1411) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1058) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522) at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1644) at org.apache.catalina.startup.ContextConfig.applicationWebConfig(ContextConfig.java:369) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:1062) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:261) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4252) at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1244) at org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:374) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619) 2008-10-15 22:53:34 org.apache.catalina.startup.ContextConfig applicationWebConfig 严重: Parse error in application web.xml file at jndi:/localhost/Struts2.x/WEB-INF/web.xml org.xml.sax.SAXParseException: Premature end of file. at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1231) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522) at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1644) at org.apache.catalina.startup.ContextConfig.applicationWebConfig(ContextConfig.java:369) at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:1062) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:261) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4252) at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1244) at org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:374) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619) 2008-10-15 22:53:34 org.apache.catalina.startup.ContextConfig applicationWebConfig 严重: Occurred at line 22 column 1 2008-10-15 22:53:34 org.apache.catalina.startup.ContextConfig start 严重: Marking this application unavailable due to previous error(s) 2008-10-15 22:53:34 org.apache.catalina.core.StandardContext start 严重: Error getConfigured 2008-10-15 22:53:34 org.apache.catalina.core.StandardContext start 严重: Context [/Struts2.x] startup failed due to previous errors ------------------------------------------------------------------------------------------------------------------ 部署了一天,也没部署出一个结果来。 希望那为高手能教教小生,必将很感谢! 最好能帮我部署一个实例项目。 一刚学struts2就不能入门,部署出第一个项目出来。简直太打击人了。都想放弃了。
posted on 2008-10-15 22:38 草包书生 阅读(5600) 评论(7) 编辑 收藏
信息: Loading validation rules file from '/WEB-INF/validation.xml'2008-10-15 22:53:33 org.apache.tomcat.util.digester.Digester fatalError严重: Parse Fatal Error at line 22 column 1: Premature end of file.应该是某个xml文件格式有错... 回复 更多评论
晕死,错误很明显啊。严重: Parse error in application web.xml file at jndi:/localhost/Struts2.x/WEB-INF/web.xml这个错误在多处都有,肯定是WEB.XML配置有问题。 回复 更多评论
不要用最新的struts2的架包,有点不稳定啊, 我有一次就是用了最新的struts2的架包,出现了类似的情况。 回复 更多评论
问题已解决!基础毛病,类还没被编译就把它添加到了struts.xml中。 另一个问题:在没有用到struts2所有jar包的时候不要把所有jar包全部放到我们的lib下,要不然很有可能出错! 回复 更多评论
谢谢你! 回复 更多评论
<package name="com.struts.Action" extends="struts-default"> <action name="login" class="com.struts.Action.StrutsAction"> 回复 更多评论