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.
Build: NetBeans IDE 6.7 (Build 200906241340) VM: Java HotSpot(TM) Client VM, 14.0-b16, Java(TM) SE Runtime Environment, 1.6.0_14-b08 OS: Linux, 2.6.27.23-0.1-trace, i386 User Comments: GUEST: Wollte Hilfe �ffnen hedge_hog: Select: Help>Help Contents GUEST: Clicked on help and got this error. Stacktrace: java.lang.NullPointerException<br/> at org.netbeans.modules.javahelp.HyperlinkEventProcessor.addTo(HyperlinkEventProcessor.java:101)<br/> at org.netbeans.modules.javahelp.JavaHelp.adjust(JavaHelp.java:941)<br/> at org.netbeans.modules.javahelp.JavaHelp.createJHelp(JavaHelp.java:919)<br/> at org.netbeans.modules.javahelp.JavaHelp.createAndDisplayJHelp(JavaHelp.java:498)<br/> at org.netbeans.modules.javahelp.JavaHelp.showHelp(JavaHelp.java:477)<br/> at org.netbeans.modules.javahelp.HelpCtxProcessor$ShortcutAction.actionPerformed(HelpCtxProcessor.java:207)<br/>
Created attachment 84963 [details] stacktrace
It is even so on all other operations that should trigger the help system. May be a good information to know, that NB 6.5 is installed in parallel. Could this be the problem?
It looks like getContentViewer() returns null (not debugged), since I think that JHelp is not. Please fix this, since the help system is currently not usable. Do you need more information? How can I help?
Hi, this feature is very important. If anybody could tell me how I can get rid of this or how I could fix it, please advise. Cheers Patrick
Hi Patrick, I am sorry for a delay. I hadn't a chance to look into this issue until now. Yeah, it is unexpected behavior of my code. The bug means that the top-level GUI component JHelp [1] doesn't contain any instances of the JEditorPane as a child GUI component. It is strange, because the reference implementation of the JavaHelp, version 2.0_05 creates such instance unconditionally - javax.help.plaf.basic.BasicContentViewerUI$JHEditorPane [2]. You are right a cause of the NPE is the null returned by the method getContentViewer(). A simplest way to avoid the throwing of the exception is to check the contentViewer value in the method adjust() [3] and, in case if contentViewer is null, we need to return from that method, i.e. do nothing. Nevertheless, I guess, we need find a root cause and more correct way to fix the issue, so that the desired behavior of JavaHelp GUI won't be lost. [1] https://javahelp.dev.java.net/source/browse/javahelp/trunk/jhMaster/JavaHelp/src/new/javax/help/JHelp.java?view=markup [2] https://javahelp.dev.java.net/source/browse/javahelp/trunk/jhMaster/JavaHelp/src/new/javax/help/plaf/basic/BasicContentViewerUI.java?view=markup [3] http://hg.netbeans.org/main/file/9ca7ab1dd341/javahelp/src/org/netbeans/modules/javahelp/JavaHelp.java#l938 My first assumption that your system has got an unexpected configuration or has been misconfigured, because the method getContentViewer() has passed tests on WinXP, Vista, Solaris without any problems. Could you please, give me exact info about configuration of a system where the issue has been caught? - used OS distribution? - used JDK bundle? - used NB bundle? i.e *.rpm, *.deb, *-linux*.sh, ... - Does the JDK installation include jh.jar or jh-all.jar or jhall.jar or jh-*.jar in the any following dirs: $JDK_HOME/lib $JDK_HOME/jre/lib $JDK_HOME/jre/lib/ext ? May be such JAR is accessible in the system via CLASSPATH?
I've tested the issue with the following configuration: Build: NetBeans IDE 6.7.1 (Build 090813) Java: 1.6.0_0; OpenJDK Client VM, 14.0-b15 OS: Linux version, 2.6.29.4-167.fc11.i586 running on i386; UTF-8; en_US (nb) OS distro: Fedora 11 NB Bundle: netbeans-platform-6.7.1-1.fc12.noarch JDK Bundle: java-1.6.0-openjdk-devel-1.6.0.0-27.b16.fc12.i686.rpm JavaHelp Bundle: javahelp2-2.0.05-8.fc12.noarch.rpm It works for me.
A quick fix is provided in the trunk http://hg.netbeans.org/main/rev/544b84e1d087
Second edition of the quick fix is provided http://hg.netbeans.org/main/rev/048744607755 It will also show additional info in the log that might help to find a cause of the issue.
Hi Victor, I'm sorry, I did not notice your replies on this issue. Product Version = NetBeans IDE 6.7 (Build 200906261335) Operating System = Windows XP version 5.1 running on x86 Java; VM; Vendor = 1.6.0_15; Java HotSpot(TM) Client VM 14.1-b02; Sun Microsystems Inc. Runtime = Java(TM) SE Runtime Environment 1.6.0_15-b03 NB was updated to 6.7.1 in between via update manager, but it still shows the values as above. Do you know when this fix will be available? I'm not building NB myself. Cheers Patrick
UPDATE: After deactivating the Visual Paradigm SDE for Netbeans, the help worked again. @hedge_hog: I saw in your Messages Log that this is exactly the same issue on your machine under Linux - there I found the same strange error messages like on my machine. vpsdenb bla bla. Victor, based on your your hint to look for jh*.jar or *javahelp* files I got the idea to look for such files also in the different modules of Netbeans. Since I wasn't able to reactivate the module, I cannot reproduce the error any longer. Now it is uninstalled. Maybe hedge_hog can send the jh.jar for further analysis. Now I'm not sure if this an issue of Visual Paradigm or if is it something like a jar hell in netbeans modules. Do you think it is possible to avoid something similar like this in future? I saw that vpsdenb loads its own jh.jar through a classpath manifest entry. It seems like this happens at NB boot. BTW isn't there something like a "Loaded Modules and JARs overview" or something similar in Netbeans? For issues like these this would be very helpfull. Cheers Patrick