| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 2399 人关注过本帖
标题:MyEclipse中部署Struts Web项目问题?
只看楼主 加入收藏
随风心境
Rank: 1
等 级:新手上路
帖 子:9
专家分:0
注 册:2009-9-24
结帖率:100%
收藏
已结贴  问题点数:20 回复次数:4 
MyEclipse中部署Struts Web项目问题?
我现在正在学Struts2,按照教程做了个例子,但是部署时出现了问题。
  上午web项目开始时可以运行,但下午到机房的时候开机运行时却出现了问题,但是web项目没有错误
   烦人的是晚上,它又能运行了,本人甚是恼火!!!
   请高手看看哪里出了问题,不胜感激。
   如下是部署时的信息:

我仔细观察了下,只要联网就可以运行,断网后就不行能运行了!!

2010-4-2 19:11:21 org.apache.catalina.core.AprLifecycleListener init
信息: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\MyEclipse\binary\com.sun.java.jdk.win32.x86_1.6.0.013\bin;D:\Tomcat 6.0\bin
2010-4-2 19:11:21 org.apache.coyote.http11.Http11Protocol init
信息: Initializing Coyote HTTP/1.1 on http-8080
2010-4-2 19:11:21 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 426 ms
2010-4-2 19:11:21 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2010-4-2 19:11:21 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.7
2010-4-2 19:11:21 org.apache.catalina.core.StandardHost start
信息: XML validation disabled
2010-4-2 19:11:22 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider register
信息: Parsing configuration file [struts-default.xml]
2010-4-2 19:11:22 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider register
信息: Parsing configuration file [struts-plugin.xml]
2010-4-2 19:11:22 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter struts2
Class:
File: PlainSocketImpl.java
Method: connect
Line: 177 - java/net/PlainSocketImpl.java:177:-1
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:835)
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:131)
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:100)
    at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:130)
    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
    at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:395)
    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:452)
    at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:201)
    at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:274)
    at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:396)
    at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:107)
    at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3693)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
    at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)
    at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    at org.apache.catalina.core.StandardService.start(StandardService.java:451)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
    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)
Caused by: struts. - Class:
File: PlainSocketImpl.java
Method: connect
Line: 177 - java/net/PlainSocketImpl.java:177:-1
    at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:123)
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:830)
    ... 34 more
Caused by: struts.
    at (PlainSocketImpl.java:177)
    at (SocksSocketImpl.java:366)
    at (Socket.java:519)
    at (Socket.java:469)
    at (NetworkClient.java:163)
    at (HttpClient.java:394)
    at (HttpClient.java:529)
    at (HttpClient.java:233)
    at (HttpClient.java:306)
    at (HttpClient.java:323)
    at (HttpURLConnection.java:852)
    at (HttpURLConnection.java:793)
    at (HttpURLConnection.java:718)
    at (HttpURLConnection.java:1041)
    at com.(XMLEntityManager.java:677)
    at com.(XMLEntityManager.java:1315)
    at com.(XMLEntityManager.java:1282)
    at com.(XMLDTDScannerImpl.java:283)
    at com.(XMLDocumentScannerImpl.java:1192)
    at com.(XMLDocumentScannerImpl.java:1089)
    at com.(XMLDocumentScannerImpl.java:1002)
    at com.(XMLDocumentScannerImpl.java:648)
    at com.(XMLNSDocumentScannerImpl.java:140)
    at com.(XMLDocumentFragmentScannerImpl.java:510)
    at com.(XML11Configuration.java:807)
    at com.(XML11Configuration.java:737)
    at com.(XMLParser.java:107)
    at com.(AbstractSAXParser.java:1205)
    at com.(SAXParserImpl.java:522)
    at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
    at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:121)
    ... 35 more
