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 156864 - IllegalStateException: The data object C:\Documents and Settings\Tim Boudreau\My Documents\NetBeansProjects\CdcApplication1\src\cdcapplication1\Main.java is invalid; you may not call getNodeDelegate o
Summary: IllegalStateException: The data object C:\Documents and Settings\Tim Boudreau...
Status: RESOLVED DUPLICATE of bug 153008
Alias: None
Product: platform
Classification: Unclassified
Component: Data Systems (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P3 blocker (vote)
Assignee: Jiri Skrivanek
URL: http://statistics.netbeans.org/except...
Keywords:
: 149746 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-01-15 10:50 UTC by Ivan Sidorkin
Modified: 2009-07-28 15:10 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 145187


Attachments
stacktrace (1.45 KB, text/plain)
2009-02-18 13:25 UTC, Andrei Chistiakov
Details
stacktrace (1.45 KB, text/plain)
2009-02-24 09:49 UTC, Andrei Chistiakov
Details
stacktrace (1.45 KB, text/plain)
2009-03-02 23:40 UTC, Exceptions Reporter
Details
stacktrace (1.41 KB, text/plain)
2009-03-19 11:56 UTC, Andrei Chistiakov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Sidorkin 2009-01-15 10:50:15 UTC
Build: NetBeans IDE Dev (Build 090112)
VM: Java HotSpot(TM) Server VM, 11.0-b15, Java(TM) SE Runtime Environment, 1.6.0_10-b33
OS: Windows XP, 5.1, x86
User comments: Start today's build on a fresh userdir.  Install the CDC toolkit.  Create a new CDC Application from
template.  The following exception is thrown, even though the file in the stack trace exists and is opened in the editor.

Perhaps some race condition in Data Loaders, i.e. recognized first by Java DL then as form?
STACKTRACE: (first 10 lines)
java.lang.IllegalStateException: The data object C:\Documents and Settings\Tim Boudreau\My
Documents\NetBeansProjects\CdcApplication1\src\cdcapplication1\Main.java is invalid; you may not call getNodeDelegate on
it any more; see #17020 and please fix your code
        at org.openide.loaders.DataObject.getNodeDelegate(DataObject.java:270)
        at org.netbeans.modules.project.ui.ProjectUtilities$3.run(ProjectUtilities.java:267)
        at org.openide.util.Mutex.doEvent(Mutex.java:1335)
        at org.openide.util.Mutex.writeAccess(Mutex.java:452)
        at org.netbeans.modules.project.ui.ProjectUtilities.openAndSelectNewObject(ProjectUtilities.java:265)
        at org.netbeans.modules.project.ui.actions.NewProject$2.run(NewProject.java:227)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
        at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:104)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
Comment 1 _ tboudreau 2009-01-15 15:19:25 UTC
Seems to be 100% reproducible.
Comment 2 Andrei Chistiakov 2009-02-18 13:25:46 UTC
Build: NetBeans IDE Dev (Build 200902180201)
VM: Java HotSpot(TM) Client VM, 11.2-b01, Java(TM) SE Runtime Environment, 1.6.0_12-b04
OS: Windows XP, 5.1, x86

User Comments: 
created a new CDC Application.

Stacktrace: 
java.lang.IllegalStateException: The data object C:\Documents and Settings\cay\My Documents\NetBeansProjects\CdcApplication1\src\cdcapplication1\Main.java is invalid; you may not call getNodeDelegate on it any more; see #17020 and please fix your code
        at org.openide.loaders.DataObject.getNodeDelegate(DataObject.java:270)
        at org.netbeans.modules.project.ui.ProjectUtilities$3.run(ProjectUtilities.java:272)
        at org.openide.util.Mutex.doEvent(Mutex.java:1335)
        at org.openide.util.Mutex.writeAccess(Mutex.java:452)
        at org.netbeans.modules.project.ui.ProjectUtilities.openAndSelectNewObject(ProjectUtilities.java:270)
        at org.netbeans.modules.project.ui.actions.NewProject$2.run(NewProject.java:227)
Comment 3 Andrei Chistiakov 2009-02-18 13:25:55 UTC
Created attachment 77099 [details]
stacktrace
Comment 4 Andrei Chistiakov 2009-02-24 09:49:02 UTC
Build: NetBeans IDE Dev (Build 200902231810)
VM: Java HotSpot(TM) Client VM, 11.2-b01, Java(TM) SE Runtime Environment, 1.6.0_12-b04
OS: Windows XP, 5.1, x86

User Comments: 
created a new Mibile Application

