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 140061 - [65cat] UnknownHostException when start up Ide without internet connection and Netbeans won't start again
Summary: [65cat] UnknownHostException when start up Ide without internet connection an...
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Jiri Skrivanek
URL:
Keywords:
: 139937 140672 141066 141478 141649 149734 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-07-15 12:24 UTC by _ theanuradha
Modified: 2008-12-22 13:47 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
corrupted files (2.69 MB, application/x-compressed)
2008-07-16 17:41 UTC, _ theanuradha
Details
PATCH (1.30 KB, patch)
2008-07-21 11:34 UTC, _ theanuradha
Details | Diff
Patched core jar (687.95 KB, application/octet-stream)
2008-07-21 15:41 UTC, _ theanuradha
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ theanuradha 2008-07-15 12:24:06 UTC
[ JDK VERSION : 1.6.0 ]

UnknownHostException when start up Ide without internet connection
than after next re start (rerun again)will not start ide and throws
BufferUnderflowException and crash 

java.net.UnknownHostException: www.netbeans.org
Caused: java.net.UnknownHostException: www.netbeans.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(HttpURLCo
nnection.java:790)
	at
sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnec
tion.java:731)
	at
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.
java:656)
	at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConn
ection.java:979)
	at
com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentE
ntity(XMLEntityManager.java:677)
	at
com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(X
MLEntityManager.java:1315)
	at
com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntit
y(XMLEntityManager.java:1282)
	at
com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSour
ce(XMLDTDScannerImpl.java:283)
	at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriv
er.dispatch(XMLDocumentScannerImpl.java:1192)
	at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriv
er.next(XMLDocumentScannerImpl.java:1089)
	at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologD
river.next(XMLDocumentScannerImpl.java:1002)
	at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XM
LDocumentScannerImpl.java:648)
	at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl
.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
	at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XM
L11Configuration.java:807)
	at
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XM
L11Configuration.java:737)
	at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.j
ava:107)
	at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Abs
tractSAXParser.java:1132)
	at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.pa
rse(SAXParserImpl.java:533)
	at
org.netbeans.core.startup.layers.ParsingLayerCacheManager.createRoot(P
arsingLayerCacheManager.java:166)
	at
org.netbeans.core.startup.layers.ParsingLayerCacheManager.store(Parsin
gLayerCacheManager.java:125)
	at
org.netbeans.core.startup.layers.ModuleLayeredFileSystem$1Updater.run(
ModuleLayeredFileSystem.java:286)
	at
org.openide.filesystems.EventControl.runAtomicAction(EventControl.java
:120)
	at
org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:499
)
	at
org.netbeans.core.startup.layers.ModuleLayeredFileSystem.setURLs(Modul
eLayeredFileSystem.java:311)
	at
org.netbeans.core.startup.layers.ModuleLayeredFileSystem.addURLs(Modul
eLayeredFileSystem.java:326)
	at
org.netbeans.core.startup.NbInstaller.loadLayers(NbInstaller.java:600)

	at org.netbeans.core.startup.NbInstaller.load(NbInstaller.java:305)
	at org.netbeans.ModuleManager.enable(ModuleManager.java:904)
	at
org.netbeans.core.startup.ModuleList.installNew(ModuleList.java:428)
	at org.netbeans.core.startup.ModuleList.trigger(ModuleList.java:364)
	at
org.netbeans.core.startup.ModuleSystem.restore(ModuleSystem.java:276)
	at org.netbeans.core.startup.Main.getModuleSystem(Main.java:163)
	at org.netbeans.core.startup.Main.start(Main.java:314)
	at
org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:110)
[catch] at java.lang.Thread.run(Thread.java:619)

java.nio.BufferUnderflowException
        at java.nio.DirectByteBuffer.get(DirectByteBuffer.java:221)
        at java.nio.ByteBuffer.get(ByteBuffer.java:675)
        at
org.netbeans.core.startup.layers.BinaryFS.<init>(BinaryFS.java:137)
        at
org.netbeans.core.startup.layers.BinaryCacheManager.load(BinaryCacheMa
nager.java:74)
        at
org.netbeans.core.startup.layers.ModuleLayeredFileSystem.loadCache(Mod
uleLayeredFileSystem.java:151)
        at
org.netbeans.core.startup.layers.ModuleLayeredFileSystem.<init>(Module
LayeredFileSystem.java:114)
        at
org.netbeans.core.startup.layers.ModuleLayeredFileSystem.<init>(Module
LayeredFileSystem.java:110)
        at
org.netbeans.core.startup.layers.SystemFileSystem.create(SystemFileSys
tem.java:350)
        at
