caused by:java.net.UnknownHostException:struts.apache.org

Source: Internet
Author: User

Start the project and report the mistake.

Line:184-java/net/abstractplainsocketimpl.java:184:-1
At Com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration (configurationmanager.java:70)
At Org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration (dispatcher.java:446)
At Org.apache.struts2.dispatcher.Dispatcher.init (dispatcher.java:490)
At Org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher (initoperations.java:74)
At Org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init ( STRUTSPREPAREANDEXECUTEFILTER.JAVA:57)
At Org.apache.catalina.core.ApplicationFilterConfig.initFilter (applicationfilterconfig.java:279)
At Org.apache.catalina.core.ApplicationFilterConfig.getFilter (applicationfilterconfig.java:260)
At Org.apache.catalina.core.applicationfilterconfig.<init> (applicationfilterconfig.java:105)
At Org.apache.catalina.core.StandardContext.filterStart (standardcontext.java:4809)
At Org.apache.catalina.core.StandardContext.startInternal (standardcontext.java:5485)
At Org.apache.catalina.util.LifecycleBase.start (lifecyclebase.java:150)
At Org.apache.catalina.core.containerbase$startchild.call (containerbase.java:1559)
At Org.apache.catalina.core.containerbase$startchild.call (containerbase.java:1549)
At Java.util.concurrent.FutureTask.run (futuretask.java:266)
At Java.util.concurrent.ThreadPoolExecutor.runWorker (threadpoolexecutor.java:1142)
At Java.util.concurrent.threadpoolexecutor$worker.run (threadpoolexecutor.java:617)
At Java.lang.Thread.run (thread.java:745)
caused By:unable to load File:/d:/apache-tomcat-7.0.52/webapps/graduatephotos/web-inf/classes/struts.xml-class : Java.net.AbstractPlainSocketImpl
File:AbstractPlainSocketImpl.java
Method:connect
Line:184-java/net/abstractplainsocketimpl.java:184:-1
At Com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles ( xmlconfigurationprovider.java:1022)
At Com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments ( xmlconfigurationprovider.java:165)
At Com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init (xmlconfigurationprovider.java:132)
At Com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer (defaultconfiguration.java:225)
At Com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration (configurationmanager.java:67)
... More
caused By:struts.apache.org-class:java.net.abstractplainsocketimpl
File:AbstractPlainSocketImpl.java
Method:connect
Line:184-java/net/abstractplainsocketimpl.java:184:-1
At Com.opensymphony.xwork2.util.DomHelper.parse (domhelper.java:119)
At Com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles ( XMLCONFIGURATIONPROVIDER.JAVA:1017)
... More
caused by:java.net.UnknownHostException:struts.apache.org
At Java.net.AbstractPlainSocketImpl.connect (abstractplainsocketimpl.java:184)
At Java.net.PlainSocketImpl.connect (plainsocketimpl.java:172)
At Java.net.SocksSocketImpl.connect (sockssocketimpl.java:392)
At Java.net.Socket.connect (socket.java:589)
At Java.net.Socket.connect (socket.java:538)

The cause of the error is because there is no internet connection, it can not load "Http://struts.apache.org/dtds/struts-2.5.dtd This DTD file, so error, the solution in addition to the computer connected to the Internet, is to modify the"/HTTP STRUTS.APACHE.ORG/DTDS/STRUTS-2.5.DTD the corresponding file location, let it go from the local to find the DTD file, instead of loading the file online, as follows:

  

DTD file in struts address: struts-2.3.15.3-all\src\core\src\main\resources

URL Address:

When this is set up, the DTD file can be loaded properly even without networking

caused by:java.net.UnknownHostException:struts.apache.org

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.