The struts frame reported abnormally serious after starting Tomcat: Exception starting filter Struts2 Unable to load configuration. -Class:java.net.PlainSocketImpl

Source: Internet
Author: User
Tags addchild

Today just the dorm off the net, open the computer, open IDE tools, launch Tomcat, access to Web project engineering, page display 404, view the console, run error messages as follows:

Severity: Exception Starting filter Struts2
Unable to load configuration. -Class:java.net.PlainSocketImpl
File:PlainSocketImpl.java
Method:connect
Line:177-java/net/plainsocketimpl.java:177:-1
At Com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration (configurationmanager.java:58)
At Org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration (dispatcher.java:360)
At Org.apache.struts2.dispatcher.Dispatcher.init (dispatcher.java:403)
At Org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher (initoperations.java:69)
At Org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init ( STRUTSPREPAREANDEXECUTEFILTER.JAVA:48)
At Org.apache.catalina.core.ApplicationFilterConfig.getFilter (applicationfilterconfig.java:295)
At Org.apache.catalina.core.ApplicationFilterConfig.setFilterDef (applicationfilterconfig.java:424)
At Org.apache.catalina.core.applicationfilterconfig.<init> (applicationfilterconfig.java:115)
At Org.apache.catalina.core.StandardContext.filterStart (standardcontext.java:4072)
At Org.apache.catalina.core.StandardContext.start (standardcontext.java:4726)
At Org.apache.catalina.core.ContainerBase.addChildInternal (containerbase.java:799)
At Org.apache.catalina.core.ContainerBase.addChild (containerbase.java:779)
At Org.apache.catalina.core.StandardHost.addChild (standardhost.java:601)
At Org.apache.catalina.startup.HostConfig.deployDirectory (hostconfig.java:1079)
At Org.apache.catalina.startup.HostConfig.deployDirectories (hostconfig.java:1002)
At Org.apache.catalina.startup.HostConfig.deployApps (hostconfig.java:506)
At Org.apache.catalina.startup.HostConfig.start (hostconfig.java:1317)
At Org.apache.catalina.startup.HostConfig.lifecycleEvent (hostconfig.java:324)
At Org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent (lifecyclesupport.java:142)
At Org.apache.catalina.core.ContainerBase.start (containerbase.java:1065)
At Org.apache.catalina.core.StandardHost.start (standardhost.java:840)
At Org.apache.catalina.core.ContainerBase.start (containerbase.java:1057)
At Org.apache.catalina.core.StandardEngine.start (standardengine.java:463)
At Org.apache.catalina.core.StandardService.start (standardservice.java:525)
At Org.apache.catalina.core.StandardServer.start (standardserver.java:754)
At Org.apache.catalina.startup.Catalina.start (catalina.java:595)
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:289)
At Org.apache.catalina.startup.Bootstrap.main (bootstrap.java:414)
caused By:unable to load File:/d:/apache-tomcat-6.0.37/webapps/spring-ssh/web-inf/classes/struts.xml-class: Java.net.PlainSocketImpl
File:PlainSocketImpl.java
Method:connect
Line:177-java/net/plainsocketimpl.java:177:-1
At Com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles ( xmlconfigurationprovider.java:890)
At Com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments ( xmlconfigurationprovider.java:144)
At Com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init (xmlconfigurationprovider.java:111)
At Com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer (defaultconfiguration.java:164)
At Com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration (configurationmanager.java:55)
... More
caused By:struts.apache.org-class:java.net.plainsocketimpl
File:PlainSocketImpl.java
Method:connect
Line:177-java/net/plainsocketimpl.java:177:-1
At Com.opensymphony.xwork2.util.DomHelper.parse (domhelper.java:115)
At Com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles ( xmlconfigurationprovider.java:885)
... More
caused by:java.net.UnknownHostException:struts.apache.org
At Java.net.PlainSocketImpl.connect (plainsocketimpl.java:177)
At Java.net.SocksSocketImpl.connect (sockssocketimpl.java:366)
At Java.net.Socket.connect (socket.java:519)
At Java.net.Socket.connect (socket.java:469)
At Sun.net.NetworkClient.doConnect (networkclient.java:163)
At Sun.net.www.http.HttpClient.openServer (httpclient.java:394)
At Sun.net.www.http.HttpClient.openServer (httpclient.java:529)
At Sun.net.www.http.httpclient.<init> (httpclient.java:233)
At Sun.net.www.http.HttpClient.New (httpclient.java:306)
At Sun.net.www.http.HttpClient.New (httpclient.java:323)
At Sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient (httpurlconnection.java:790)
At Sun.net.www.protocol.http.HttpURLConnection.plainConnect (httpurlconnection.java:731)
At Sun.net.www.protocol.http.HttpURLConnection.connect (httpurlconnection.java:656)
At Sun.net.www.protocol.http.HttpURLConnection.getInputStream (httpurlconnection.java:979)
At Com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity (xmlentitymanager.java:677)
At Com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity (xmlentitymanager.java:1315)
At Com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity (xmlentitymanager.java:1282)
At Com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSource (xmldtdscannerimpl.java:283)
At Com.sun.org.apache.xerces.internal.impl.xmldocumentscannerimpl$dtddriver.dispatch ( xmldocumentscannerimpl.java:1192)
At Com.sun.org.apache.xerces.internal.impl.xmldocumentscannerimpl$dtddriver.next (XMLDocumentScannerImpl.java : 1089)
At Com.sun.org.apache.xerces.internal.impl.xmldocumentscannerimpl$prologdriver.next (XMLDocumentScannerImpl.java : 1002)
At Com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next (xmldocumentscannerimpl.java:648)
At Com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next (xmlnsdocumentscannerimpl.java:140)
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 Javax.xml.parsers.SAXParser.parse (saxparser.java:395)
At Com.opensymphony.xwork2.util.DomHelper.parse (domhelper.java:113)
... More
2015-6-7 10:06:10 org.apache.catalina.core.StandardContext Start
Severity: Error filterstart

Obviously, the above error is the STRUTS2 frame error message, Strange! I was able to access the project last night, how come this morning? Is it because of the reason for today's network disconnection?

I with doubts, looking for solutions, Web project source and deployment are in the local computer, carefully check the wrong information, unable to load configuration. -Class:java.net.PlainSocketImpl, it seems that there is no reason to find this class in the network, STRUTS2 parse the XML when the struts.apache.org host, this in the case of the network must be broken; So it's an error.

Later I looked at the Struts.xml configuration file, found that Struts.xml defined version and Struts2-core-2.1.6.jar inside the Struts-default.xml version is inconsistent!!

<! defined within the Struts-default.xml file DOCTYPE ...> as follows:

<! DOCTYPE struts public    "-//apache software foundation//dtd struts Configuration 2.1//en"    "/http Struts.apache.org/dtds/struts-2.1.dtd ">

While the Struts.xm file defines the <! DOCTYPE ...> for:

<! DOCTYPE struts public    "-//apache software foundation//dtd struts Configuration 2.1.7//en"    "/http Struts.apache.org/dtds/struts-2.1.7.dtd ">

Note the following version of struts-2.x.x, the cause of the error is the inconsistency here!

WORKAROUND: The <! defined in the Struts-default.xml file DOCTYPE ...> copy and paste overwrite <! to struts.xm file definition DOCTYPE., to successfully resolve the problem of escalation, after turning off Tomcat, and then restarting Tomcat, you can successfully access the Web project.

The struts frame reported abnormally serious after starting Tomcat: Exception starting filter Struts2 Unable to load configuration. -Class:java.net.PlainSocketImpl

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.