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 160548 - org.xml.sax.SAXParseException: Premature end of file. From nbfs://nbhost/SystemFileSystem/org-netbeans-api-project-libraries/Libraries/EclipseLink-GlassFish-v3-Prelude.xml
Summary: org.xml.sax.SAXParseException: Premature end of file. From nbfs://nbhost/Syst...
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: GlassFish (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P3 blocker (vote)
Assignee: Vince Kraemer
URL:
Keywords:
: 160703 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-03-18 14:17 UTC by baffyofdaffy
Modified: 2010-05-21 15:46 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description baffyofdaffy 2009-03-18 14:17:16 UTC
I get this exception on NetBeans startup without any report button

Annotation: From nbfs://nbhost/SystemFileSystem/org-netbeans-api-project-libraries/Libraries/EclipseLink-GlassFish-v3-
Prelude.xml
Annotation: From nbfs://nbhost/SystemFileSystem/org-netbeans-api-project-libraries/Libraries/EclipseLink-GlassFish-v3-
Prelude.xml
org.openide.ErrorManager$AnnException: From nbfs://nbhost/SystemFileSystem/org-netbeans-api-project-
libraries/Libraries/EclipseLink-GlassFish-v3-Prelude.xml
	at org.openide.ErrorManager$AnnException.findOrCreate(ErrorManager.java:863)
	at org.openide.ErrorManager$DelegatingErrorManager.annotate(ErrorManager.java:650)
	at org.netbeans.modules.project.libraries.LibrariesStorage.readLibrary(LibrariesStorage.java:235)
	at org.netbeans.modules.project.libraries.LibrariesStorage.loadFromStorage(LibrariesStorage.java:156)
	at org.netbeans.modules.project.libraries.LibrariesStorage.initStorage(LibrariesStorage.java:208)
	at org.netbeans.modules.project.libraries.LibrariesStorage.getLibraries(LibrariesStorage.java:311)
	at org.netbeans.modules.project.libraries.LibrariesModule.initProviders(LibrariesModule.java:63)
	at org.netbeans.modules.project.libraries.LibrariesModule.restored(LibrariesModule.java:58)
	at org.netbeans.core.startup.NbInstaller.loadCode(NbInstaller.java:423)
	at org.netbeans.core.startup.NbInstaller.load(NbInstaller.java:344)
	at org.netbeans.ModuleManager.enable(ModuleManager.java:906)
	at org.netbeans.core.startup.ModuleList.installNew(ModuleList.java:430)
	at org.netbeans.core.startup.ModuleList.trigger(ModuleList.java:366)
	at org.netbeans.core.startup.ModuleSystem.restore(ModuleSystem.java:276)
	at org.netbeans.core.startup.Main.getModuleSystem(Main.java:168)
	at org.netbeans.core.startup.Main.start(Main.java:309)
	at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:110)
	at java.lang.Thread.run(Thread.java:619)
From nbfs://nbhost/SystemFileSystem/org-netbeans-api-project-libraries/Libraries/EclipseLink-GlassFish-v3-Prelude.xml
Caused: org.xml.sax.SAXParseException: Premature end of file.
	at 
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:174)
	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:388)
	at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1411)
	at 
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1058)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.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(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.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
	at org.netbeans.modules.project.libraries.LibraryDeclarationParser.parse(LibraryDeclarationParser.java:274)
	at org.netbeans.modules.project.libraries.LibraryDeclarationParser.parse(LibraryDeclarationParser.java:226)
	at org.netbeans.modules.project.libraries.LibrariesStorage.readLibrary(LibrariesStorage.java:233)
	at org.netbeans.modules.project.libraries.LibrariesStorage.loadFromStorage(LibrariesStorage.java:156)
	at org.netbeans.modules.project.libraries.LibrariesStorage.initStorage(LibrariesStorage.java:208)
	at org.netbeans.modules.project.libraries.LibrariesStorage.getLibraries(LibrariesStorage.java:311)
	at org.netbeans.modules.project.libraries.LibrariesModule.initProviders(LibrariesModule.java:63)
	at org.netbeans.modules.project.libraries.LibrariesModule.restored(LibrariesModule.java:58)
	at org.netbeans.core.startup.NbInstaller.loadCode(NbInstaller.java:423)
	at org.netbeans.core.startup.NbInstaller.load(NbInstaller.java:344)
	at org.netbeans.ModuleManager.enable(ModuleManager.java:906)
	at org.netbeans.core.startup.ModuleList.installNew(ModuleList.java:430)
	at org.netbeans.core.startup.ModuleList.trigger(ModuleList.java:366)
	at org.netbeans.core.startup.ModuleSystem.restore(ModuleSystem.java:276)
	at org.netbeans.core.startup.Main.getModuleSystem(Main.java:168)
	at org.netbeans.core.startup.Main.start(Main.java:309)
	at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:110)
[catch] at java.lang.Thread.run(Thread.java:619)

After I cancel out of the exception I soon after get a window saying that org-netbeans-api-project-
libraries/Libraries/EclipseLink-GlassFish-v3-Prelude.xml already exists or something

Then I OK  out of that and NetBeans functions normally.
Comment 1 Vince Kraemer 2009-03-19 19:44:23 UTC
I saw something similar yesterday... but when i started a 'fresh' build today i cannot reproduce it.

which build are you using?

which jdk?

Thanks
Comment 2 Vince Kraemer 2009-03-20 15:39:27 UTC
*** Issue 160703 has been marked as a duplicate of this issue. ***
Comment 3 baffyofdaffy 2009-03-23 22:32:37 UTC
The JDK that NetBeans is told to run with is 6 update 11.

I have update 12 but I am not using it for NetBeans

I found a workaround.

C:\Documents and Settings\Bryan Field\.netbeans\6.7m2\config\org-netbeans-api-project-libraries\Libraries\EclipseLink-
GlassFish-v3-Prelude.xml

was a blank file.

So I deleted it.

I looked at it now and it is created again (this time it is 2K). And exception is gone. Probably a crash or something.

Most of the time there was no "report" button which means this may be aggravating people we don't know about.

I think that we should make the already exists message not show up by checking if it has size instead of checking if it 
exists.


Comment 4 baffyofdaffy 2009-03-23 22:33:46 UTC
Oh, and of course catch the exception so it does not show up.
Comment 5 Michal Mocnak 2009-09-22 10:25:17 UTC
Please reevaluate
Comment 6 Vince Kraemer 2009-09-25 23:14:19 UTC
I have not been able to reproduce this issue.  the exception does need to get logged... I do not know where the dialog
without a report button comes from...

It looks like the file that the LibrariesModule uses was zero size and that freaked it out....

there is not any info in this that the plugin can act on.

I am going to bump this back up to the ide/code, since I do not know which component/subcomponent combo is right for
org.netbeans.modules.project.libraries.LibrariesStorage
Comment 7 Vince Kraemer 2010-05-21 15:46:39 UTC
it looks like this has resolved itself... since I did not commit any change that I think accounts for it (and none of the plugin code was in the stack in the first place) I am going to mark this issue as worksforme.