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 68394 - java.lang.IllegalArgumentException: Child tree not found.
Summary: java.lang.IllegalArgumentException: Child tree not found.
Status: RESOLVED DUPLICATE of bug 63594
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 5.x
Hardware: PC All
: P2 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-09 15:57 UTC by luky
Modified: 2007-09-26 09:14 UTC (History)
0 users

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 luky 2005-11-09 15:57:41 UTC
Multiple java.lang.IllegalArgumentException: Child tree not found. exceptions 
are thrown in file which is incorrectly formatted. Stack trace:
java.lang.IllegalArgumentException: Child tree not found.
	at org.netbeans.modules.javacore.parser.ASTProvider.findTree(ASTProvider.
java:262)
	at org.netbeans.modules.javacore.parser.ElementInfo.
refreshASTree(ElementInfo.java:80)
	at org.netbeans.modules.javacore.jmiimpl.javamodel.MetadataElement.
getASTree(MetadataElement.java:998)
	at org.netbeans.modules.javacore.jmiimpl.javamodel.MetadataElement.
getASTree(MetadataElement.java:509)
	at org.netbeans.modules.javacore.jmiimpl.javamodel.MetadataElement.
getPosition(MetadataElement.java:515)
	at org.netbeans.modules.javacore.jmiimpl.javamodel.FeatureImpl.
getPosition(FeatureImpl.java:280)
	at org.netbeans.modules.javacore.jmiimpl.javamodel.ElementFinder.
getElementByOffset(ElementFinder.java:37)
	at org.netbeans.modules.javacore.jmiimpl.javamodel.ResourceImpl.
getElementByOffset(ResourceImpl.java:1640)
	at org.netbeans.modules.java.hints.JavaHintsProvider.
getHints(JavaHintsProvider.java:121)
	at org.netbeans.modules.editor.hints.HintsOperator$HintPopupTaskImpl.
run(HintsOperator.java:233)
	at org.openide.util.Task.run(Task.java:207)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:469)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.
java:870)

Java file which cause this exception is here:
/*
 * HelloMidlet.java
 *
 * Created on 04 November 2005, 15:04
 */

package hello;

import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;

/**
 *
 * @author lukas
 */
