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 127528 - java.lang.NullPointerException
Summary: java.lang.NullPointerException
Status: RESOLVED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: visualweb (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Ch Nguyen
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-16 00:45 UTC by Jesse Glick
Modified: 2008-03-07 18:47 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 6023


Attachments
stacktrace (890 bytes, text/plain)
2008-02-17 02:30 UTC, uroboros
Details
stacktrace (890 bytes, text/plain)
2008-02-21 04:43 UTC, samirbahyeldin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2008-02-16 00:45:01 UTC
Build: NetBeans IDE Dev (Build 200709120000)
VM: Java HotSpot(TM) Client VM, 1.6.0_02-b05
OS: Linux, 2.6.22-ARCH, i386
User comments: I've installed post-release examaples for visual jsf 
STACKTRACE: (first 10 lines)
java.lang.NullPointerException
        at
org.netbeans.modules.visualweb.samples.postrel.PostReleaseModuleInstaller.restored(PostReleaseModuleInstaller.java:72)
        at org.netbeans.core.startup.NbInstaller.loadCode(NbInstaller.java:356)
        at org.netbeans.core.startup.NbInstaller.load(NbInstaller.java:275)
        at org.netbeans.ModuleManager.enable(ModuleManager.java:901)
        at org.netbeans.core.startup.ModuleList.installNew(ModuleList.java:380)
        at org.netbeans.core.startup.ModuleList.trigger(ModuleList.java:316)
        at org.netbeans.core.startup.ModuleSystem.restore(ModuleSystem.java:260)
        at org.netbeans.core.startup.Main.getModuleSystem(Main.java:149)
        at org.netbeans.core.startup.Main.start(Main.java:300)
        at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:88)

[See the 94 (!) duplicates and associated comments in the exception reporter. Marking P2 due to the frequency. -jglick]
Comment 1 uroboros 2008-02-17 02:30:52 UTC
Build: NetBeans IDE 6.0.1 (Build 200801291616)
VM: Java HotSpot(TM) Client VM, 10.0-b19
OS: SunOS, 5.10, x86

User Comments: 
Comment 2 uroboros 2008-02-17 02:30:55 UTC
Created attachment 56783 [details]
stacktrace
Comment 3 Ch Nguyen 2008-02-20 15:55:12 UTC
I cannot reproduce this in a development main build.
Comment 4 Ch Nguyen 2008-02-20 15:57:07 UTC
I cannot reproduce this in a development main build. I installed the visualweb post release from the update center and
didn't see the NPE in the log.  Please provide the reproducible steps.  Thanks.
Comment 5 Jesse Glick 2008-02-20 17:41:18 UTC
Clearly there are not going to be any steps to reproduce, it is just an exception known to be thrown a lot. Since a NPE
always indicates a bug in your code, figure out which vars might possibly be null and defend against that, or if you
believe it is "impossible", put in assert statements to trace what went wrong.
Comment 6 samirbahyeldin 2008-02-21 04:43:10 UTC
Build: NetBeans IDE 6.0.1 (Build 200801291616)
VM: Java HotSpot(TM) Client VM, 1.5.0_10-b03
OS: Windows XP, 5.1, x86

User Comments: 
Comment 7 samirbahyeldin 2008-02-21 04:43:13 UTC
Created attachment 56959 [details]
stacktrace
Comment 8 Ch Nguyen 2008-02-21 08:06:40 UTC
I still can't reproduce this NPE.  However, I fixed up the code anyway after analyzing where there is a need to check
for null pointer. I also got some good feedback from Quy on the code change review.  Here is the changeset info:

changeset:   10657:c3c4c1c2c7b3
user:        Chau Nguyen <cnguyencasj@netbeans.org>
date:        Wed Feb 20 22:29:22 2008 -0800
files:       visualweb.samples.postrel/nbproject/project.xml
visualweb.samples.postrel/src/org/netbeans/modules/visualweb/samples/postrel/PostReleaseModuleInstaller.java
description:
Fix bug 127528 - NPE (without reproducible steps)


While fixing this bug I also discovered that there is another condition where the complib might not be re-registered in
the IDE once removed from the Library Manager.   For more info on that issue, you can follow this issue 127969.
Comment 9 Karthikeyan Rajeswaran 2008-03-07 18:47:12 UTC
The fix is in contrib module and so cannot be part of 6.0.1 patch2 (only stable modules are part of sustaining branch).
Thus removing release601_fixes_candidate2 keyword.