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: | Can not cast instance org.netbeans.modules.ide.ergonomics.debugger.AttachTypeProxy@49ea52ee registered in 'null' folder to interface org.netbeans.api.debugger.Properties$Initializer | ||
---|---|---|---|
Product: | ide | Reporter: | fleka <fleka> |
Component: | Features On Demand | Assignee: | Jaroslav Tulach <jtulach> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | chrislundin, davisn, emononen, esmithbss, issues, ivansidorkin, jblume, jiriprox, jpokorsky, jxt, kharezlak, mschovanek, nityad, psuchomel, tprochazka, vv159170 |
Priority: | P1 | Keywords: | THREAD |
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
URL: | http://statistics.netbeans.org/exceptions/detail.do?id=146918 | ||
Issue Type: | DEFECT | Exception Reporter: | 146918 |
Bug Depends on: | 159663 | ||
Bug Blocks: | |||
Attachments: |
stacktrace
stacktrace stacktrace stacktrace stacktrace |
Description
fleka
2009-03-04 13:52:05 UTC
Created attachment 77717 [details]
stacktrace
*** Issue 159418 has been marked as a duplicate of this issue. *** Looks like some inconsistency of Lookups.forPath() during enabling of a lot of modules. It's not a deterministic bug, though it occurs very often. Build: NetBeans IDE Dev (Build 20090304130206) VM: Java HotSpot(TM) Client VM, 11.0-b16, Java(TM) SE Runtime Environment, 1.6.0_11-b03 OS: Linux, 2.6.24-23-generic, i386 User Comments: CCE exception when activating WebApplications while creating new project Stacktrace: java.lang.ClassCastException at java.lang.Class.cast(Class.java:2990) at org.netbeans.api.debugger.Lookup$MetaInf$MetaInfLookupList$LazyInstance.getEntry(Lookup.java:707) at org.netbeans.api.debugger.Lookup$LookupList$LookupLazyEntry.get(Lookup.java:808) at org.netbeans.api.debugger.LazyArrayList.get(LazyArrayList.java:158) at org.netbeans.api.debugger.LazyArrayList$Itr.next(LazyArrayList.java:215) at org.netbeans.api.debugger.Properties$PropertiesImpl$ServicesHolder.init(Properties.java:576) Created attachment 77750 [details]
stacktrace
Very visible bug -> P2. This should not be thrown after restart of NetBeans. The bug is triggered by installation of modules. Probably a race-condition in Lookups.forPath(). However, o.n.a.d.Lookup should be improved not to create so much refresh processes. Improved threading can hide the problem again. Build: NetBeans IDE Dev (Build 200903090201) VM: Java HotSpot(TM) Client VM, 1.5.0_16-133, Java(TM) 2 Runtime Environment, Standard Edition, 1.5.0_16-b06-284 OS: Mac OS X, 10.5.6, i386 User Comments: 1) create a new Depot sample app + activate Ruby fature 2) copy paste Views > store > index.rhtml Stacktrace: java.lang.NullPointerException at org.netbeans.api.debugger.Properties$PropertiesImpl$InitializerHolder.registerService(Properties.java:673) at org.netbeans.api.debugger.Properties$PropertiesImpl$InitializerHolder.registerService(Properties.java:664) at org.netbeans.api.debugger.Properties$PropertiesImpl$ServicesHolder.init(Properties.java:577) at org.netbeans.api.debugger.Properties$PropertiesImpl$ServicesHolder.find(Properties.java:608) at org.netbeans.api.debugger.Properties$PropertiesImpl.getInitialValue(Properties.java:696) at org.netbeans.api.debugger.Properties$PropertiesImpl.getArray(Properties.java:993) Created attachment 77903 [details]
stacktrace
why is it RANDOM? It is 100% reproducible. For instance: - start IDE with clean userdir - create any sample C++ project - open any C/C++ file of the project in editor I've marked this as random, because the nature of the bug is random. The fact that this happens in 90% of attempts does not mean that it's not random. The described steps: - start IDE with clean userdir - create any sample C++ project - open any C/C++ file of the project in editor probably point to a different problem, because the exception after these steps is thrown even after I get rid of the exception after activation of the Java EE plugin. The behavior should be better after the fix of issue #159663, though it's not fully fixed yet, the steps with C++ project still lead to the exception. Build: NetBeans IDE Dev (Build 090310) VM: Java HotSpot(TM) 64-Bit Server VM, 1.5.0_16-b02, Java(TM) 2 Runtime Environment, Standard Edition, 1.5.0_16-b02 OS: Linux, 2.6.27-11-generic, amd64 User Comments: Started up the IDE with one Java and a couple of Rails projects open. Stacktrace: java.lang.NullPointerException at org.netbeans.api.debugger.Properties$PropertiesImpl$InitializerHolder.registerService(Properties.java:673) at org.netbeans.api.debugger.Properties$PropertiesImpl$InitializerHolder.registerService(Properties.java:664) at org.netbeans.api.debugger.Properties$PropertiesImpl$ServicesHolder.init(Properties.java:577) at org.netbeans.api.debugger.Properties$PropertiesImpl$ServicesHolder.find(Properties.java:608) at org.netbeans.api.debugger.Properties$PropertiesImpl.getInitialValue(Properties.java:696) at org.netbeans.api.debugger.Properties$PropertiesImpl.getArray(Properties.java:993) Created attachment 78005 [details]
stacktrace
Build: NetBeans IDE Dev (Build 200903110259) 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: Just updated rails to 2.2.2 to match project. (Had earlier updated rubygems to 1.3.1) Attempting to generate controller and views for existing database table. Stacktrace: java.lang.NullPointerException at org.netbeans.api.debugger.Properties$PropertiesImpl$InitializerHolder.registerService(Properties.java:673) at org.netbeans.api.debugger.Properties$PropertiesImpl$InitializerHolder.registerService(Properties.java:664) at org.netbeans.api.debugger.Properties$PropertiesImpl$ServicesHolder.init(Properties.java:577) at org.netbeans.api.debugger.Properties$PropertiesImpl$ServicesHolder.find(Properties.java:608) at org.netbeans.api.debugger.Properties$PropertiesImpl.getInitialValue(Properties.java:696) at org.netbeans.api.debugger.Properties$PropertiesImpl.getArray(Properties.java:993) Created attachment 78097 [details]
stacktrace
http://statistics.netbeans.org/exceptions/detail.do?id=146918 it has already >50 duplicates and should be treated as P1 http://wiki.netbeans.org/BugPriorityGuidelines After debugging this problem for several hours, I've found that ergonomics is somehow duplicating generated layers. And it creates mistakes in this duplication! The problematic file is "ide.ergonomics/build/classes/org/netbeans/modules/ide/ergonomics/java/layer.xml" Which contains: <folder name="Debugger"><file name="org-netbeans-modules-debugger-jpda-ui-options-OptionsInitializer.instance"> <attr name="serviceName" stringvalue="org.netbeans.modules.debugger.jpda.ui.options.OptionsInitializer"/> <attr name="instanceOf" stringvalue="org.netbeans.api.debugger.Properties$Initializer"/> <attr name="instanceCreate" methodvalue="org.netbeans.modules.ide.ergonomics.debugger.AttachTypeProxy.create"/> </file> This is causing the problems. I can confirm that disabling ergonomic cluster eleminate the problem ergonomics#b70b78c72c9e I wish I could take away your pain. However I have not suspected it is registration error. If I got ClassCastException, I would investigate more deeply, but the NPE looked like something completely unrelated to what we do. Sorry. I have at least improved our code to fail more quickly with at least decent identification of the problem in future: ergonomics#4b29ea29328f Integrated into 'main-golden', will be available in build *200903170201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/4b29ea29328f User: Jaroslav Tulach <jtulach@netbeans.org> Log: #159608: Throwing exception when the fileobject seems to be misconfigured |