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 47148 - InvalidObjectException from ...ui.nodes.elements.ClassChildren after renaming
Summary: InvalidObjectException from ...ui.nodes.elements.ClassChildren after renaming
Status: CLOSED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 4.x
Hardware: PC Windows ME/2000
: P2 blocker (vote)
Assignee: Jan Pokorsky
URL:
Keywords:
: 49032 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-08-12 10:26 UTC by Jaromir Uhrik
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Ide.log attached... (11.50 KB, text/plain)
2004-09-14 12:53 UTC, Jaromir Uhrik
Details
Screenshot (30.16 KB, image/png)
2004-09-14 13:51 UTC, Jan Becicka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jaromir Uhrik 2004-08-12 10:26:39 UTC
[200408111800 - a; j2sdk1.5.0-beta3-b59]
1.Create project "a" (there will be "a" package
with "Main.java" in this project)
2.Refactor->Rename package "a"->"b"
3.Refactor->Rename class "Main"->"x"
This tree is contained in the project Source Packages:
--b
  --x
    --Main
      --Fields
...
(Sometimes node x has x child correctly - then
repeat steps 1-2 again to reproduce issue.)
Clicking on Fields node fires following exception

javax.jmi.reflect.InvalidObjectException: Object
with MOFID
C39197A6-EC3F-11D8-AB5E-996BEB61AA77:0000000000000B59
no longer exists.
	at
org.netbeans.mdr.handlers.BaseObjectHandler._getDelegate(BaseObjectHandler.java:322)
	at
org.netbeans.mdr.handlers.AttrImmutCollWrapper.getInnerCollection(AttrImmutCollWrapper.java:61)
	at
org.netbeans.mdr.handlers.AttrListWrapper.getInnerList(AttrListWrapper.java:35)
	at
org.netbeans.mdr.handlers.AttrListWrapper.listIterator(AttrListWrapper.java:62)
	at
org.netbeans.modules.javacore.jmiimpl.javamodel.LightAttrList.listIterator(LightAttrList.java:196)
	at
org.netbeans.modules.javacore.jmiimpl.javamodel.LightAttrList.listIterator(LightAttrList.java:213)
	at
org.netbeans.modules.javacore.jmiimpl.javamodel.LightAttrList.iterator(LightAttrList.java:209)
	at
org.netbeans.modules.javacore.jmiimpl.javamodel.FeaturesList.size(FeaturesList.java:56)
	at
org.netbeans.modules.java.ui.nodes.elements.ClassChildren.collectKeys(ClassChildren.java:233)
	at
org.netbeans.modules.java.ui.nodes.elements.ChildrenProvider.run(ChildrenProvider.java:82)
	at org.openide.util.Task.run(Task.java:136)
	at
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:330)
[catch] at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:686)
Comment 1 Jan Becicka 2004-08-12 11:01:29 UTC
Duplicate of issue 46208?
Comment 2 Jan Becicka 2004-08-12 13:12:01 UTC
Probably not. IOE is thrown form java.ui.nodes.
Comment 3 Jan Becicka 2004-08-12 14:37:22 UTC
Honzo, can you look at it please? It looks like ui nodes holds
element, that is no more valid:

ClassChildren.collectKeys() :
.
List features = element.getFeatures();
List members = new ArrayList(features.size());
.
}
But element.isValid() returns false...-> InvalidObjectException is thrown.
Comment 4 Jan Pokorsky 2004-09-08 17:23:03 UTC
fixed in

