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 77665 - NullPointerException on startup
Summary: NullPointerException on startup
Status: RESOLVED DUPLICATE of bug 72127
Alias: None
Product: java
Classification: Unclassified
Component: Platform (show other bugs)
Version: 5.x
Hardware: All Windows XP
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords:
: 77890 78253 88385 (view as bug list)
Depends on:
Blocks: 81206
  Show dependency tree
 
Reported: 2006-06-09 23:25 UTC by alexz
Modified: 2007-02-16 15:41 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
messages.log (14.19 KB, application/octet-stream)
2006-06-09 23:27 UTC, alexz
Details
Latest messages.log (139.00 KB, application/octet-stream)
2006-06-09 23:46 UTC, alexz
Details
Latest messages.log (42.57 KB, application/octet-stream)
2006-06-14 21:31 UTC, alexz
Details
This is the crash log when 'migrating' 5.0 settings to 5.5 (38.37 KB, application/octet-stream)
2006-06-14 22:25 UTC, alexz
Details
Contents of 'platforms' folder (1.77 KB, application/octet-stream)
2006-06-15 23:44 UTC, alexz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description alexz 2006-06-09 23:25:09 UTC
Was trying to get code completion to work with JDK 1.4.2.  Installed (unzipped) 
1.4.2 docs into existing 1.4.2 base directory being used with NetBeans.  When 
restarted NB, got NullPointerException.  Details:

java.lang.NullPointerException
	at 
org.netbeans.modules.java.j2seplatform.J2SEPlatformModule.updateSourceLevel
(J2SEPlatformModule.java:60)
	at org.netbeans.modules.java.j2seplatform.J2SEPlatformModule.access$000
(J2SEPlatformModule.java:31)
	at org.netbeans.modules.java.j2seplatform.J2SEPlatformModule$1.run
(J2SEPlatformModule.java:46)
	at org.openide.util.Mutex.postRequest(Mutex.java:1113)
	at org.openide.util.Mutex.postWriteRequest(Mutex.java:483)
	at 
org.netbeans.modules.java.j2seplatform.J2SEPlatformModule.updateBuildProperties
(J2SEPlatformModule.java:41)
	at org.netbeans.modules.java.j2seplatform.J2SEPlatformModule.restored
(J2SEPlatformModule.java:36)
	at org.netbeans.core.startup.NbInstaller.loadCode(NbInstaller.java:360)
	at org.netbeans.core.startup.NbInstaller.load(NbInstaller.java:276)
	at org.netbeans.ModuleManager.enable(ModuleManager.java:898)
	at org.netbeans.core.startup.ModuleList.installNew(ModuleList.java:377)
	at org.netbeans.core.startup.ModuleList.trigger(ModuleList.java:311)
	at org.netbeans.core.startup.ModuleSystem.restore(ModuleSystem.java:244)
	at org.netbeans.core.startup.Main.getModuleSystem(Main.java:206)
	at org.netbeans.core.startup.Main.start(Main.java:377)
	at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:90)
[catch] at java.lang.Thread.run(Thread.java:534)
Comment 1 alexz 2006-06-09 23:27:13 UTC
Created attachment 30934 [details]
messages.log
Comment 2 alexz 2006-06-09 23:37:54 UTC
Now I'm unable to open any source files.  I get the window (with the file 
name 'tab'), but it's empty.

