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 165772 - NoClassDefFoundError: Could not initialize class org.netbeans.api.project.ui.OpenProjects
Summary: NoClassDefFoundError: Could not initialize class org.netbeans.api.project.ui....
Status: RESOLVED INCOMPLETE
Alias: None
Product: platform
Classification: Unclassified
Component: Module System (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Petr Nejedly
URL: http://statistics.netbeans.org/except...
Keywords: ERGONOMICS
Depends on:
Blocks:
 
Reported: 2009-05-22 09:11 UTC by bokc
Modified: 2009-09-16 18:41 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 151617


Attachments
stacktrace (2.78 KB, text/plain)
2009-05-22 09:11 UTC, bokc
Details
stacktrace (2.78 KB, text/plain)
2009-08-04 05:06 UTC, saeed_z_f
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bokc 2009-05-22 09:11:26 UTC
This issue was originally marked as duplicate of issue 163587, that is already resolved. This issue is still valid, so this seems to be another issue, but it might be related.

Build: NetBeans IDE Dev (Build 200905220001)
VM: Java HotSpot(TM) Client VM, 11.2-b01, Java(TM) SE Runtime Environment, 1.6.0_12-b04
OS: Windows XP, 5.1, x86

User Comments:
bokc: add project windows



Stacktrace: 
java.lang.NoClassDefFoundError: Could not initialize class org.netbeans.api.project.ui.OpenProjects
        at org.netbeans.modules.project.ui.ProjectTab.<init>(ProjectTab.java:175)
        at org.netbeans.modules.project.ui.ProjectTab.<init>(ProjectTab.java:149)
        at org.netbeans.modules.project.ui.ProjectTab.getDefault(ProjectTab.java:284)
        at org.netbeans.modules.project.ui.ProjectTab.findDefault(ProjectTab.java:270)
        at org.netbeans.modules.project.ui.ProjectTabAction.actionPerformed(ProjectTabAction.java:76)
        at org.openide.awt.AlwaysEnabledAction.actionPerformed(AlwaysEnabledAction.java:115)
Comment 1 bokc 2009-05-22 09:11:37 UTC
Created attachment 82608 [details]
stacktrace
Comment 2 Milan Kubec 2009-05-25 09:06:30 UTC
Either problem in ergonomics or module system itself.
Comment 3 Jaroslav Tulach 2009-06-20 13:12:16 UTC
Not every bug you see is related to ergonomics. So reassigning back. I'll check the logs if I can be more helpful too.
Comment 4 Jaroslav Tulach 2009-06-20 13:17:02 UTC
I guess I can give you a hint: Look at
http://statistics.netbeans.org/exceptions/messageslog?id=206790
and seek for ExceptionInInitializerError. Then you'll know who to reassign to.

Next time inspect the message.log before passing to ergonomics or module system, please. It usually contains valuable 
information especially when dealing with almost unbelievable occurences of NoClassDefFoundErrors.
Comment 5 Milan Kubec 2009-07-24 14:49:17 UTC
Please evaluate.
Comment 6 saeed_z_f 2009-08-04 05:05:59 UTC
Build: NetBeans IDE 6.7.1 (Build 200907230233)
VM: Java HotSpot(TM) Client VM, 14.0-b16, Java(TM) SE Runtime Environment, 1.6.0_14-b08
OS: Windows XP, 5.1, x86

User Comments: 
I only unstall Netbeans 6.7 and then install Netbeans 6.7.1

Stacktrace: 
java.lang.NoClassDefFoundError: Could not initialize class org.netbeans.api.project.ui.OpenProjects
        at org.netbeans.modules.project.ui.ProjectTab.<init>(ProjectTab.java:175)
        at org.netbeans.modules.project.ui.ProjectTab.<init>(ProjectTab.java:149)
        at org.netbeans.modules.project.ui.ProjectTab.getDefault(ProjectTab.java:284)
        at org.netbeans.modules.project.ui.ProjectTab.findDefault(ProjectTab.java:270)
        at org.netbeans.modules.project.ui.ProjectTabAction.actionPerformed(ProjectTabAction.java:76)
        at org.openide.awt.AlwaysEnabledAction.actionPerformed(AlwaysEnabledAction.java:115)
Comment 7 saeed_z_f 2009-08-04 05:06:03 UTC
Created attachment 85737 [details]
stacktrace
Comment 8 Jan Lahoda 2009-08-20 09:58:44 UTC
Reassigning all moonko's java/source bugs to myself.
Comment 9 Jan Lahoda 2009-08-21 10:07:37 UTC
Sorry, but I am completely lost. The problem seems to be that ImageUtilities.loadImage(String) returns null for resource
"org/netbeans/modules/java/source/resources/icons/error-badge.gif" (see static initializer in ErrorAnnotator in
java.source). That resource certainly exists:
~/src/nb/working/java.source/src$ ls -l org/netbeans/modules/java/source/resources/icons/error-badge.gif
-rw-r--r-- 1 lahvac lahvac 327 2008-03-16 09:32 org/netbeans/modules/java/source/resources/icons/error-badge.gif
~/src/nb/working/java.source/build/classes$ ls -l org/netbeans/modules/java/source/resources/icons/error-badge.gif
-rw-r--r-- 1 lahvac lahvac 327 2009-08-20 17:53 org/netbeans/modules/java/source/resources/icons/error-badge.gif
Moreover, if the resource would not exist, the exception would be shown to everyone.

Either the ErrorAnnotator nor the image has been changed recently (compared to first report that was from build
200904240201):
~/src/nb/working$ hg log java.source/src/org/netbeans/modules/java/source/resources/icons/error-badge.gif
changeset:   64858:0f086eac0b5b
tag:         IMPORTED-FROM-CVS
user:        automation
date:        Sat Jan 26 05:58:37 2008 +0000
summary:     Import of binary files from CVS.
~/src/nb/working$ hg log -l 1 java.source/src/org/netbeans/modules/java/source/tasklist/ErrorAnnotator.java
changeset:   107773:e200fc424e81
user:        Jan Lahoda <jlahoda@netbeans.org>
date:        Tue Nov 18 14:07:30 2008 +0100
summary:     #145606: error badges for default packages.

So, this all seems to me like a random problem with classloading, possibly in connection with the famous class/resource
cache in the userdir and maybe enabling the modules on the fly.

Reporters could you please attach packed content of ${userdir}/var/cache/all-*.dat and also
${userdir}/var/log/messages.log when this happens to you? Thanks.

Passing to module system.
Comment 10 Jesse Glick 2009-08-21 16:25:08 UTC
Exception reporter already sent messages.log files. Not particularly helpful for diagnosis. Most likely
ergonomics-related as FoD is involved in both initial stack traces (FoDFileSystem.noAdditionalProjects is running before
modules have even been loaded), but I can hardly guess what is going on beyond that. Both reporters are also running
with a number of experimental modules any of which could be triggering issues. Reporters, try using a fresh IDE
installation.