Stacktrace: 
java.lang.IllegalStateException: The data object C:\Documents and Settings\cay\My Documents\NetBeansProjects\MobileApplication3\src\hello\HelloMIDlet.java is invalid; you may not call getNodeDelegate on it any more; see #17020 and please fix your code
        at org.openide.loaders.DataObject.getNodeDelegate(DataObject.java:270)
        at org.netbeans.modules.project.ui.ProjectUtilities$3.run(ProjectUtilities.java:272)
        at org.openide.util.Mutex.doEvent(Mutex.java:1335)
        at org.openide.util.Mutex.writeAccess(Mutex.java:452)
        at org.netbeans.modules.project.ui.ProjectUtilities.openAndSelectNewObject(ProjectUtilities.java:270)
        at org.netbeans.modules.project.ui.actions.NewProject$2.run(NewProject.java:227)
Comment 5 Andrei Chistiakov 2009-02-24 09:49:06 UTC
Created attachment 77279 [details]
stacktrace
Comment 6 _ tboudreau 2009-02-25 17:54:06 UTC
Anybody looking into this?  This looks like some sort of race condition - the FileObject *is* and the DataObject for it
is returned from the new project wizard, but then the code that tries to open it sees an invalid DataObject for it.  But
the file does exist.

Looking at the code path from a DataObject's constructor in DataObjectPool and DataObjectPool.Item, I wonder if this
(from DataObjectPool.Item) could be the culprit - this is the code that is deciding the DataObject is invalid:
       public boolean isValid () {
            if (getPOOL().map.get (primaryFile) == this) {
                return primaryFile.isValid();
            } else {
                return false;
            }
        }


Possibilities:  Two threads simultaneously register the same DataObject (i.e. enter the constructor for a DO for the
same FileObject at the same time - it is probably possible without an exception if the timing is right).  Whichever one
gets there first could causes the if-test to fail for the other to fail.

My point here is that the primary file is valid, so the problem is probably in the registration code (which has caused
problems in the distant past, since it runs in the superclass constructor, and registers the DO before the subclass
constructor has completed).  In other words, there is already another DataObjectPool.Item registered for this FileObject.
Comment 7 Exceptions Reporter 2009-03-02 23:40:48 UTC
Build: NetBeans IDE Dev (Build 200902231810)
VM: Java HotSpot(TM) Client VM, 11.2-b01, Java(TM) SE Runtime Environment, 1.6.0_12-b04
OS: Windows XP, 5.1, x86

User Comments: 


Stacktrace: 
java.lang.IllegalStateException: The data object C:\Documents and Settings\wassim\My Documents\tutorial\MobileApplication4\src\hello\HelloMIDlet.java is invalid; you may not call getNodeDelegate on it any more; see #17020 and please fix your code
        at org.openide.loaders.DataObject.getNodeDelegate(DataObject.java:270)
        at org.netbeans.modules.project.ui.ProjectUtilities$3.run(ProjectUtilities.java:272)
        at org.openide.util.Mutex.doEvent(Mutex.java:1335)
        at org.openide.util.Mutex.writeAccess(Mutex.java:452)
        at org.netbeans.modules.project.ui.ProjectUtilities.openAndSelectNewObject(ProjectUtilities.java:270)
        at org.netbeans.modules.project.ui.actions.NewProject$2.run(NewProject.java:227)
Comment 8 Exceptions Reporter 2009-03-02 23:40:53 UTC
Created attachment 77583 [details]
stacktrace
Comment 9 Andrei Chistiakov 2009-03-19 11:56:40 UTC
Build: NetBeans IDE Dev (Build 200903181604)
VM: Java HotSpot(TM) Client VM, 11.3-b02, Java(TM) SE Runtime Environment, 1.6.0_13-b02
OS: Windows XP, 5.1, x86

User Comments: 
created new Mobile Application

Stacktrace: 
java.lang.IllegalStateException: The data object C:\MyProjects\MobileApplication3\src\hello\HelloMIDlet.java is invalid; you may not call getNodeDelegate on it any more; see #17020 and please fix your code
        at org.openide.loaders.DataObject.getNodeDelegate(DataObject.java:270)
        at org.netbeans.modules.project.ui.ProjectUtilities$3.run(ProjectUtilities.java:272)
        at org.openide.util.Mutex.doEvent(Mutex.java:1335)
        at org.openide.util.Mutex.writeAccess(Mutex.java:452)
        at org.netbeans.modules.project.ui.ProjectUtilities.openAndSelectNewObject(ProjectUtilities.java:270)
        at org.netbeans.modules.project.ui.actions.NewProject$2.run(NewProject.java:227)
Comment 10 Andrei Chistiakov 2009-03-19 11:56:44 UTC
Created attachment 78439 [details]
stacktrace
Comment 11 Jiri Skrivanek 2009-04-10 11:09:30 UTC
*** Issue 149746 has been marked as a duplicate of this issue. ***
Comment 12 Milan Kubec 2009-04-21 14:58:39 UTC
Reassigning based on tboudreau's comment, please evaluate.
Comment 13 Jiri Skrivanek 2009-07-28 15:10:17 UTC

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