Also, after first start-up, my installed java platform had disappeared.  I've 
readded it, and it now remains, but I'm still unable to open any files.
Comment 3 alexz 2006-06-09 23:46:37 UTC
Created attachment 30936 [details]
Latest messages.log
Comment 4 Jiri Prox 2006-06-13 09:12:24 UTC
Please provide exact steps how did you added the javadoc?
Can you attach content of your ${userdir}/config/Services/Platforms directory?
BTW: Code completion should work w/o mounting javadoc.
Comment 5 alexz 2006-06-13 18:11:45 UTC
I added the Javadoc reference by:
<p>
- Downloading 1.4.2 docs zip and unzipping it into the 'docs' folder under my
JDK installation (I must not have installed the docs locally when I originally
installed the 1.4.2 JDK)
<p>
- Under 'Java platform manager', selected my existing 1.4.2 JDK, went to Javadoc
tab and added the newly-created docs folder
<p>
- In the same place, added the 'src' folder under the 'Source' tab and saved changed
<p>
- When restarted NB, got above error
<p>
I've since been able to get back to a working state by renaming my user profile
directory ('5.0') and restarting NB.  It now starts without exceptions, but, of
course I've lost all of my settings, environment customizations, etc.
<p>
Can this be related to this issue:
http://www.netbeans.org/servlets/ReadMsg?listName=nbusers&msgNo=69016
<p>
Seems to be related to the ampersand character inside one of the JD directories?
<p>
Is there a way to restore my editor settings without recreating them by hand
(I've saved off the original '5.0' directory)?
Comment 6 Jiri Prox 2006-06-14 08:57:01 UTC
It's duplicate of issue 72127. It should be fixed now.
If you have backup of your userdir you can return to it, just use -userdir
switch or copy it to default location.
To get around the platforms problem, delete
${userdir}/config/Services/Platforms, it contains secification of all java
platforms defined in IDE. 

*** This issue has been marked as a duplicate of 72127 ***
Comment 7 alexz 2006-06-14 18:12:35 UTC
I've downloaded and installed 5.5, but am still having some problems.

When I tried to rename my previous user dir with all of my settings back to 5.0 
and started 5.5, it prompted me to apply existing settings.  When I said 'yes', 
it game the NPE error again.  Where before it would just not display text in 
Java files when you tried to open them, now it gives more NPEs.  I'm attaching 
the log...

I'm also having some difficulty configuring my existing freeform project to use 
the 1.4.2 JDK.  Do I need to open a new issue for that?
Comment 8 alexz 2006-06-14 21:31:17 UTC
Created attachment 31060 [details]
Latest messages.log
Comment 9 alexz 2006-06-14 22:25:10 UTC
Created attachment 31061 [details]
This is the crash log when 'migrating' 5.0 settings to 5.5
Comment 10 Jiri Prox 2006-06-14 22:36:58 UTC
Did you delete ${userdir}/config/Services/Platforms directory before restoring
original userdir? We definitely need to investigate the files which are located
there. Can you attach them, please?
Regarding to new NPE see issue 75921, should be fixed in latest 5.5, if you have
newer version ant this exception occures, feel free to reopen.

For the last problem you've mentioned - opening new issuse would be fine, but at
first look in the issuezilla if there isn't already one filed. I can remember
there is an enhancement asking for such kind of configuration, but I cannot give
you the number right now. (shoud by in component/subcomponent java/freeform)
Comment 11 alexz 2006-06-15 23:44:12 UTC
Created attachment 31099 [details]
Contents of 'platforms' folder
Comment 12 Jiri Prox 2006-06-16 08:42:17 UTC
Your default_platform.xml file is corrupted. If you delete it your IDE should
start normaly. Is there any steps how to make IDE to currupt the default
platform file?
Comment 13 Max Sauer 2006-06-27 09:39:31 UTC
*** Issue 77890 has been marked as a duplicate of this issue. ***
Comment 14 Max Sauer 2006-06-27 09:41:34 UTC
*** Issue 78253 has been marked as a duplicate of this issue. ***
Comment 15 Lukas Hasik 2006-09-29 14:34:43 UTC
easily reproducible when importing 5.0 userdir.There has to be a Mobility Pack
for CDC platform registered in 5.0. Steps described in issue 76924.

the <a
href="http://www.netbeans.org/nonav/issues/showattachment.cgi/30618/messages.log">attachment
with exception</a>.
Comment 16 Tomas Zezula 2007-01-10 13:51:26 UTC
*** Issue 88385 has been marked as a duplicate of this issue. ***
Comment 17 Tomas Zezula 2007-02-16 15:41:56 UTC

*** This issue has been marked as a duplicate of 72127 ***