This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 126308

Summary: java.net.UnknownHostException: java.sun.com
Product: obsolete Reporter: saeed_z_f <saeed_z_f>
Component: visualwebAssignee: Winston Prakash <wjprakash>
Status: REOPENED ---    
Severity: blocker CC: arnex, boeloek, jarome, kharezlak
Priority: P2    
Version: 6.x   
Hardware: PC   
OS: Windows XP   
URL: http://statistics.netbeans.org/exceptions/detail.do?id=20069
Issue Type: DEFECT Exception Reporter: 20069

Description saeed_z_f 2008-01-30 17:57:49 UTC
Build: NetBeans IDE Dev (Build 200801110000)
VM: Java HotSpot(TM) Client VM, 1.6.0_03-b05
OS: Windows XP, 5.1, x86
User comments: In the absence of the Internet,development Visual Web Pack Application ,Errors
STACKTRACE: (first 10 lines)
java.net.UnknownHostException: java.sun.com
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
        at java.net.Socket.connect(Socket.java:519)
        at java.net.Socket.connect(Socket.java:469)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
        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:788)
Comment 1 _ sandipchitale 2008-01-30 18:09:45 UTC
Please attach full IDE message log and the steps to reproduce.
The stack trace does not have any visualweb code.

Were you referencing java.sun.com in your application somewhere?

Comment 2 _ sandipchitale 2008-01-31 06:02:25 UTC
Apparently it is trying to resolve tld namespace URI or schema in:

org.netbeans.modules.visualweb.jsfsupport.container.JsfTagSupport.addTaglibFacesConfigMapEntry

Winston, should we be using some URI mapper hrough layer files?

Here is the full stacktrace:

java.net.UnknownHostException: java.sun.com
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
        at java.net.Socket.connect(Socket.java:519)
        at java.net.Socket.connect(Socket.java:469)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:157)
        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.(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: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 com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:677)
        at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(XMLEntityManager.java:1316)
        at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:1283)
        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:1168)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.next(XMLDocumentScannerImpl.java:1068)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:988)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:645)
        at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:508)
        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.DOMParser.parse(DOMParser.java:225)
        at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:283)
        at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:124)
        at
org.netbeans.modules.visualweb.jsfsupport.container.JsfTagSupport.addTaglibFacesConfigMapEntry(JsfTagSupport.java:90)
        at org.netbeans.modules.visualweb.jsfsupport.container.JsfTagSupport.initialize(JsfTagSupport.java:57)
        at org.netbeans.modules.visualweb.jsfsupport.container.FacesContainer.initialize(FacesContainer.java:220)
        at org.netbeans.modules.visualweb.jsfsupport.container.FacesContainer.(FacesContainer.java:137)
        at org.netbeans.modules.visualweb.insync.models.FacesModelSet.getFacesContainer(FacesModelSet.java:497)
        at org.netbeans.modules.visualweb.insync.models.FacesModelSet.(FacesModelSet.java:403)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(NativeConstructorAccessorImpl.java:0)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at org.netbeans.modules.visualweb.insync.ModelSet.createInstance(ModelSet.java:257)
        at org.netbeans.modules.visualweb.insync.ModelSet.getInstance(ModelSet.java:242)
        at org.netbeans.modules.visualweb.insync.ModelSet$1.run(ModelSet.java:209)
        at java.lang.Thread.run(Thread.java:619)

        
Comment 4 Winston Prakash 2008-02-01 00:47:35 UTC
I need to add the off-line entity resolver to document builder in JsfTagSupport.
Comment 5 Winston Prakash 2008-02-01 16:04:39 UTC
Ok, even after setting the DocumentFactoryBuilder.setValidating(false), DocumentBuilder seems try to resolve the
namespace URI entity.

So fix this bug explicitly setting an Empty EntityResolver resolver. It may seem odd to skip validation. But accorsing
to me, when a component set is added to IDE, the faces-config.xml must be well tested and proved.

In my opinion, skipping the validation overhead would improve the performance, assuming the faces-config.xml is well tested.
Comment 6 Winston Prakash 2008-02-04 15:22:35 UTC
Now explicitly setting an Empty EntityResolver resolver to skip validation.
Comment 7 Exceptions Reporter 2009-01-29 11:27:24 UTC
Reopening - reproduced in NetBeans IDE Dev (Build 090127)
http://statistics.netbeans.org/exceptions/detail.do?id=20069