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 41505 - Enigmatic exception "No <jar>" on startup
Summary: Enigmatic exception "No <jar>" on startup
Status: CLOSED WORKSFORME
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-30 14:30 UTC by _ tboudreau
Modified: 2006-03-24 10:18 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Just adding in the filename and element (although its toString() is less meaningful than I'd hoped) (2.34 KB, patch)
2004-03-30 14:44 UTC, _ tboudreau
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description _ tboudreau 2004-03-30 14:30:27 UTC
I'm getting this on startup with my branched version of core.

I'd like to suggest that, especially while things are a bit unstable 
with the new projects (semi-hack projectization of some things, 
etc.), and just as a general prinicple, that any exception thrown 
while reading an xml file *always* include the full path of the file 
being read - then one can at least compare it with something 
else and have a chance at fixing it.


org.xml.sax.SAXException: No <jar>
	at 
org.netbeans.modules.apisupport.project.ModuleList.<init>(Mo
duleList.java:86)
	at 
org.netbeans.modules.apisupport.project.ModuleList.getModule
List(ModuleList.java:50)
	at 
org.netbeans.modules.apisupport.project.NbModuleProject.<init
>(NbModuleProject.java:73)
	at 
org.netbeans.modules.apisupport.project.NbModuleProjectType.
createProject(NbModuleProjectType.java:41)
Comment 1 _ tboudreau 2004-03-30 14:43:17 UTC
I'll attach a patch, but better would be to print out the offending line number.
Comment 2 _ tboudreau 2004-03-30 14:44:13 UTC
Created attachment 14205 [details]
Just adding in the filename and element (although its toString() is less meaningful than I'd hoped)
Comment 3 Jesse Glick 2004-03-30 14:52:40 UTC
Current version of ModuleList does mention where nbroot is.

Probably you are using an obsolete version of the apisupport/project
module on newer trunk sources.
Comment 4 _ tboudreau 2004-03-30 17:02:35 UTC
Hmm.  The problem seems to be that (in my current trunk checkout, unless it changed 
*very* recently), ModuleList assumes that every module element will have a jar tag, and 
throws an exception if it's missing.  But many module tags in the current 
modules.xml don't have any jar tag.

Comment 5 Jesse Glick 2004-03-30 17:17:40 UTC
The current ModuleList does not assume that every module has a <jar>
tag. You are using an obsolete version of it, I presume.
Comment 6 _ tboudreau 2004-03-30 19:15:30 UTC
Okay, I'll do a fresh checkout and build and hopefully the problem will go away.

Nonetheless, I'd suggest that for all parts of the projects infrastructure that parse XML 
files, any error message should include the file (and ideally) line where the problem 
occured.
Comment 7 Marian Mirilovic 2005-07-15 07:52:57 UTC
closed