当前位置: 代码迷 >> J2EE >> Struts2的部署有关问题
  详细解决方案

Struts2的部署有关问题

热度:14   发布时间:2016-04-19 22:55:29.0
Struts2的部署问题
最近在学习struts2,开发工具:myeclipse tomcat7.0.42,在我部署struts2的项目时,服务器报如下错误,但是如果我的电脑连接网路,就不会报错了,高手解答:

2014-3-8 10:47:26 com.opensymphony.xwork2.util.logging.commons.CommonsLogger error
严重: Dispatcher initialization failed
Unable to load configuration. - Class: java.net.PlainSocketImpl
File: PlainSocketImpl.java
Method: connect
Line: 195 - java/net/PlainSocketImpl.java:195:-1
       at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58)
       at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:374)
       at org.apache.struts2.dispatcher.Dispatcher.init( Dispatcher.java:418)
       at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:69)
       at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51)
       at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:281)
       at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:262)
       at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:107)
       at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4775)
       at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5452)
       at org.apache.catalina.util.LifecycleBase.start( LifecycleBase.java:150)
       at org.apache.catalina.core.StandardContext.reload(StandardContext.java:3954)
       at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1270)
       at org.apache.catalina.startup.HostConfig.check( HostConfig.java:1439)
       at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:315)
       at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
       at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
       at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1374)
       at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1530)
       at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1540)
       at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1519)
       at java.lang.Thread.run( Thread.java:662)
Caused by: Unable to load file:/D:/Program%20Files/apache-tomcat-7.0.42/webapps/eyang/WEB-INF/classes/struts.xml - Class: java.net.PlainSocketImpl
File: PlainSocketImpl.java
Method: connect
Line: 195 - java/net/PlainSocketImpl.java:195:-1
       at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:898)
       at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:143)
       at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:110)
       at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:168)
       at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55)
       ... 21 more
Caused by: struts.apache.org - Class: java.net.PlainSocketImpl
File: PlainSocketImpl.java
Caused by: Unable to load file:/D:/Program%20Files/apache-tomcat-7.0.42/webapps/eyang/WEB-INF/classes/struts.xml - Class: java.net.PlainSocketImpl
File: PlainSocketImpl.java
Method: connect
Line: 195 - java/net/PlainSocketImpl.java:195:-1
       at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:898)
       at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:143)
       at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:110)
       at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:168)
       at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55)
  相关解决方案