You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2017/09/04 20:43:01 UTC

[jira] [Commented] (WICKET-6454) WicketApplication behind a proxy with restrictive internet access can not initialized

    [ https://issues.apache.org/jira/browse/WICKET-6454?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16152929#comment-16152929 ] 

Martin Grigorov commented on WICKET-6454:
-----------------------------------------

Until servlet-api.jar v2.4 the DTD files were in this jar and org.apache.wicket.util.xml.CustomEntityResolver was using them to resolve the DTD locally, without internet connection.
Since v 3.0.0 the DTDs (and XSDs) are no more part of the content in the jar and because of this this EntityResolver doesn't help much.
Unfortunately due to licencing issues it is not possible to copy those files into Wicket jars. 

> WicketApplication behind a proxy with restrictive internet access can not initialized
> -------------------------------------------------------------------------------------
>
>                 Key: WICKET-6454
>                 URL: https://issues.apache.org/jira/browse/WICKET-6454
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 7.6.0
>         Environment: WicketApplication behind a proxy with restrictive internet access
>            Reporter: Hans Schneider
>            Assignee: Martin Grigorov
>
> I have a Application with a Wicket frontend developed and on my developer workstation with internet access starts the application successul. In a production server with restricte internet access the application can not start because the following exception.
> {code}
> ERROR org.apache.wicket.util.file.WebXmlFile getFilterPath  Error reading servlet/filter path from web.xml 
> java.net.UnknownHostException: java.sun.com
> 	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:178) ~[na:1.7.0_79]
> 	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) ~[na:1.7.0_79]
> 	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:1.7.0_79]
> 	at java.net.Socket.connect(Socket.java:579) ~[na:1.7.0_79]
> 	at java.net.Socket.connect(Socket.java:528) ~[na:1.7.0_79]
> 	at sun.net.NetworkClient.doConnect(NetworkClient.java:180) ~[na:na]
> 	at sun.net.www.http.HttpClient.openServer(HttpClient.java:432) ~[na:na]
> 	at sun.net.www.http.HttpClient.openServer(HttpClient.java:527) ~[na:na]
> 	at sun.net.www.http.HttpClient.<init>(HttpClient.java:211) ~[na:na]
> 	at sun.net.www.http.HttpClient.New(HttpClient.java:308) ~[na:na]
> 	at sun.net.www.http.HttpClient.New(HttpClient.java:326) ~[na:na]
> 	at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:997) ~[na:na]
> 	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:933) ~[na:na]
> 	at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:851) ~[na:na]
> 	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1301) ~[na:na]
> 	at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:986) ~[na:na]
> 	at org.apache.xerces.impl.XMLEntityManager.startEntity(XMLEntityManager.java:897) ~[na:na]
> 	at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:864) ~[na:na]
> 	at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScannerImpl.java:241) ~[na:na]
> 	at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(XMLDocumentScannerImpl.java:1001) ~[na:na]
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:324) ~[na:na]
> 	at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:845) ~[na:na]
> 	at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:768) ~[na:na]
> 	at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:108) ~[na:na]
> 	at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:230) ~[na:na]
> 	at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:285) ~[na:na]
> 	at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:121) ~[na:1.7.0_79]
> 	at org.apache.wicket.util.file.WebXmlFile.getFilterPath(WebXmlFile.java:206) [wicket-util-7.6.0.jar:7.6.0]
> 	at org.apache.wicket.util.file.WebXmlFile.getFilterPath(WebXmlFile.java:88) [wicket-util-7.6.0.jar:7.6.0]
> 	at org.apache.wicket.util.file.WebXmlFile.getUniqueFilterPath(WebXmlFile.java:67) [wicket-util-7.6.0.jar:7.6.0]
> {code}
> Would not it be a good idea if there was a possibility in the future to disable the validation of the XML?
> I have found a link on how the improvement could be implemented in the Class 
> org.apache.wicket.util.file.WebXmlFile and Method
> {code}
> public final Set<String> getFilterPath(final boolean isServlet, final String filterName,
> 		final InputStream is) throws ParserConfigurationException, SAXException, IOException
> {code}
> https://stackoverflow.com/questions/4002885/unknown-host-exception-while-parsing-an-xml-file



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)