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 79645 - IllegalArgumentException (Child tree not found) while editing an EJB with annotations
Summary: IllegalArgumentException (Child tree not found) while editing an EJB with ann...
Status: RESOLVED DUPLICATE of bug 77872
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P2 blocker with 1 vote (vote)
Assignee: Daniel Prusa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-03 19:18 UTC by keithshep
Modified: 2007-09-26 09:14 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
The file being edited when the exception was thrown. (825 bytes, text/plain)
2006-07-03 19:21 UTC, keithshep
Details
Persistent bean I got a similar exception on. (6.70 KB, text/plain)
2006-07-22 00:30 UTC, keithshep
Details
Messages log for 2nd exception. (205.79 KB, text/plain)
2006-07-22 00:48 UTC, keithshep
Details

Note You need to log in before you can comment on or make changes to this bug.
Description keithshep 2006-07-03 19:18:34 UTC
Received the following exception while editing an EJB with an @Entity annotation.

java.lang.IllegalArgumentException: Child tree not found (type: 361 firstToken:
64 lastToken: 64 resource:
com/unifiedwebservices/humanresources/persistence/CompensationRulePersistentEjb.java)
	at org.netbeans.modules.javacore.parser.ASTProvider.findTree(ASTProvider.java:259)
	at org.netbeans.modules.javacore.parser.ASTProvider.findTree(ASTProvider.java:255)
	at org.netbeans.modules.javacore.parser.ASTProvider.findTree(ASTProvider.java:255)
	at org.netbeans.modules.javacore.parser.ASTProvider.findTree(ASTProvider.java:255)
	at org.netbeans.modules.javacore.parser.ASTProvider.findTree(ASTProvider.java:255)
	at org.netbeans.modules.javacore.parser.ASTProvider.findTree(ASTProvider.java:255)
	at org.netbeans.modules.javacore.parser.ASTProvider.findTree(ASTProvider.java:255)
	at
org.netbeans.modules.javacore.jmiimpl.javamodel.TransientElement.getASTree(TransientElement.java:71)
	at
org.netbeans.modules.javacore.jmiimpl.javamodel.MetadataElement.getPosition(MetadataElement.java:521)
	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)


I took a best guess at what componenet to enter the issue against. I chose the
j2ee editor component because it showed up in the stack.
Comment 1 keithshep 2006-07-03 19:21:15 UTC
Created attachment 31604 [details]
The file being edited when the exception was thrown.
Comment 2 Marek Fukala 2006-07-04 08:13:31 UTC
The stack goes from ejb hints provider, but I guess it is not the problem of the
code, it is more likely something broken in MDR. Kindly asking Dan Prusa for
evaluation of this issue and ccing Tomasz (hints owner).
Comment 3 Daniel Prusa 2006-07-12 15:00:35 UTC
This is a bug in javacore.
Keith, do you know the exact editing steps leading to the exception? I was not
able to reproduce it.
Comment 4 keithshep 2006-07-13 04:07:20 UTC
I don't remember all of the editing steps, but the exception occured after I
finished typing the @Id or @GeneratedValue annotation. I think I did the
CTRL+SPACE after typing the annotation so that the import would be added to the
source.
Comment 5 Jan Becicka 2006-07-13 09:09:35 UTC
This one should be investigated.
Comment 6 keithshep 2006-07-22 00:30:02 UTC
Created attachment 32108 [details]
Persistent bean I got a similar exception on.
Comment 7 keithshep 2006-07-22 00:33:43 UTC
This looks related. I got this exception using the keyboard shortcut to fix
imports on IdentityPersistentEjb.java. It was the first action I took after
leaving netbeans idle for about 1 hour:

java.lang.IllegalArgumentException: Annotation tree not found; resource:
com/unifiedwebservices/humanresources/persistence/IdentityPersistentEjb.java
	at
org.netbeans.modules.javacore.jmiimpl.javamodel.ArrayInitializationImpl.createElement(ArrayInitializationImpl.java:80)
	at
org.netbeans.modules.javacore.jmiimpl.javamodel.MetadataElement.createChildrenList(MetadataElement.java:435)
	at
org.netbeans.modules.javacore.jmiimpl.javamodel.MetadataElement.createChildrenList(MetadataElement.java:392)
	at
org.netbeans.modules.javacore.jmiimpl.javamodel.MetadataElement.createChildrenList(MetadataElement.java:387)
	at
org.netbeans.modules.javacore.jmiimpl.javamodel.ArrayInitializationImpl.initChildren(ArrayInitializationImpl.java:55)
	at
org.netbeans.modules.javacore.jmiimpl.javamodel.ArrayInitializationImpl.getElementValues(ArrayInitializationImpl.java:41)
	at org.netbeans.jmi.javamodel.ArrayInitialization$Impl.getElementValues(Unknown
Source)
	at
org.netbeans.modules.javacore.jmiimpl.javamodel.ArrayInitializationImpl.getChildren(ArrayInitializationImpl.java:47)
	at
org.netbeans.modules.editor.java.JavaFixAllImports.findPotentialClassNames(JavaFixAllImports.java:537)
	at
org.netbeans.modules.editor.java.JavaFixAllImports.findPotentialClassNames(JavaFixAllImports.java:595)
	at
org.netbeans.modules.editor.java.JavaFixAllImports.findPotentialClassNames(JavaFixAllImports.java:595)
	at
org.netbeans.modules.editor.java.JavaFixAllImports.findPotentialClassNames(JavaFixAllImports.java:595)
	at
org.netbeans.modules.editor.java.JavaFixAllImports.findPotentialClassNames(JavaFixAllImports.java:649)
	at
org.netbeans.modules.editor.java.JavaFixAllImports.addAllNeededImports(JavaFixAllImports.java:135)
	at
org.netbeans.modules.editor.java.JavaFixAllImports$1$1.run(JavaFixAllImports.java:81)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:493)
[catch] at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:926)
Comment 8 keithshep 2006-07-22 00:48:54 UTC
Created attachment 32109 [details]
Messages log for 2nd exception.
Comment 9 Daniel Prusa 2006-08-10 16:14:59 UTC
There were more IAE: Child tree not found (type: 361 ...) exceptions reported, I
will mark them as duplicates of this issue. Seems like this problem is
reproducible quite often, we should investigate which java code produces them.
There are also similar reports, but related to types other than 361, see issue
73935 and issue 70319.
Comment 10 Daniel Prusa 2006-08-10 16:26:10 UTC
Issue 77872 contains steps to reproduce, it would be better to have this one open.

*** This issue has been marked as a duplicate of 77872 ***
Comment 11 Quality Engineering 2007-09-20 12:05:42 UTC
Reorganization of java component