2010-4-2 19:11:22 org.apache.catalina.core.StandardContext start
严重: Error filterStart
2010-4-2 19:11:22 org.apache.catalina.core.StandardContext start
严重: Context [/Struts2] startup failed due to previous errors
2010-4-2 19:11:23 org.apache.coyote.http11.Http11Protocol start
信息: Starting Coyote HTTP/1.1 on http-8080
2010-4-2 19:11:23 org.apache. init
信息: JK: ajp13 listening on /0.0.0.0:8009
2010-4-2 19:11:23 org.apache.jk.server.JkMain start
信息: Jk running ID=0 time=0/30  config=null
2010-4-2 19:11:23 org.apache.catalina.startup.Catalina start
信息: Server startup in 1373 ms
2010-4-2 19:11:34 org.apache.catalina.core.ApplicationContext log
信息: HTMLManager: init: Associated with Deployer 'Catalina:type=Deployer,host=localhost'
2010-4-2 19:11:34 org.apache.catalina.core.ApplicationContext log
信息: HTMLManager: init: Global resources are available
2010-4-2 19:11:34 org.apache.catalina.core.ApplicationContext log
信息: HTMLManager: install: Installing web application at 'D:\Tomcat 6.0\webapps\Struts2' from 'null'
2010-4-2 19:11:34 org.apache.catalina.core.ApplicationContext log
信息: HTMLManager: list: Listing contexts for virtual host 'localhost'
2010-4-2 19:11:54 org.apache.catalina.core.ApplicationContext log
信息: HTMLManager: start: Starting web application at '/Struts2'
2010-4-2 19:11:55 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider register
信息: Parsing configuration file [struts-default.xml]
2010-4-2 19:11:55 com.opensymphony.xwork2.config.providers.XmlConfigurationProvider register
信息: Parsing configuration file [struts-plugin.xml]
2010-4-2 19:11:55 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter struts2
Class:
File: PlainSocketImpl.java
Method: connect
Line: 177 - java/net/PlainSocketImpl.java:177:-1
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:835)
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:131)
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:100)
    at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:130)
    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
    at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:395)
    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:452)
    at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:201)
    at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:274)
    at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:396)
    at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:107)
    at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3693)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
    at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1177)
    at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:542)
    at org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:105)
    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:228)
    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:105)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:212)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)
    at org.apache.tomcat.(JIoEndpoint.java:445)
    at java.lang.Thread.run(Thread.java:619)
Caused by: struts. - Class:
File: PlainSocketImpl.java
Method: connect
Line: 177 - java/net/PlainSocketImpl.java:177:-1
    at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:123)
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:830)
    ... 30 more
Caused by: struts.
    at (PlainSocketImpl.java:177)
    at (SocksSocketImpl.java:366)
    at (Socket.java:519)
    at (Socket.java:469)
    at (NetworkClient.java:163)
    at (HttpClient.java:394)
    at (HttpClient.java:529)
    at (HttpClient.java:233)
    at (HttpClient.java:306)
    at (HttpClient.java:323)
    at (HttpURLConnection.java:852)
    at (HttpURLConnection.java:793)
    at (HttpURLConnection.java:718)
    at (HttpURLConnection.java:1041)
    at com.(XMLEntityManager.java:677)
    at com.(XMLEntityManager.java:1315)
    at com.(XMLEntityManager.java:1282)
    at com.(XMLDTDScannerImpl.java:283)
    at com.(XMLDocumentScannerImpl.java:1192)
    at com.(XMLDocumentScannerImpl.java:1089)
    at com.(XMLDocumentScannerImpl.java:1002)
    at com.(XMLDocumentScannerImpl.java:648)
    at com.(XMLNSDocumentScannerImpl.java:140)
    at com.(XMLDocumentFragmentScannerImpl.java:510)
    at com.(XML11Configuration.java:807)
    at com.(XML11Configuration.java:737)
    at com.(XMLParser.java:107)
    at com.(AbstractSAXParser.java:1205)
    at com.(SAXParserImpl.java:522)
    at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
    at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:121)
    ... 31 more
2010-4-2 19:11:55 org.apache.catalina.core.StandardContext start
严重: Error filterStart
2010-4-2 19:11:55 org.apache.catalina.core.StandardContext start
严重: Context [/Struts2] startup failed due to previous errors
2010-4-2 19:11:55 org.apache.catalina.core.ApplicationContext log
信息: HTMLManager: list: Listing contexts for virtual host 'localhost'


[ 本帖最后由 随风心境 于 2010-4-6 16:41 编辑 ]
搜索更多相关主题的帖子: MyEclipse Struts Web 项目 部署 
2010-04-02 21:08
baifenghan
Rank: 8Rank: 8
等 级:贵宾
威 望:10
帖 子:258
专家分:952
注 册:2006-3-17
收藏
得分:7 
这个环境搭建有问题,一般来说只需要struts2.jar, ognl.jar, xwork.jar, file-upload.jar基本就可以了。
2010-04-02 23:24
随风心境
Rank: 1
等 级:新手上路
帖 子:9
专家分:0
注 册:2009-9-24
收藏
得分:0 
回复 2楼 baifenghan
谢谢回复! 非常感谢。

不过小弟是初学者,不太懂?  能具体说一下解决方法吗?   再谢。。。

2010-04-03 12:01
qixin778899
Rank: 1
等 级:新手上路
威 望:2
帖 子:13
专家分:7
注 册:2010-3-28
收藏
得分:7 
你的web 项目jar包没有添加进去
 得重新添加下 本机上的jar包的路径
2010-04-03 15:50
随风心境
Rank: 1
等 级:新手上路
帖 子:9
专家分:0
注 册:2009-9-24
收藏
得分:0 
这个问题我刚解决了,原来是Struts.xml中dtd的问题,struts.xml中http://struts.,如果电脑不联网,就会 struts.报错,
把dtd文件下到本地,然后在xml声明部分路径改为你dtd文件的本地路径就可以了
2010-04-19 12:35
快速回复:MyEclipse中部署Struts Web项目问题?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.027763 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved