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 70725 - Exception when moving file between two projects, CC not functional
Summary: Exception when moving file between two projects, CC not functional
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 5.x
Hardware: Sun Solaris
: P3 blocker (vote)
Assignee: Daniel Prusa
URL:
Keywords: RANDOM
Depends on:
Blocks:
 
Reported: 2005-12-22 09:57 UTC by Max Sauer
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
exc.stack trace (1.15 KB, text/plain)
2005-12-22 10:11 UTC, Max Sauer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Max Sauer 2005-12-22 09:57:42 UTC
Following Exception is thrown when moving a java file from one project to another:
[org.netbeans.mdr.Logger] INFORMATIONAL *********** Exception occurred
************ at 10:37 AM on Dec 22, 2005
java.lang.Exception: mofId:
836E3C39-72CE-11DA-89D0-328B33E9AA77:0000000000000339, class:
org.netbeans.jmi.javamodel.Resource$Impl
        at
org.netbeans.mdr.handlers.InstanceHandler.refDelete(InstanceHandler.java:307)
        at
org.netbeans.modules.javacore.ExclusiveMutex.parseIfNeeded(ExclusiveMutex.java:233)
        at
org.netbeans.modules.javacore.ExclusiveMutex.enter(ExclusiveMutex.java:171)
        at
org.netbeans.mdr.NBMDRepositoryImpl.beginTrans(NBMDRepositoryImpl.java:228)

...
(whole stack trace attached)

Stesp to reproduce:
-------------------
1) Open/create two j2se projects
2) Inside one of them, add a new java class (ie 'SomeClass')
3) Using mouse drag inside Explorer, move it to the second project
4) Do Refactoring in appeared dialog
--> Exception thrown inside console
--> Also, CC seems to be broken inside moved class
5) Try to CC the class name (SomeClass) or some of its methods.
--> Does not work

[5.0 200512212030 && 5.1 200512211900, JDK 1.6.0 rc b62, solaris 10/sparc]
Comment 1 Max Sauer 2005-12-22 10:11:07 UTC
Created attachment 28032 [details]
exc.stack trace
Comment 2 Daniel Prusa 2005-12-22 11:55:39 UTC
This exception is informational only and does not necessary mean there was a
problem. It can occur when an InvalidObjectException is thrown after invoking
some jmi method and then correctly handled in the caller. I think this is
exactly what happened in the described scenario.

I am not able to reproduce the problem with CC. When I invoke CC inside the
project the class was moved to it works fine. In my case, SomeClass is not
offered by CC in the original project, but it is caused by the fact that there
is no dependency between these two projects. Was not that also your case?
Comment 3 Max Sauer 2005-12-23 09:56:08 UTC
> When I invoke CC inside the project the class was moved to it works fine

This is not true for me. The class name is offered when using CC in other
classes, but not when creating an object of this class in the same file (ie., in
the main method). 

-> P3, since the CC problem is present only inside of the moved file.
Comment 4 Daniel Prusa 2006-01-02 15:03:16 UTC
The problem occurs only sometimes.
If it occurs "go to declaration" action does not work inside the moved class as
well.
Comment 5 Jan Becicka 2006-10-26 16:27:15 UTC
Javacore module was replaced by Retouche infrastructure. This bug is not valid
in trunk any more.
Comment 6 Max Sauer 2006-10-30 09:23:29 UTC
Verified.
---
NetBeans IDE Dev (Build 061030)
1.6.0-rc; Java HotSpot(TM) Server VM 1.6.0-rc-b103
Linux version 2.6.12-1.1390_FC4smp running on i386
en_US (nb); UTF-8
Comment 7 Quality Engineering 2007-09-20 10:38:54 UTC
Reorganization of java component