Bug: Can't Refactor -> Move Classes

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug: Can't Refactor -> Move Classes

Hanh Nguyen

Hi,

 

I got this problem a few times. When I tried to Refactor -> Move Classes I got the exception below.

 

Annotation: Exception occurred in Request Processor

javax.jmi.reflect.InvalidObjectException: Object with MOFID 5F9FFB48-0834-11DA-95F9-0B4B0F12AA77:00000000000002C3 no longer exists.

            at org.netbeans.mdr.handlers.BaseObjectHandler._getDelegate(BaseObjectHandler.java:353)

            at org.netbeans.mdr.handlers.InstanceHandler.getInstanceDelegate(InstanceHandler.java:48)

            at org.netbeans.mdr.handlers.InstanceHandler._handleGet(InstanceHandler.java:193)

            at org.netbeans.jmi.javamodel.JavaClass$Impl.getName(Unknown Source)

            at org.netbeans.modules.javacore.jmiimpl.javamodel.JavaClassImpl.getSuperClass(JavaClassImpl.java:324)

            at org.netbeans.jmi.javamodel.JavaClass$Impl.getSuperClass(Unknown Source)

            at org.netbeans.modules.javacore.jmiimpl.javamodel.ParameterizedTypeImpl.getSuperClass(ParameterizedTypeImpl.java:219)

            at org.netbeans.jmi.javamodel.ParameterizedType$Impl.getSuperClass(Unknown Source)

            at org.netbeans.modules.javacore.parser.Scope.createMethodScopeImpl(Scope.java:239)

            at org.netbeans.modules.javacore.parser.Scope.createMethodScope(Scope.java:230)

            at org.netbeans.modules.javacore.parser.Scope.createMethodScopeImpl(Scope.java:247)

            at org.netbeans.modules.javacore.parser.Scope.createMethodScope(Scope.java:230)

            at org.netbeans.modules.javacore.parser.MDRParser.findMethod(MDRParser.java:2315)

            at org.netbeans.modules.javacore.parser.MDRParser.usesMethod(MDRParser.java:2469)

            at org.netbeans.modules.javacore.parser.MDRParser.processASTBody(MDRParser.java:1838)

            at org.netbeans.modules.javacore.parser.MDRParser.processASTBody(MDRParser.java:1649)

            at org.netbeans.modules.javacore.parser.MDRParser.processASTBody(MDRParser.java:1614)

            at org.netbeans.modules.javacore.parser.MDRParser.processASTBody(MDRParser.java:1581)

            at org.netbeans.modules.javacore.parser.MDRParser.enterBody(MDRParser.java:201)

            at org.netbeans.modules.javacore.parser.MDRParser.doAttribution(MDRParser.java:163)

            at org.netbeans.modules.javacore.parser.MDRParser.isVariableAccess(MDRParser.java:1016)

            at org.netbeans.modules.javacore.jmiimpl.javamodel.MetadataElement.getElementProxy(MetadataElement.java:569)

            at org.netbeans.modules.javacore.jmiimpl.javamodel.MetadataElement.createElement(MetadataElement.java:490)

            at org.netbeans.modules.javacore.jmiimpl.javamodel.MetadataElement.initOrCreate(MetadataElement.java:1000)

            at org.netbeans.modules.javacore.jmiimpl.javamodel.LocalVarDeclarationImpl.initChildren(LocalVarDeclarationImpl.java:108)

            at org.netbeans.modules.javacore.jmiimpl.javamodel.LocalVarDeclarationImpl.getAnnotations(LocalVarDeclarationImpl.java:90)

            at org.netbeans.modules.javacore.jmiimpl.javamodel.LocalVarDeclarationImpl.getChildren(LocalVarDeclarationImpl.java:97)

            at org.netbeans.modules.javacore.jmiimpl.javamodel.UsageFinder.getUsers(UsageFinder.java:167)

            at org.netbeans.modules.javacore.jmiimpl.javamodel.UsageFinder.getUsers(UsageFinder.java:167)

            at org.netbeans.modules.javacore.jmiimpl.javamodel.UsageFinder.getUsers(UsageFinder.java:167)

            at org.netbeans.modules.javacore.jmiimpl.javamodel.UsageFinder.getUsers(UsageFinder.java:167)

            at org.netbeans.modules.javacore.jmiimpl.javamodel.UsageFinder.getUsers(UsageFinder.java:167)

            at org.netbeans.modules.javacore.jmiimpl.javamodel.UsageFinder.getUsers(UsageFinder.java:149)

            at org.netbeans.modules.javacore.jmiimpl.javamodel.UsageFinder.access$200(UsageFinder.java:36)

            at org.netbeans.modules.javacore.jmiimpl.javamodel.UsageFinder$LazyIterator.findNext(UsageFinder.java:306)

            at org.netbeans.modules.javacore.jmiimpl.javamodel.UsageFinder$LazyIterator.hasNext(UsageFinder.java:336)

            at org.netbeans.modules.refactoring.plugins.MoveClassRefactoringPlugin.isAccessedByOriginalPackage(MoveClassRefactoringPlugin.java:665)

            at org.netbeans.modules.refactoring.plugins.MoveClassRefactoringPlugin.preCheck(MoveClassRefactoringPlugin.java:151)

            at org.netbeans.modules.refactoring.api.AbstractRefactoring.pluginsPreCheck(AbstractRefactoring.java:257)

            at org.netbeans.modules.refactoring.api.AbstractRefactoring.preCheck(AbstractRefactoring.java:111)

            at org.netbeans.modules.refactoring.spi.ui.ParametersPanel$8.run(ParametersPanel.java:419)

            at org.openide.util.Task.run(Task.java:189)

            at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:330)