org.netbeans.core.startup.layers.SessionManager.create(SessionManager.
java:96)
        at
org.netbeans.core.startup.NbRepository.createDefaultFileSystem(NbRepos
itory.java:138)
        at
org.netbeans.core.startup.NbRepository.<init>(NbRepository.java:66)
        at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructo
rAccessorImpl.java:39)
        at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCo
nstructorAccessorImpl.java:27)
        at
java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at java.lang.Class.newInstance0(Class.java:355)
        at java.lang.Class.newInstance(Class.java:308)
        at
org.openide.util.lookup.MetaInfServicesLookup$P.getInstance(MetaInfSer
vicesLookup.java:431)
        at
org.openide.util.lookup.AbstractLookup.lookup(AbstractLookup.java:415)

        at
org.openide.util.lookup.ProxyLookup.lookup(ProxyLookup.java:205)
        at
org.openide.filesystems.ExternalUtil.initialize(ExternalUtil.java:154)

        at
org.openide.filesystems.ExternalUtil.getRepository(ExternalUtil.java:7
1)
        at
org.openide.filesystems.Repository.getDefault(Repository.java:155)
        at org.netbeans.core.startup.Main.start(Main.java:313)
        at
org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:110)
        at java.lang.Thread.run(Thread.java:619)
Cannot add System filesystem, exiting...
Comment 1 Milos Kleint 2008-07-15 12:37:20 UTC
something wrong in your installation? all schemas shall be included in the internal catalog I think.
Comment 2 ris 2008-07-15 13:43:10 UTC
Can't reproduce it.

I disabled my wireless connection, then started NB.

The start page displays "Cannot connect to internet"

No exception is thrown.
Comment 3 _ theanuradha 2008-07-15 14:34:24 UTC
still reproducible with deadlock Build 20080715105254 on XP
Comment 4 _ theanuradha 2008-07-16 17:38:09 UTC
I'll attach the cache files I suppose got corrupted when next time after UnknownHostException happen  
Comment 5 _ theanuradha 2008-07-16 17:41:21 UTC
Created attachment 64727 [details]
corrupted files
Comment 6 _ theanuradha 2008-07-16 17:45:26 UTC
once I rmove those file netbeans startup again and throws UnknownHostException and next stratup if fails again saying 

java.nio.BufferUnderflowException
        at java.nio.DirectByteBuffer.get(DirectByteBuffer.java:221)
        at java.nio.ByteBuffer.get(ByteBuffer.java:675)
        at
org.netbeans.core.startup.layers.BinaryFS.<init>(BinaryFS.java:137)
        at
org.netbeans.core.startup.layers.BinaryCacheManager.load(BinaryCacheMa
nager.java:74)
        at
org.netbeans.core.startup.layers.ModuleLayeredFileSystem.loadCache(Mod
uleLayeredFileSystem.java:151)
        at
org.netbeans.core.startup.layers.ModuleLayeredFileSystem.<init>(Module
LayeredFileSystem.java:114)
        at
org.netbeans.core.startup.layers.ModuleLayeredFileSystem.<init>(Module
LayeredFileSystem.java:110)
        at
org.netbeans.core.startup.layers.SystemFileSystem.create(SystemFileSys
tem.java:350)
        at
org.netbeans.core.startup.layers.SessionManager.create(SessionManager.
java:96)
        at
org.netbeans.core.startup.NbRepository.createDefaultFileSystem(NbRepos
itory.java:138)
        at
org.netbeans.core.startup.NbRepository.<init>(NbRepository.java:66)
        at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructo
rAccessorImpl.java:39)
        at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCo
nstructorAccessorImpl.java:27)
        at
java.lang.reflect.Constructor.newInstance(Constructor.java:513)
        at java.lang.Class.newInstance0(Class.java:355)
        at java.lang.Class.newInstance(Class.java:308)
        at
org.openide.util.lookup.MetaInfServicesLookup$P.getInstance(MetaInfSer
vicesLookup.java:431)
        at
org.openide.util.lookup.AbstractLookup.lookup(AbstractLookup.java:415)

        at
org.openide.util.lookup.ProxyLookup.lookup(ProxyLookup.java:205)
        at
org.openide.filesystems.ExternalUtil.initialize(ExternalUtil.java:154)

        at
org.openide.filesystems.ExternalUtil.getRepository(ExternalUtil.java:7
1)
        at
org.openide.filesystems.Repository.getDefault(Repository.java:155)
        at org.netbeans.core.startup.Main.start(Main.java:313)
        at
org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:110)
        at java.lang.Thread.run(Thread.java:619)
