[
https://issues.apache.org/struts/browse/WW-2781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44602#action_44602
]
Pierre Thibaudeau commented on WW-2781:
---------------------------------------
Same issue with Tomcat 6.0.14.
(In fact, I now personally doubt that the version of Tomcat has anything to do
with this issue.)
Moreover, the problem is connecting to http://struts.apache.org/, and not
http://www.opensymphony.com/, as I mistakenly thought when I raised the issue
on the mailing list.
It is worth pointing out that this issue is not going to be apparent UNLESS the
connection to http://struts.apache.org/ fails during startup, at which point
the following exception will be thrown:
* * * * *
Exception starting action2 filter
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:371)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:424)
at
org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:213)
at
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)
... 25 more
Caused by: Unable to load
file:/D:/applications/apache-tomcat-6.0.16/webapps/myapp/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:875)
at
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:161)
at
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:130)
at
com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:155)
at
com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55)
... 30 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:122)
at
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:870)
... 34 more
Caused by: java.net.UnknownHostException: struts.apache.org
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
at java.net.Socket.connect(Socket.java:518)
at java.net.Socket.connect(Socket.java:468)
at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:389)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:516)
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:318)
at
sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:788)
at
sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:729)
at
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:654)
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:977)
at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown
Source)
at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown Source)
at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
at com.opensymphony.xwork2.util.DomHelper.parse(DomHelper.java:120)
... 35 more
> attempts to access www.opensymphony.com on Struts startup???
> ------------------------------------------------------------
>
> Key: WW-2781
> URL: https://issues.apache.org/struts/browse/WW-2781
> Project: Struts 2
> Issue Type: Bug
> Components: XML Configuration
> Affects Versions: 2.1.2
> Reporter: Perry Prust
>
> When starting an s2 application in tomcat, the system is trying to connet to
> www.opensymphony.com (probably for validation of the xml DTD's).
> This makes it impossible to use the server in an disconnected environment
> (for development or behind a firewall).
> Is there a way to workaround this problem - e.g. to disable the xml
> validation?
> my configuration:
> - Tomcat 6.0.16 (also tested with jetty 6 via the maven jetty plugin - 6.1.10)
> - struts 2.0.11.2 (also tested with 2.1.2, 2.0.9)
> - spring 2.5.5
> - struts2-spring-plugin 2.0.11.2
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.