Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Netbeans 6.1/6.5 no longer will start




Thanks for the summary Bob, but in looking back, I don't think it has to do with the version of Java.  I uninstalled and reinstalled Java from my Leopard CD (following this blog: http://javablog.co.uk/2007/10/26/apple-os-x-leopard-doesnt-have-java-6/), and here is what I see:

- with the original Java from Leopard, it fails when using Java from Versions/1.5/Home, but not from Versions/A/Commands:

$ /System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home/bin/java -version
java version "1.5.0_13"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13-b05-237)
Java HotSpot(TM) Client VM (build 1.5.0_13-119, mixed mode)

$ /System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home/bin/java 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
Segmentation fault

$ /System/Library/Frameworks/JavaVM.framework/Versions/A/Commands/java 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
Exception in thread "main" java.lang.NoClassDefFoundError: 1

- I then ran software update, and installed update 1.  Java 1.5 didn't change, but now both the version in Versions/A/Commands and Versions/1.6/Home fail also:

$ /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/bin/java -version
java version "1.6.0_05"
Java(TM) SE Runtime Environment (build 1.6.0_05-b13-120)
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_05-b13-52, mixed mode)

$ /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/bin/java 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
Segmentation fault

$ /System/Library/Frameworks/JavaVM.framework/Versions/A/Commands/java 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
Segmentation fault

- As in the example below, the same things happens with update 2 as well.

The only other clue I have is that it is somehow shell-related -- bash and zsh both fail, but tcsh runs the command successfully.

-Jon


On Mon, Sep 1, 2008 at 8:12 AM, Bob Potterveld <email@hidden> wrote:
This problem appears to be due to an issue with the the preview updates presently available for Java. It appears that if the number of arguments passed on the command line is greater than 25, the system will report a segmentation violation. When the number of arguments is 25 or less, java is invoked correctly. In the sample below the jvm returns a no class found error which is expected. The same test using sudo does not hit the segmentation violation and invokes java correctly regardless of the number of arguments. Netbeans startup appears to be passing in more than 25 arguments hence causing the segmentation violation.

Jon and I had done some troubleshooting on the problem by looking at how the netbeans shell script was invoking java. The following excerpt is from Jon's troubleshooting.


Based on your suggestion, I copied the NetBeans Java command into a shell script, and started playing around.  To my amazement, I figured out the problem has nothing to do with the content of the arguments to Java, just the number of them!  Here is a grab from my command line:

$ /System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home/bin/java 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
Segmentation fault

$ /System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home/bin/java 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
Exception in thread "main" java.lang.NoClassDefFoundError: 1

$ sudo /System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home/bin/java 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
Exception in thread "main" java.lang.NoClassDefFoundError: 1

$ /System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home/bin/javadoc 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
Segmentation fault

$ /System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home/bin/javadoc 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
javadoc: error - Illegal package name: "1"
javadoc: error - Illegal package name: "2"
...
javadoc: error - Illegal package name: "25"
25 errors

Any time I have more than 25 arguments to any command in the <JAVA_HOME>/bin directory, it crashes!  And to back up what I said earlier, it doesn't crash if I execute the same with sudo. This same behavior happens in sh, bash and zsh, but not in tcsh.  Curious, no?

I'm not running the java preview updates and can't reproduce using released versions of java.

Any suggestions on a solution for Jon?

Thanks,


Bob Potterveld

On Aug 29, 2008, at 1:05 PM, Jonathan Kaplan wrote:

I'm having exactly the same segmentation fault issue with NetBeans after upgrading to Leopard.  Here are the things I have tried (all result in the same error):

- switch from Java 1.5 to Java 6
- create a new user account and launch NetBeans from there
- repair disk permissions
- remove Java and reinstall packages from the Leopard DVD
- install Java for Mac OS X 10.5, Update 2
- uninstall and reinstall NetBeans and associated files
- monitor for errors with dtruss and errinfo

>From what I have seen, the error seems to happen during the "exec" of Java, before any other system calls are made. As noted on the nabble thread, if I repeat the same command with sudo, it works perfectly.  I've seen this happen with Java apps other than NetBeans. I can also reliably cause identical segmentations faults in Javadoc, which are also fixed by running with sudo, although I don't know if that's related.

I'm at a loss for how to debug this.  I assume there is no version of Java with debugging symbols available, right?  My next move is to reinstall Leopard I guess.

Thanks in advance for any ideas,
Jonathan Kaplan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden

References: 
 >Re: Netbeans 6.1/6.5 no longer will start (From: Bob Potterveld <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.