Cannot add System filesystem, exiting...
Comment 7 _ theanuradha 2008-07-18 08:05:51 UTC
*** Issue 140672 has been marked as a duplicate of this issue. ***
Comment 8 Marian Mirilovic 2008-07-18 09:16:34 UTC
Saw that on Ubuntu ...once I do not have connection to internet
Comment 9 _ theanuradha 2008-07-18 18:58:09 UTC
WORKAROUND  just go to USER_DIR\var\cache all *.dat files
Comment 10 _ theanuradha 2008-07-18 22:17:35 UTC
I see this on log when IDE shutdown after UnknownHostException (any connection)

Exception in thread "Flushing caches" java.lang.NullPointerException
        at java.io.FilterOutputStream.write(FilterOutputStream.java:80)
        at org.netbeans.core.startup.layers.ModuleLayeredFileSystem$1Updater.flushCaches(ModuleLayeredFileSystem.java:265)
        at org.netbeans.Stamps$Store.store(Stamps.java:523)
        at org.netbeans.Stamps$Worker.run(Stamps.java:685)
 
Comment 11 Lukas Hasik 2008-07-21 09:45:48 UTC
seems as duplicate of 139937. I'll leave it open for evaluation. 
Comment 12 Antonin Nebuzelsky 2008-07-21 10:27:30 UTC
Probably because of upgrade filesystem dtd 1.2.

Jirko, please, take this one.
Comment 13 _ theanuradha 2008-07-21 11:32:03 UTC
I have  fixed bug my self I'll attach the patch 
Comment 14 _ theanuradha 2008-07-21 11:34:39 UTC
Created attachment 65103 [details]
PATCH
Comment 15 _ theanuradha 2008-07-21 11:39:18 UTC
Please review it and apply as soon as possible (BTW I have sign the SCA)
Comment 16 Jiri Skrivanek 2008-07-21 15:20:59 UTC
I tried the patch but it didn't fix it.
Comment 17 _ theanuradha 2008-07-21 15:29:20 UTC
>>I tried the patch but it didn't fix it.
Well It fix the Issue at least for me .can you check it again ?.What I observe is on ParsingLayerCacheManager not add
the new version of -//NetBeans//DTD Filesystem 1.2//EN 
Comment 18 _ theanuradha 2008-07-21 15:37:45 UTC
I have check it again I'll attach the patch jar for you may be that will help to clarify 

Add add attached jar to
%NetbeansInstallation%\netbeans\platform8\core 
Comment 19 _ theanuradha 2008-07-21 15:41:01 UTC
Created attachment 65143 [details]
Patched core jar
Comment 20 rajivderas 2008-07-21 15:48:55 UTC
I  tried the core.jar patch and it worked smoothly.
Comment 21 Jiri Skrivanek 2008-07-21 16:13:21 UTC
OK, it works for me now. Sorry for confusion. I will integrate it promptly.
Comment 22 ris 2008-07-21 16:15:40 UTC
works for me also
Comment 23 Jiri Skrivanek 2008-07-21 16:28:06 UTC
Patch applied.
http://hg.netbeans.org/main/rev/2049f3511d3c
Comment 24 Michel Graciano 2008-07-21 20:14:10 UTC
I have just a question. Whenever a new DTD is created, will it be necessary to modify the source code time after time?
Comment 25 Jaroslav Tulach 2008-07-22 08:25:42 UTC
Thanks a lot Jirka, for finding the cause of the problem.
Comment 26 Jiri Skrivanek 2008-07-22 08:31:18 UTC
Actually thanks belong to theanuradha who investigated the problem first and attached the patch.
Comment 27 Jiri Kovalsky 2008-07-22 10:00:42 UTC
Thanks Anuradha!
Comment 28 Jiri Skrivanek 2008-07-22 10:27:45 UTC
*** Issue 139937 has been marked as a duplicate of this issue. ***
Comment 29 Jiri Skrivanek 2008-07-22 13:05:17 UTC
*** Issue 141066 has been marked as a duplicate of this issue. ***
Comment 30 Lukas Hasik 2008-07-25 09:04:39 UTC
*** Issue 141649 has been marked as a duplicate of this issue. ***
Comment 31 Lukas Hasik 2008-07-30 09:58:54 UTC
*** Issue 141527 has been marked as a duplicate of this issue. ***
Comment 32 Jana Maleckova 2008-08-08 12:47:35 UTC
*** Issue 141478 has been marked as a duplicate of this issue. ***
Comment 33 Lukas Hasik 2008-11-10 12:59:19 UTC
*** Issue 149734 has been marked as a duplicate of this issue. ***