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.
Summary: | [68cat] NoClassDefFoundError: Could not initialize class org.netbeans.modules.profiler.actions.SelfSamplerAction | ||
---|---|---|---|
Product: | platform | Reporter: | Exceptions Reporter <exceptions_reporter> |
Component: | Module System | Assignee: | Jesse Glick <jglick> |
Status: | RESOLVED INCOMPLETE | ||
Severity: | normal | CC: | jtulach |
Priority: | P3 | Keywords: | ERGONOMICS |
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | 160088 |
Attachments: | stacktrace |
Description
Exceptions Reporter
2009-11-18 19:59:19 UTC
Created attachment 91302 [details]
stacktrace
Seems to be some problem between ergonomics, profiler, and exception reporter? According to following log: http://statistics.netbeans.org/exceptions/messageslog?id=303673 the profiler module is being enabled and is enabled at the end. However before that happens, the system finds file on disk referencing SelfSamplerAction and tried to instantiate it (which fails). I attribute this to the fact that platform first changes layers and only then updates system classloader. Reassigning to platform to first of all setup classloaders and only then update filesystems. The module system already does set up the system class loader before loading layers. Anyway the problem does not appear to be that SelfSamplerAction cannot be found in the system class loader (which would produce a simpler CNFE), but that it cannot be initialized: NoClassDefFoundError: Could not initialize class org.netbeans.modules.profiler.actions.SelfSamplerAction at java.lang.Class.forName0(Native Method) However this is not an ExceptionInInitializerError, nor is there any nested cause. In my experiments, the NCDFE means that was earlier an EIIE thrown: package ncdfe; public class Main { public static void main(String[] args) { try { System.out.println(Class.forName("ncdfe.Main$X")); } catch (Throwable t) { t.printStackTrace(); } try { System.out.println(Class.forName("ncdfe.Main$X")); } catch (Throwable t) { t.printStackTrace(); } } public static class X { static { if (X.class != null) { throw new NullPointerException("oops!"); } } } } => java.lang.ExceptionInInitializerError at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:169) at ncdfe.Main.main(Main.java:5) Caused by: java.lang.NullPointerException: oops! at ncdfe.Main$X.<clinit>(Main.java:18) ... 3 more java.lang.NoClassDefFoundError: Could not initialize class ncdfe.Main$X at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:169) at ncdfe.Main.main(Main.java:10) So this implies that something, somewhere, is catching and swallowing an EIIE caused by some problem in SelfSamplerAction.java's static initializers (which seem to call just NbBundle.getMessage and Logger.getLogger). I can try to make BinaryFS report EIIE's the same as NCDFE's and hope that this will cause the real problem to be reported: core-main #da1deaddae5c Integrated into 'main-golden', will be available in build *200912010200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/da1deaddae5c User: Jesse Glick <jglick@netbeans.org> Log: #177151: catch any LinkageError, not just NoClassDefFoundError. |