/cvs/java/src/org/netbeans/modules/java/ui/nodes/elements/ChildrenProvider.java
new revision: 1.5; previous revision: 1.4
/cvs/java/src/org/netbeans/modules/java/ui/nodes/elements/ClassChildren.java
new revision: 1.9; previous revision: 1.8
/cvs/java/src/org/netbeans/modules/java/ui/nodes/elements/SourceChildren.java
new revision: 1.7; previous revision: 1.6
Comment 5 Jaromir Uhrik 2004-09-14 08:25:46 UTC
I'm still able to reproduce in #200409131800; jdk1.5.0-rc-b63.
Comment 6 Jan Becicka 2004-09-14 09:22:54 UTC
The fix is probably only in trunk - not in beta2...?
Comment 7 Jaromir Uhrik 2004-09-14 09:33:43 UTC
The issue is reproducible only in trunk build, I am not able to
reproduce it in Beta2.
Comment 8 Jan Pokorsky 2004-09-14 11:37:49 UTC
Yes, it is fixed in the main trunk. No reason to guess, next see cvs
revisions or integration date.
Comment 9 Jaromir Uhrik 2004-09-14 12:51:25 UTC
!First ignore my last comment's part about Beta2!

I am able to reproduce following problems on trunk build
#200409131800; jdk1.5.0-rc-b63:
1.Create project "a" (there will be "a" package
with "Main.java" in this project)
2.Refactor->Rename package "a"->"b"
3.Refactor->Rename class "Main"->"x"
4.Refactor->Rename package "b"->"c"
5.Refactor->Rename class "x"->"y"
This tree is contained in the project Source Packages:
--c
  --y
    --x
      --Fields
Invoke popup menu on Fields node (and then move the mouse) fires
following exception:

javax.jmi.reflect.InvalidObjectException: Object with MOFID
704FCD46-0643-11D9-B40A-7954EFEAAA77:0000000000000622 no longer exists.
	at
org.netbeans.mdr.handlers.BaseObjectHandler._getDelegate(BaseObjectHandler.java:322)
	at
org.netbeans.mdr.handlers.InstanceHandler.getInstanceDelegate(InstanceHandler.java:48)
	at 
....

See attached ide.log for more.
Comment 10 Jaromir Uhrik 2004-09-14 12:53:42 UTC
Created attachment 17613 [details]
Ide.log attached...
Comment 11 Jan Pokorsky 2004-09-14 13:31:19 UTC
Then I have to close this as fixed again. According to the stack trace
you have provided it is a separate issue related to the refactoring
module and as such it should be treated. So please file a new issue
for the refactoring module.
Comment 12 Jan Becicka 2004-09-14 13:50:44 UTC
Exception Jara attached is already fixed, but the problem remains:
See attachment:
there is class "y" in the Editor, but Navigation View shows, that
there is class "Main" opened in the Editor and Projects View shows,
that there is class "x" in file "y.java".

But MDR database is up-to-date, because code completion correctly
shows, that there is only one class "y" in the packace "c".

Simply - Navigation View nodes and Projects View nodes holds objects,
which are not valid.
Comment 13 Jan Becicka 2004-09-14 13:51:49 UTC
Created attachment 17618 [details]
Screenshot
Comment 14 Jan Pokorsky 2004-09-15 15:35:12 UTC
I get it. SourceChildren has to keep track of the resource identity to
prevent IOE.

/cvs/java/src/org/netbeans/modules/java/ui/nodes/elements/SourceChildren.java
new revision: 1.9; previous revision: 1.8
Comment 15 Jan Pokorsky 2004-09-15 17:23:48 UTC
merged to release40_beta2

/cvs/java/src/org/netbeans/modules/java/ui/nodes/elements/ChildrenProvider.java
new revision: 1.4.4.1; previous revision: 1.4
/cvs/java/src/org/netbeans/modules/java/ui/nodes/elements/ClassChildren.java
new revision: 1.8.4.1; previous revision: 1.8
/cvs/java/src/org/netbeans/modules/java/ui/nodes/elements/SourceChildren.java
new revision: 1.6.4.1; previous revision: 1.6
Comment 16 Jaromir Uhrik 2004-09-17 07:23:38 UTC
Verified in release40_beta2 build #200409160517; jdk1.5.0-rc-b63.
Comment 17 Jan Pokorsky 2004-09-17 15:16:32 UTC
*** Issue 49032 has been marked as a duplicate of this issue. ***