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.

Bug 75226 - Endless loop when using hints in Entity Class
Summary: Endless loop when using hints in Entity Class
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 5.x
Hardware: All All
: P1 blocker (vote)
Assignee: Daniel Prusa
URL:
Keywords:
: 75217 75458 75531 75545 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-04-19 13:34 UTC by Jan Horvath
Modified: 2007-09-26 09:14 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Horvath 2006-04-19 13:34:51 UTC
build 200604190200

-create EJB module
-create Entity class
-add this field: public Date date;
-after some time of using hints I get endless loop of exceptions:
java.lang.IllegalStateException: The model was modified. Unable to return start
offset.
	at
org.netbeans.modules.javacore.jmiimpl.javamodel.MetadataElement.testResourceChange(MetadataElement.java:1185)
	at
org.netbeans.modules.javacore.jmiimpl.javamodel.MetadataElement.getPosition(MetadataElement.java:519)
	at
org.netbeans.modules.javacore.jmiimpl.javamodel.ElementFinder.getElementByOffset(ElementFinder.java:37)
	at
org.netbeans.modules.javacore.jmiimpl.javamodel.ResourceImpl.getElementByOffset(ResourceImpl.java:1661)
	at
org.netbeans.modules.j2ee.ejbcore.hints.EjbHintsProvider.getHints(EjbHintsProvider.java:87)
	at
org.netbeans.modules.editor.hints.HintsOperator$HintPopupTaskImpl.run(HintsOperator.java:254)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:493)
[catch] at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:926)
Comment 1 Tomasz Slota 2006-04-24 12:39:41 UTC
This issue seems to be located in the JMI area: the cache becomes inconsistent
and the workaround is to clear it (by removing it from the user dir). After that
it is not easy to reproduce it (once reproduced it keeps on reoccuring though). 

I saw such exception coming also from the JEEVerificationHintsProvider.
Thus the "common divider" seems to be the IllegalStateException from
getElementByOffset() in a hints provider.

The bug is not easy to reproduce, but extremely trouble to the user once it
shows up. JMI team, please have a look at it.
Comment 2 Tomasz Slota 2006-04-25 08:11:19 UTC
*** Issue 75458 has been marked as a duplicate of this issue. ***
Comment 3 Jiri Kovalsky 2006-04-25 09:05:14 UTC
This issue is 100% reproducible. See step-by-step procedure in issue #75458.
Comment 4 Jiri Kovalsky 2006-04-25 09:06:26 UTC
This must be fixed as soon as possible. Increasing priority.
Comment 5 Tomasz Slota 2006-04-25 09:47:30 UTC
I am taking back my comment about cleaning the user dir. Daniel Prusa from the
JMI team is currently looking into this issue.
Comment 6 Daniel Prusa 2006-04-26 13:20:11 UTC
Fixed in release55 branch (will be merged into trunk).

/cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/AnnotationImpl.java
new revision: 1.19.4.5.2.3; previous revision: 1.19.4.5.2.2
Comment 7 Tomasz Slota 2006-04-26 14:14:51 UTC
*** Issue 75545 has been marked as a duplicate of this issue. ***
Comment 8 Daniel Prusa 2006-04-26 16:02:37 UTC
Merged into trunk.

/cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/AnnotationImpl.java
new revision: 1.32; previous revision: 1.31
Comment 9 Petr Blaha 2006-04-28 12:18:14 UTC
Please, merge the fix in release55_beta branch as well. Thanks.
Comment 10 Tomasz Slota 2006-04-28 12:31:54 UTC
Petre, the fix was commited into 'release55' branch before the branches were
split (Wed Apr 26 12:20:)
Comment 11 Tomasz Slota 2006-04-28 12:38:27 UTC
Petre, the fix was commited into 'release55' branch before the branches were
split (Wed Apr 26 12:20:)
Comment 12 Petr Blaha 2006-04-28 12:41:59 UTC
I'm sorry, my mistake. Thanks Tomas.
Comment 13 Jan Becicka 2006-05-04 14:57:15 UTC
*** Issue 75217 has been marked as a duplicate of this issue. ***
Comment 14 Jan Becicka 2006-05-23 10:03:03 UTC
*** Issue 75531 has been marked as a duplicate of this issue. ***
Comment 15 Jindrich Sedek 2006-06-27 17:16:58 UTC
Verified NetBeans 5.5Dev 200606270200
Comment 16 Quality Engineering 2007-09-20 09:49:30 UTC
Reorganization of java component