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.
[ self-compiled build from Jul 26 ] Just after pressing Finish in the Entity Classes from Database wizard I got the attached NPE. I can't reproduce it again.
Created attachment 32296 [details] Stack trace
This is odd, I suspect it is related to the latest changes in how dd events for JavaEE5 projects are sent to the connected server plugin (e.g. us) since the exception just started happening in the past day or so. What is happening is an old ModuleDDSupport instance is receiving a property change event after it has removed it's change listener and sent itself off to be garbage collected. I suspect this will most likely happen only with new projects (related to how sun-ejb-jar.xml is created, don't ask :)) I will put in some code to ignore events under these circumstances, which will alleviate the exception message. I will also see if I can understand what change allowed this sequence of events to occur in the first place. It seems someone is caching something somewhere or maybe there is a synchronization issue.
See issue 75156 - same trace (different line number due to age difference). So this has been around for a longer than I thought but recently became much less rare because I have seen a flurry of them myself today as well. For now, the NPE is fixed and in it's place a trace will be logged along with the event information. The event will be ignored, since it's been sent to a deleted but not yet garbage collected listener.
*** Issue 75156 has been marked as a duplicate of this issue. ***
Downgrading to P4, but keeping open so maybe I can later investigate the change in event flow that caused this anomaly. It should not cause any problems for users in the current state though.
Raising to P2. I stumbled upon an easily reproducible case last night my slow 2-cpu box at home. This turned out to be a very subtle and insidious bug in the DDBean->DConfigBean event code inherited from j2eeserver. For J2EE modules w/ two DDBeanRoots (web & ejb due to webservices.xml), two listeners were being created, one for each root, but saved to a single variable reference so only one could be removed. The one that remained was on the DDBeanRoot for the standard descriptor where the majority of the events come from. This also explains some other odd event behavior I'd observed in recent weeks. The fix is pretty easy, fortunately.
Fixed. http://serverplugins.netbeans.org/source/browse/serverplugins/sun/sunddui/src/org/netbeans/modules/j2ee/sun/share/config/ModuleDDSupport.java?r1=1.3.6.2.2.2&r2=1.3.6.2.2.3
*** Issue 86742 has been marked as a duplicate of this issue. ***