[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:721)   

Reply | Threaded
Open this post in threaded view
|

Re: Bug: Can't Refactor -> Move Classes

John Lemcke
This is probably caused by the netbeans cache getting out of sync.
Try deleting the var/cache/mdrstorage directory in your netbeans userdir.

Have Fun,

John L.

Hanh Nguyen wrote:

> Hi,
>
>  
>
> I got this problem a few times. When I tried to Refactor -> Move Classes
> I got the exception below.
>
>  
>
> Annotation: Exception occurred in Request Processor
>
> javax.jmi.reflect.InvalidObjectException: Object with MOFID
> 5F9FFB48-0834-11DA-95F9-0B4B0F12AA77:00000000000002C3 no longer exists.
>
>             at
> org.netbeans.mdr.handlers.BaseObjectHandler._getDelegate(BaseObjectHandler.java:353)
>
>             at
> org.netbeans.mdr.handlers.InstanceHandler.getInstanceDelegate(InstanceHandler.java:48)
>
>             at
> org.netbeans.mdr.handlers.InstanceHandler._handleGet(InstanceHandler.java:193)
>
>             at org.netbeans.jmi.javamodel.JavaClass$Impl.getName(Unknown
> Source)
>
>             at
> org.netbeans.modules.javacore.jmiimpl.javamodel.JavaClassImpl.getSuperClass(JavaClassImpl.java:324)
>
>             at
> org.netbeans.jmi.javamodel.JavaClass$Impl.getSuperClass(Unknown Source)
>
>             at
> org.netbeans.modules.javacore.jmiimpl.javamodel.ParameterizedTypeImpl.getSuperClass(ParameterizedTypeImpl.java:219)
>
>             at
> org.netbeans.jmi.javamodel.ParameterizedType$Impl.getSuperClass(Unknown
> Source)
>
>             at
> org.netbeans.modules.javacore.parser.Scope.createMethodScopeImpl(Scope.java:239)
>
>             at
> org.netbeans.modules.javacore.parser.Scope.createMethodScope(Scope.java:230)
>
>             at
> org.netbeans.modules.javacore.parser.Scope.createMethodScopeImpl(Scope.java:247)
>
>             at
> org.netbeans.modules.javacore.parser.Scope.createMethodScope(Scope.java:230)
>
>             at
> org.netbeans.modules.javacore.parser.MDRParser.findMethod(MDRParser.java:2315)
>
>             at
> org.netbeans.modules.javacore.parser.MDRParser.usesMethod(MDRParser.java:2469)
>
>             at
> org.netbeans.modules.javacore.parser.MDRParser.processASTBody(MDRParser.java:1838)
>
>             at
> org.netbeans.modules.javacore.parser.MDRParser.processASTBody(MDRParser.java:1649)
>
>             at
> org.netbeans.modules.javacore.parser.MDRParser.processASTBody(MDRParser.java:1614)
>
>             at
> org.netbeans.modules.javacore.parser.MDRParser.processASTBody(MDRParser.java:1581)
>
>             at
> org.netbeans.modules.javacore.parser.MDRParser.enterBody(MDRParser.java:201)
>
>             at
> org.netbeans.modules.javacore.parser.MDRParser.doAttribution(MDRParser.java:163)
>
>             at
> org.netbeans.modules.javacore.parser.MDRParser.isVariableAccess(MDRParser.java:1016)
>
>             at
> org.netbeans.modules.javacore.jmiimpl.javamodel.MetadataElement.getElementProxy(MetadataElement.java:569)
>
>             at
> org.netbeans.modules.javacore.jmiimpl.javamodel.MetadataElement.createElement(MetadataElement.java:490)
>
>             at
> org.netbeans.modules.javacore.jmiimpl.javamodel.MetadataElement.initOrCreate(MetadataElement.java:1000)
>
>             at
> org.netbeans.modules.javacore.jmiimpl.javamodel.LocalVarDeclarationImpl.initChildren(LocalVarDeclarationImpl.java:108)
>
>             at
> org.netbeans.modules.javacore.jmiimpl.javamodel.LocalVarDeclarationImpl.getAnnotations(LocalVarDeclarationImpl.java:90)
>
>             at
> org.netbeans.modules.javacore.jmiimpl.javamodel.LocalVarDeclarationImpl.getChildren(LocalVarDeclarationImpl.java:97)
>
>             at
> org.netbeans.modules.javacore.jmiimpl.javamodel.UsageFinder.getUsers(UsageFinder.java:167)
>
>             at
> org.netbeans.modules.javacore.jmiimpl.javamodel.UsageFinder.getUsers(UsageFinder.java:167)
>
>             at
> org.netbeans.modules.javacore.jmiimpl.javamodel.UsageFinder.getUsers(UsageFinder.java:167)
>
>             at
> org.netbeans.modules.javacore.jmiimpl.javamodel.UsageFinder.getUsers(UsageFinder.java:167)
>
>             at
> org.netbeans.modules.javacore.jmiimpl.javamodel.UsageFinder.getUsers(UsageFinder.java:167)
>
>             at
> org.netbeans.modules.javacore.jmiimpl.javamodel.UsageFinder.getUsers(UsageFinder.java:149)
>
>             at
> org.netbeans.modules.javacore.jmiimpl.javamodel.UsageFinder.access$200(UsageFinder.java:36)
>
>             at
> org.netbeans.modules.javacore.jmiimpl.javamodel.UsageFinder$LazyIterator.findNext(UsageFinder.java:306)
>
>             at
> org.netbeans.modules.javacore.jmiimpl.javamodel.UsageFinder$LazyIterator.hasNext(UsageFinder.java:336)
>
>             at
> org.netbeans.modules.refactoring.plugins.MoveClassRefactoringPlugin.isAccessedByOriginalPackage(MoveClassRefactoringPlugin.java:665)
>
>             at
> org.netbeans.modules.refactoring.plugins.MoveClassRefactoringPlugin.preCheck(MoveClassRefactoringPlugin.java:151)
>
>             at
> org.netbeans.modules.refactoring.api.AbstractRefactoring.pluginsPreCheck(AbstractRefactoring.java:257)
>
>             at
> org.netbeans.modules.refactoring.api.AbstractRefactoring.preCheck(AbstractRefactoring.java:111)
>
>             at
> org.netbeans.modules.refactoring.spi.ui.ParametersPanel$8.run(ParametersPanel.java:419)
>
>             at org.openide.util.Task.run(Task.java:189)
>
>             at
> org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:330)
>
> [catch] at
> org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:721)    
>
>