public class HelloMidlet extends MIDlet implements javax.microedition.lcdui.
CommandListener
{
    
    /** Creates a new instance of HelloMidlet */
    public HelloMidlet()
    {
        initialize();
    }
    
    private javax.microedition.lcdui.Form helloForm;//GEN-BEGIN:MVDFields
    private javax.microedition.lcdui.StringItem helloStringItem;
    private javax.microedition.lcdui.Command exitCommand;//GEN-END:MVDFields
    
    /** This method initializes UI of the application.//GEN-BEGIN:MVDMethods
     */
    private void initialize()
    {
        getDisplay().setCurrent(get_helloForm());
    }//GEN-END:MVDMethods
    
    /** Called by the system to indicate that a command has been invoked on a 
particular displayable.//GEN-BEGIN:MVDCABegin
     * @param command the Command that ws invoked
     * @param displayable the Displayable on which the command was invoked
     */
    public void commandAction(javax.microedition.lcdui.Command command, javax.
microedition.lcdui.Displayable displayable)
    {//GEN-END:MVDCABegin
    {
        // Insert global pre-action code here
        if (displayable == helloForm)//GEN-BEGIN:MVDCABody
        {
            if (command == exitCommand)
            {//GEN-END:MVDCABody
            {
                // Insert pre-action code here
                exitMIDlet();//GEN-LINE:MVDCAAction3
                // Insert post-action code here
            }//GEN-BEGIN:MVDCACase3
            }//GEN-END:MVDCACase3
        // Insert global post-action code here
    }//GEN-LINE:MVDCAEnd
    
    /**
     * This method should return an instance of the display.
     */
    public javax.microedition.lcdui.Display getDisplay () {//GEN-FIRST:
MVDGetDisplay
    {
        return javax.microedition.lcdui.Display.getDisplay(this);
    }//GEN-LAST:MVDGetDisplay
    
    /**
     * This method should exit the midlet.
     */
    public void exitMIDlet () {//GEN-FIRST:MVDExitMidlet
    {
        getDisplay().setCurrent(null);
        destroyApp(true);
        notifyDestroyed();
    }//GEN-LAST:MVDExitMidlet
    
    /** This method returns instance for helloForm component and should be 
called instead of accessing helloForm field directly.//GEN-BEGIN:MVDGetBegin2
     * @return Instance for helloForm component
     */
    public javax.microedition.lcdui.Form get_helloForm()
    {
        if (helloForm == null)
        {//GEN-END:MVDGetBegin2
        {
            // Insert pre-init code here
            helloForm = new javax.microedition.lcdui.Form(null, new javax.
microedition.lcdui.Item[] {get_helloStringItem()});//GEN-BEGIN:MVDGetInit2
            helloForm.addCommand(get_exitCommand());
            helloForm.setCommandListener(this);//GEN-END:MVDGetInit2
            // Insert post-init code here
        }//GEN-BEGIN:MVDGetEnd2
        return helloForm;
        }//GEN-END:MVDGetEnd2
    
        /** This method returns instance for helloStringItem component and 
should be called instead of accessing helloStringItem field directly.//GEN-
BEGIN:MVDGetBegin4
         * @return Instance for helloStringItem component
         */
        public javax.microedition.lcdui.StringItem get_helloStringItem()
        {
            if (helloStringItem == null)
            {//GEN-END:MVDGetBegin4
        {
            // Insert pre-init code here
            helloStringItem = new javax.microedition.lcdui.StringItem("Hello", 
"Hello, World!");//GEN-LINE:MVDGetInit4
            // Insert post-init code here
        }//GEN-BEGIN:MVDGetEnd4
        return helloStringItem;
            }//GEN-END:MVDGetEnd4
    
            /** This method returns instance for exitCommand component and 
should be called instead of accessing exitCommand field directly.//GEN-BEGIN:
MVDGetBegin5
             * @return Instance for exitCommand component
             */
            public javax.microedition.lcdui.Command get_exitCommand()
            {
                if (exitCommand == null)
                {//GEN-END:MVDGetBegin5
        {
            // Insert pre-init code here
            exitCommand = new javax.microedition.lcdui.Command("Exit", javax.
microedition.lcdui.Command.EXIT, 1);//GEN-LINE:MVDGetInit5
            // Insert post-init code here
        }//GEN-BEGIN:MVDGetEnd5
        return exitCommand;
                }//GEN-END:MVDGetEnd5
    
    public void startApp()
    {
    }
    
    public void pauseApp()
    {
    }
    
    public void destroyApp(boolean unconditional)
    {
    }
    
}
Comment 1 Pavel Buzek 2005-11-09 16:00:25 UTC
What build number is this? Similar issue was reported in past. Thanks.
Comment 2 Petr Blaha 2005-11-09 16:03:03 UTC
Hi reporter, please don't paste stack trace and code in comments, attach this
info as attachement next. Can you write detailed steps to reproducing the issue?
It seems that it's not related to j2ee area but to mobile.
Comment 3 luky 2005-11-09 16:10:35 UTC
Version is 5.0 beta downloaded from netbeans website
Reproducing the bug should be simple, just create a file with the same contents 
as is in my post and try to open in netbeans java editor.
Comment 4 luky 2005-11-09 16:12:19 UTC
And BTW there is no attach option in issuezilla, when you are creating new issue
 :(
Comment 5 Petr Blaha 2005-11-09 16:17:23 UTC
When you submit new issue, on next page is link 'Create a new attachement'.
Please, use it for attaching screenshots, stack traces and code snapshots. Thanks
Comment 6 Pavel Buzek 2005-11-09 16:34:30 UTC
not related to j2ee, please evaluate
Comment 7 Jan Becicka 2005-11-09 16:37:42 UTC

*** This issue has been marked as a duplicate of 63594 ***