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 42961

Summary: Exception on startup on Mac OS X
Product: java Reporter: _ tboudreau <tboudreau>
Component: UnsupportedAssignee: Tomas Zezula <tzezula>
Status: CLOSED FIXED    
Severity: blocker CC: jglick
Priority: P1 Keywords: REGRESSION
Version: 4.x   
Hardware: Macintosh   
OS: Mac OS X   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 41535    

Description _ tboudreau 2004-05-08 19:29:36 UTC
After doing a clean build with a fresh checkout, I got the 
following exception on startup:

Annotation: Parser error
java.lang.IllegalArgumentException: Invalid ClassPath root: file:/
System/Library/Java/Extensions/libJ3D.jnilib. The root must be a 
folder.
	at 
org.netbeans.api.java.classpath.ClassPath$Entry.getRoot(ClassPa
th.java:467)
	at 
org.netbeans.api.java.classpath.ClassPath.getRoots(ClassPath.jav
a:173)
	at 
org.netbeans.api.java.classpath.ClassPath.findOwnerRoot(ClassP
ath.java:314)
	at 
org.netbeans.api.java.classpath.ClassPath.contains(ClassPath.jav
a:332)
	at 
org.netbeans.modules.java.platform.classpath.PlatformClassPath
Provider.findClassPath(PlatformClassPathProvider.java:49)
	at 
org.netbeans.api.java.classpath.ClassPath.getClassPath(ClassPat
h.java:401)
	at 
org.netbeans.modules.java.parser.ParseSourceRequest.getBootCl
assPath(ParseSourceRequest.java:297)
	at 
org.netbeans.modules.java.parser.ParsingSupport$Processor.get
BootClassPath(ParsingSupport.java:799)
	at 
org.netbeans.modules.java.gj.JavaParserEngine.process(JavaPars
erEngine.java:75)
	at 
org.netbeans.modules.java.parser.ParsingSupport$Processor.pro
cess(ParsingSupport.java:712)
	at 
org.netbeans.modules.java.parser.ParsingSupport$Processor.par
seLockModel(ParsingSupport.java:663)
	at 
org.netbeans.modules.java.parser.ParsingSupport$Processor.run
(ParsingSupport.java:594)
	at org.openide.util.Task.run(Task.java:136)
	at 
org.openide.util.RequestProcessor$Task.run(RequestProcessor.ja
va:330)
[catch] at 
org.openide.util.RequestProcessor$Processor.run(RequestProces
sor.java:686)
==>
Comment 1 _ tboudreau 2004-05-09 01:15:30 UTC
Adding Jesse to cc - any clue?  Current builds are pretty unusable.

Note also:

WARNING - ErrorManager detected cyclic exception nesting:
        java.lang.IllegalArgumentException: Invalid ClassPath root: file:/System/Library/Java/
Extensions/libmlib_jai.jnilib. The root must be a folder.
Be sure not to annotate an exception with itself, directly or indirectly.
*********** Exception occurred ************ at 2:11 AM on May 9, 2004
Annotation: Parser error
java.lang.IllegalArgumentException: Invalid ClassPath root: file:/System/Library/Java/
Extensions/libJ3D.jnilib. The root must be a folder.
        at org.netbeans.api.java.classpath.ClassPath$Entry.getRoot(ClassPath.java:467)
...
Comment 2 Jesse Glick 2004-05-09 02:10:38 UTC
Sounds like this is caused by Tomas' recent patch to load JRE
extensions as part of the effective boot classpath. Non-ZIP-format
files should be omitted.

Marking as P1 if the build is really unusable as a result.
Comment 3 _ tboudreau 2004-05-09 05:01:04 UTC
Not even possible to open files.  

Not sure if the NPE from FileUtil.normalizeFile() is related or not - can't navigate in the 
project file chooser either.  Pretty messed.
Comment 4 _ tboudreau 2004-05-09 13:50:45 UTC
Tomas, I've put the following hotfix in the trunk to make the build at least usable.  Please 
review/fix as it should be.

BTW, this issue is probably deserving of a unit test - the problem is non-obvious and 
apparently not a problem elsewhere.

=======================================================
============
RCS file: /cvs/java/j2seplatform/src/org/netbeans/modules/java/j2seplatform/
platformdefinition/Util.java,v
retrieving revision 1.6
diff -u -r1.6 Util.java
--- src/org/netbeans/modules/java/j2seplatform/platformdefinition/Util.java     5 May 
2004 13:38:08 -0000     1.6
+++ src/org/netbeans/modules/java/j2seplatform/platformdefinition/Util.java     9 May 
2004 12:47:26 -0000
@@ -52,7 +52,9 @@
                 url = FileUtil.getArchiveRoot(f.toURI().toURL());
             }
             else {
-                url = f.toURI().toURL();
+                //Hotfix issue 42961
+                return null;
+                //url = f.toURI().toURL();
             }
         } catch (MalformedURLException e) {
             throw new AssertionError(e);            
Comment 5 Jesse Glick 2004-05-09 16:21:43 UTC
Hotfix is totally wrong, I will revert it and hopefully correct the
problem another way.
Comment 6 Jesse Glick 2004-05-09 16:27:25 UTC
Right file, wrong method.
Comment 7 Jesse Glick 2004-05-09 21:55:30 UTC
Better fix, please test:

committed     Up-To-Date  1.8        
java/j2seplatform/src/org/netbeans/modules/java/j2seplatform/platformdefinition/Util.java
Comment 8 Tomas Zezula 2004-05-10 10:10:40 UTC
Jesse's patch is fine.
But I am a bit surprised to find a native library in the java.ext.path
dir. On the standard JDK the native libraries are placed in the
jre/bin or jre/lib/<arch> folders.
http://java.sun.com/j2se/1.3/docs/guide/extensions/extensions.html
Comment 9 Tomas Zezula 2004-05-10 10:11:17 UTC
Verified.