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.
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.
Created attachment 31604 [details] The file being edited when the exception was thrown.
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).
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.
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.
This one should be investigated.
Created attachment 32108 [details] Persistent bean I got a similar exception on.
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)
Created attachment 32109 [details] Messages log for 2nd exception.
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.
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 ***
Reorganization of java component