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 211733 - NullPointerException at org.eclipse.core.internal.runtime.ResourceTranslator.getResourceBundle
Summary: NullPointerException at org.eclipse.core.internal.runtime.ResourceTranslator....
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Netigso (show other bugs)
Version: 7.2
Hardware: All All
: P2 normal (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
: 211773 212823 212882 215389 (view as bug list)
Depends on: 211744
Blocks: 206468
  Show dependency tree
 
Reported: 2012-04-25 18:59 UTC by Jesse Glick
Modified: 2012-08-22 11:49 UTC (History)
7 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 187374


Attachments
stacktrace (3.08 KB, text/plain)
2012-04-25 19:00 UTC, Jesse Glick
Details
stacktrace (3.08 KB, text/plain)
2012-04-27 06:44 UTC, Tomas Mysik
Details
stacktrace (3.08 KB, text/plain)
2012-05-02 03:53 UTC, Tomas Mysik
Details
stacktrace (3.08 KB, text/plain)
2012-05-02 15:32 UTC, Jesse Glick
Details
stacktrace (3.08 KB, text/plain)
2012-05-05 14:23 UTC, Vladimir Voskresensky
Details
stacktrace (3.08 KB, text/plain)
2012-05-18 16:06 UTC, Vladimir Voskresensky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2012-04-25 18:59:56 UTC
Build: NetBeans IDE Dev (Build 20120425-03ec8561ca75)
VM: Java HotSpot(TM) Client VM, 22.1-b02, Java(TM) SE Runtime Environment, 1.7.0_03-b04
OS: Linux

Stacktrace: 
java.lang.NullPointerException
   at org.eclipse.core.internal.runtime.ResourceTranslator.getResourceBundle(ResourceTranslator.java:69)
   at org.eclipse.core.internal.runtime.ResourceTranslator.getResourceBundle(ResourceTranslator.java:61)
   at org.eclipse.core.internal.registry.osgi.EclipseBundleListener.addBundle(EclipseBundleListener.java:177)
   at org.eclipse.core.internal.registry.osgi.EclipseBundleListener.processBundles(EclipseBundleListener.java:90)
   at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.onStart(RegistryStrategyOSGI.java:224)
   at org.eclipse.core.internal.registry.ExtensionRegistry.<init>(ExtensionRegistry.java:725)
Comment 1 Jesse Glick 2012-04-25 19:00:02 UTC
Created attachment 118765 [details]
stacktrace
Comment 2 Marian Mirilovic 2012-04-26 11:40:14 UTC

*** This bug has been marked as a duplicate of bug 211773 ***
Comment 3 Tomas Mysik 2012-04-27 06:44:26 UTC
Created attachment 118848 [details]
stacktrace

ide just started
Comment 4 Marian Mirilovic 2012-04-27 10:54:10 UTC
Caused: org.osgi.framework.BundleException: Exception in org.eclipse.core.internal.registry.osgi.Activator.start() of bundle org.eclipse.equinox.registry.
Comment 5 Exceptions Reporter 2012-04-27 11:35:29 UTC
This bug already has 5 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=187374
Comment 6 Marian Mirilovic 2012-04-27 11:56:57 UTC
stopper for Beta
Comment 7 Jaroslav Tulach 2012-04-27 14:07:18 UTC
NPE because Activator.getDefault() returns null. The non-null return value is initialized in public void Activator.start(BundleContext context) - means the module probably have not activated successfully.
Comment 8 Jaroslav Tulach 2012-04-27 14:12:35 UTC
Consider possible similarity with bug 211744
Comment 9 Tomas Mysik 2012-05-02 03:53:29 UTC
Created attachment 118941 [details]
stacktrace

just started IDE
Comment 10 Jaroslav Tulach 2012-05-02 12:14:36 UTC
Probably duplicate of bug 211744.
Comment 11 Jesse Glick 2012-05-02 15:32:27 UTC
Created attachment 118980 [details]
stacktrace

Just restarted IDE after updating modulemanager module.
Comment 12 Jesse Glick 2012-05-02 15:34:09 UTC
Well I just encountered this running a build containing a353da65c6ed (attempted fix of bug #211744).
Comment 13 Jaroslav Tulach 2012-05-03 14:25:06 UTC
Need steps to reproduce.
Comment 14 Marian Mirilovic 2012-05-03 15:49:28 UTC
We have 9 reports in last week from 5 different people ... you simply can't close such bug worksforme ... let's move it out of NB 7.2 Beta stopper list
Comment 15 Vladimir Voskresensky 2012-05-05 14:23:51 UTC
Created attachment 119114 [details]
stacktrace

reopen IDE
Comment 16 Exceptions Reporter 2012-05-05 14:24:10 UTC
This bug already has 10 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=187374
Comment 17 Jesse Glick 2012-05-09 21:50:33 UTC
*** Bug 211773 has been marked as a duplicate of this bug. ***
Comment 18 Jesse Glick 2012-05-14 12:24:49 UTC
FWIW this happens to me most of the time when I start the IDE in my long-term userdir.
Comment 19 Vladimir Voskresensky 2012-05-18 16:06:06 UTC
Created attachment 119623 [details]
stacktrace

start IDE
Comment 20 Jaroslav Tulach 2012-05-23 15:43:10 UTC
*** Bug 212882 has been marked as a duplicate of this bug. ***
Comment 21 Jaroslav Tulach 2012-05-23 22:22:10 UTC
*** Bug 212823 has been marked as a duplicate of this bug. ***
Comment 22 Jaroslav Tulach 2012-05-30 10:33:07 UTC
(In reply to comment #18)
> FWIW this happens to me most of the time when I start the IDE in my long-term
> userdir.

Can this be caused by corrupted OSGi caches? When it appears, does it appear on next start as well? Or is it completely random? If it is repeatable does removing of $cachedir/netigso-bundles help? Thanks.
Comment 23 Tomas Mysik 2012-05-30 11:16:19 UTC
I can reliably reproduce if I clean & build a module (php.project in my case). The exception appears just once (on the first IDE start).
Comment 24 Jesse Glick 2012-05-30 20:10:21 UTC
(In reply to comment #22)
> is it completely random?

I am not sure I am able to reproduce at will; it does not happen in every IDE session.
Comment 25 Jesse Glick 2012-06-01 13:15:36 UTC
Seems to happen mostly (only?) after a change in module set (e.g. updates) that would have triggered rebuild of caches, and then does not happen after a "clean" restart. I can reproduce merely by turning some plugin on or off and then restarting; no need for it to be an OSGi bundle, or depend on one.

Removal of $cachedir/netigso-bundles before restart does not prevent the exception from occurring, nor indeed does using an entirely different cachedir.
Comment 26 Jaroslav Tulach 2012-06-07 11:02:43 UTC
Jesse, I can see there are various outdated modules present in your installation. Does this issue reproduce without them - e.g. with clean user directory? Btw. #213363 seems to be related to duplicated classes in the system, but I don't see anything like that in your case.
Comment 27 Jesse Glick 2012-06-07 15:53:37 UTC
(In reply to comment #26)
> there are various outdated modules present in your installation

Sorry, which modules are you referring to? I always run with recent dev builds, plus some contrib modules published on various dates.

> Does this issue reproduce without them - e.g. with clean user directory?

I am not aware of any way to reproduce in a clean user directory.
Comment 28 Jaroslav Tulach 2012-06-08 09:19:53 UTC
(In reply to comment #27)
> Sorry, which modules are you referring to? I always run with recent dev builds,
> plus some contrib modules published on various dates.

Those that print warnings into the log file about necessity to upgrade dependencies, using deprecated or ineffective APIs, etc.
Comment 29 Jesse Glick 2012-06-11 15:27:54 UTC
Finally found the trigger condition. My $userdir/config/Modules/*.xml for OSGi bundles, dating from Nov 29 2011, include

  <param name="startlevel">4</param>

If this is removed at least from org-eclipse-*.xml, the error disappears. Otherwise reproducible merely by starting IDE with a fresh cache dir.
Comment 30 Jaroslav Tulach 2012-06-12 11:26:14 UTC
Thanks a lot.

So this error is not going to affect 7.2 and it will disappear as soon as we upgrade to new version of org.eclipse libraries (as they have never spec versions and the config/Modules/*.xml) will not contain any startlevel informaton (as that has been removed soon after 7.1, commit 3a32c36b3bda, bug 206468).
Comment 31 Jesse Glick 2012-06-12 16:33:19 UTC
(In reply to comment #30)
> it will disappear as soon as we upgrade to new version of org.eclipse libraries

I do not think so. The NBM-installed ide/config/Modules/org-eclipse-*.xml already do not specify startlevel and are fine. The problem is with old $userdir/config/Modules/*.xml overrides, which AFAIK will continue to be loaded indefinitely regardless of library upgrades. You need to actively upgrade (or delete) the old userdir overrides.
Comment 32 Jesse Glick 2012-06-12 16:38:05 UTC
(In reply to comment #31)
> or delete

...which would be easier if we had implemented bug #213996, though too late for this issue.

May or may not affect people using a new userdir and importing settings; will definitely affect people using the old userdir. Maybe best for ModuleList to simply check for *.xml mentioning startlevel with an old timestamp (?!).
Comment 33 Jesse Glick 2012-06-12 16:39:48 UTC
Note that the affected config files are for bundles, which are all marked as autoloads, meaning that there is no reason for the userdir override to begin with; I am not sure why it was ever created, and it should be safe to delete. (i.e. FileObject.revert)
Comment 34 Jaroslav Tulach 2012-06-14 13:05:05 UTC
Adding warning into messages.log: ergonomics#e82a8bd96ae3
Comment 35 Jaroslav Tulach 2012-08-22 11:49:35 UTC
*** Bug 215389 has been marked as a duplicate of this bug. ***