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 of main from 5/28/2009 ] 1. Register persistence provider library (I used EclipseLink). 2. Create new Java application, right-click Libraries node, add persistence provider library. 3. Create new class. 4. Before the class declaration insert "@Entity". Fix imports. The attached exception keeps occurring.
Created attachment 82935 [details] Stack trace
Sounds nasty - Tomas, can you please take a look? Thanks.
Looks like related to changes done for issue #158261.
According to Andrei's testing this apparently does not happen in release67. Andrei if I'm wrong please change the version back to 6.7 and rise the priority. Thanks CCing tzezula, Tomasi, have there been any changes recently in the way how classindex fires events? Thanks
Upgrading to P1 because the bug is reproducible in RC1 build 2009-05-28_22-43-49. The bug should be resolved in RC2.
No changes in this code during last month. The problem is still there and is a consequence of some other problems, unlike Scala the Java is not very well designed for writing concurrent applications. One of such a problem (probably not causing this) is directly in AnnotationModelHelper.runCallable(...) which sets a userActionTaskThread, but the unset is not done in the finally block directly following the set. What if the AnnotationModelHelper is called from the scheduled task which injects the user action task => the thread firing events == userActionTaskThread and this exception is thrown. This should be very hard to reproduce as this requires a race among action and event.
The question is: "Is the bug is assigned to the correct module?"
"This should be very hard to reproduce as this requires a race among action and event." - I witnessed Petr reproducing it without even trying. "Is the bug is assigned to the correct module?" - Maybe not, but at first it looked like a regression in P&I.
http://hg.netbeans.org/jet-main/rev/d2f97723c7b0 works around the problem. File index does not have to be invalidated when a file is modified, because it does not use any information from the file besides its name. Of course this does not solve the problem, because other indexes including java _are_ invalidated and so if somebody asked these indexes the situation would reappear. Anyway, the fix above seems to work in trunk and is safe enough to apply to release67, if needed. And I'm passing this back to j2ee/persistance as I tend to agree with what tzezula explained.
I will add assertions into the java module ensuring that the events are fired by the task processor dispatch thread.
We (Andei + me) also found another problem (now in the parsing API) which may cause these problems. I've added some asserts and under some cases I am able to violate event contract and fire even from non dispatching thread.
Added asserts: http://hg.netbeans.org/jet-main/rev/2323d863ad06
Integrated into 'main-golden', will be available in build *200905300201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/2323d863ad06 User: Tomas Zezula <tzezula@netbeans.org> Log: #166210:IOException when creating entity class from scratch
Tomas / Vita, this issue is considered as a stopper for RC2/FCS. Proceed with bugfix into release67 ASAP, thanks in advance.
The workaround (d2f97723c7b0) was transplanted to release67 clone as http://hg.netbeans.org/release67/rev/d16891a2f8aa.
There is a follow-up issue #166417 to fix this problem correctly.
verified in RC2 NetBeans IDE 6.7 RC2 (Build 200906042131)
*** Issue 165774 has been marked as a duplicate of this issue. ***