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.
This issue was reported manually by alexvsimon. It already has 1 duplicates Build: NetBeans IDE 7.4 (Build 201310111528) VM: Java HotSpot(TM) 64-Bit Server VM, 24.45-b08, Java(TM) SE Runtime Environment, 1.7.0_45-b18 OS: Windows 8 User Comments: GUEST: does not work c/c++ modules under Windows 8.1 after update to 7.4 Patch 2 Stacktrace: java.lang.NoClassDefFoundError: Could not initialize class org.netbeans.modules.cnd.debugger.common2.debugger.NativeDebuggerManager$LazyInitializer at org.netbeans.modules.cnd.debugger.common2.debugger.NativeDebuggerManager$LazyInitializer.access$300(NativeDebuggerManager.java:187) at org.netbeans.modules.cnd.debugger.common2.debugger.NativeDebuggerManager.get(NativeDebuggerManager.java:205) at org.netbeans.modules.cnd.debugger.common2.debugger.actions.NativeActionsProvider.getDebugger(NativeActionsProvider.java:89) at org.netbeans.modules.cnd.debugger.common2.debugger.actions.NativeActionsProvider.<init>(NativeActionsProvider.java:65) at org.netbeans.modules.cnd.debugger.common2.debugger.actions.ToggleBreakpointActionProvider.<init>(ToggleBreakpointActionProvider.java:91) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(NativeConstructorAccessorImpl.java:0)
Created attachment 143964 [details] stacktrace
Will re-assign to updatecenter as in messages log there are a lot if NoClassDefFound for different modules. As a workaround please remove the userdir C:\Users\user.acme\AppData\Roaming\NetBeans\dev and cachedir C:\Users\user.acme\AppData\Local\NetBeans\Cache\dev and run IDE again.
Created attachment 145015 [details] stacktrace close main.cpp file
(In reply to Alexander Simon from comment #3) > Created attachment 145015 [details] > stacktrace > > close main.cpp file My steps were: - replace dev IDE - start IDE with old user dir - IDE have opened main.cpp file. Result: - exception report on start IDE - exception report on closing main.cpp
*** Bug 241704 has been marked as a duplicate of this bug. ***
(In reply to Maria Tishkova from comment #2) > Will re-assign to updatecenter as in messages log there are a lot if > NoClassDefFound for different modules. Perhaps Module System than Auto Update.
The first exception that I see in http://statistics.netbeans.org/exceptions/messageslog?id=711659 is CCEx which then causes ExceptionInInitializerError in CND - you need to avoid ExceptionInInitializerErrors Caused: java.lang.ClassCastException: Cannot cast org.netbeans.modules.debugger.jpda.projects.BreakpointAnnotationProvider to org.netbeans.api.debugger.LazyDebuggerManagerListener at java.lang.Class.cast(Class.java:3094) [catch] at org.netbeans.api.debugger.Lookup$MetaInf$MetaInfLookupList$LazyInstance.getEntry(Lookup.java:1144) at org.netbeans.api.debugger.Lookup$LookupList$LookupLazyEntry.get(Lookup.java:1296) at org.netbeans.api.debugger.LazyArrayList.get(LazyArrayList.java:161) at org.netbeans.api.debugger.DebuggerManager.refreshDebuggerManagerListeners(DebuggerManager.java:1527) at org.netbeans.api.debugger.DebuggerManager.initDebuggerManagerListeners(DebuggerManager.java:1504) at org.netbeans.api.debugger.DebuggerManager.initWatches(DebuggerManager.java:1243) at org.netbeans.api.debugger.DebuggerManager.getWatches(DebuggerManager.java:669) at org.netbeans.modules.cnd.debugger.common2.debugger.NativeDebuggerManager.getWatches(NativeDebuggerManager.java:1368) at org.netbeans.modules.cnd.debugger.common2.debugger.NativeDebuggerManager.watchBag(NativeDebuggerManager.java:1308) at org.netbeans.modules.cnd.debugger.common2.debugger.NativeDebuggerManager$LazyInitializer.<clinit>(NativeDebuggerManager.java:200) at org.netbeans.modules.cnd.debugger.common2.debugger.NativeDebuggerManager.get(NativeDebuggerManager.java:205) at org.netbeans.modules.cnd.debugger.common2.debugger.actions.EvaluateAction.<init>(EvaluateAction.java:67) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at org.openide.util.SharedClassObject.createInstancePrivileged(SharedClassObject.java:658) at org.openide.util.SharedClassObject$SetAccessibleAction.run(SharedClassObject.java:1018) at org.openide.util.SharedClassObject$SetAccessibleAction.run(SharedClassObject.java:1010) at java.security.AccessController.doPrivileged(Native Method) at org.openide.util.SharedClassObject.findObject(SharedClassObject.java:532) at org.openide.loaders.InstanceSupport.instanceCreate(InstanceSupport.java:217) at org.openide.loaders.InstanceDataObject$Ser.instanceCreate(InstanceDataObject.java:1442) at org.openide.loaders.InstanceDataObject.instanceCreate(InstanceDataObject.java:846) at org.netbeans.modules.editor.impl.ActionsList.convertImpl(ActionsList.java:147) at org.netbeans.modules.editor.impl.ActionsList.<init>(ActionsList.java:85) at org.netbeans.modules.editor.impl.PopupMenuActionsProvider.<init>(PopupMenuActionsProvider.java:76) at org.netbeans.modules.editor.impl.PopupMenuActionsProvider.createInstance(PopupMenuActionsProvider.java:80) at org.netbeans.modules.editor.impl.PopupMenuActionsProvider.createInstance(PopupMenuActionsProvider.java:60) at org.netbeans.modules.editor.mimelookup.impl.InstanceProviderLookup.rebuild(InstanceProviderLookup.java:90) at org.netbeans.modules.editor.mimelookup.impl.InstanceProviderLookup.initialize(InstanceProviderLookup.java:85) at org.openide.util.lookup.AbstractLookup.enterStorage(AbstractLookup.java:176) at org.openide.util.lookup.AbstractLookup.lookupItem(AbstractLookup.java:430) at org.openide.util.lookup.AbstractLookup.lookup(AbstractLookup.java:421) at org.openide.util.lookup.ProxyLookup.lookup(ProxyLookup.java:222) at org.netbeans.modules.editor.mimelookup.impl.SwitchLookup.lookup(SwitchLookup.java:90) at org.openide.util.lookup.ProxyLookup.lookup(ProxyLookup.java:222) at org.netbeans.modules.editor.impl.PopupMenuActionsProvider.getPopupMenuItems(PopupMenuActionsProvider.java:67) at org.netbeans.modules.editor.NbEditorKit.call(NbEditorKit.java:1320) at org.openide.text.CloneableEditorInitializer.initKit(CloneableEditorInitializer.java:492) at org.openide.text.CloneableEditorInitializer.run(CloneableEditorInitializer.java:338) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1423) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033) ALL [null]: Can not cast instance org.netbeans.modules.debugger.jpda.projects.BreakpointAnnotationProvider@3ee54aed registered in 'null' folder to interface org.netbeans.api.debugger.LazyDebuggerManagerListener. className = null, lookupItem = null INFO [org.netbeans.modules.editor.impl.ActionsList]: Can't instantiate object java.lang.NullPointerException at org.netbeans.api.debugger.DebuggerManager.refreshDebuggerManagerListeners(DebuggerManager.java:1529) at org.netbeans.api.debugger.DebuggerManager.initDebuggerManagerListeners(DebuggerManager.java:1504) at org.netbeans.api.debugger.DebuggerManager.initWatches(DebuggerManager.java:1243) at org.netbeans.api.debugger.DebuggerManager.getWatches(DebuggerManager.java:669) at org.netbeans.modules.cnd.debugger.common2.debugger.NativeDebuggerManager.getWatches(NativeDebuggerManager.java:1368) at org.netbeans.modules.cnd.debugger.common2.debugger.NativeDebuggerManager.watchBag(NativeDebuggerManager.java:1308) at org.netbeans.modules.cnd.debugger.common2.debugger.NativeDebuggerManager$LazyInitializer.<clinit>(NativeDebuggerManager.java:200) Caused: java.lang.ExceptionInInitializerError at org.netbeans.modules.cnd.debugger.common2.debugger.NativeDebuggerManager.get(NativeDebuggerManager.java:205) at org.netbeans.modules.cnd.debugger.common2.debugger.actions.EvaluateAction.<init>(EvaluateAction.java:67)
Sorry, I closed the bug as incomplete, as the steps to reproduce are not enough for me. Later I added the note about initializer errors. Now the bug is not really incomplete: reopening. Anyway it is probably sign of some debris in userdir. The only thing to do is to make your code more robust to not generate errors.
(In reply to Jaroslav Tulach from comment #8) > Sorry, I closed the bug as incomplete, as the steps to reproduce are not > enough for me. Later I added the note about initializer errors. Now the bug > is not really incomplete: reopening. > > Anyway it is probably sign of some debris in userdir. The only thing to do > is to make your code more robust to not generate errors. Why do you think it's CND issue then? The top of the stack is general debugging engine: Caused: java.lang.ClassCastException: Cannot cast org.netbeans.modules.debugger.jpda.projects.BreakpointAnnotationProvider to org.netbeans.api.debugger.LazyDebuggerManagerListener at java.lang.Class.cast(Class.java:3094) [catch] at org.netbeans.api.debugger.Lookup$MetaInf$MetaInfLookupList$LazyInstance.getEntry(Lookup.java:1144) at org.netbeans.api.debugger.Lookup$LookupList$LookupLazyEntry.get(Lookup.java:1296) at org.netbeans.api.debugger.LazyArrayList.get(LazyArrayList.java:161) at org.netbeans.api.debugger.DebuggerManager.refreshDebuggerManagerListeners(DebuggerManager.java:1527)
not sure how to prevent this, looks as if an instance of org.netbeans.modules.debugger.jpda.projects.BreakpointAnnotationProvider is registered as org.netbeans.api.debugger.LazyDebuggerManagerListener in layer, not sure. Debugger could potentially revive itself by simply logging the failed cast and check for null in the subsequent code (where the NPE is thrown right now).
This code was refactored. The new org.netbeans.modules.debugger.jpda.projectsui.BreakpointAnnotationProvider does not implement and is not registered as LazyDebuggerManagerListener.