It's all about the answers!

Ask a question

Error refactoring without any details


Susan Hanson (1.6k2201194) | asked Dec 09 '14, 8:26 p.m.
 When I attempt to refactor a package or java file (in my case, a Participant), I get:
An exception has been caught while processing the refactoring 'Rename Package'.

Reason:
Exception does not provide a detail message

java.lang.NullPointerException

My RTC 4.0.5 Eclipse client log show:
!ENTRY org.eclipse.ltk.ui.refactoring 4 4 2014-12-09 20:23:59.900
!MESSAGE Exception does not provide a detail message
!STACK 0
java.lang.NullPointerException
at com.ibm.team.filesystem.rcp.core.internal.resources.MoveDeleteHook.moveResource(MoveDeleteHook.java:207)
at com.ibm.team.filesystem.rcp.core.internal.resources.MoveDeleteHook.moveFolder(MoveDeleteHook.java:181)
at org.eclipse.team.internal.core.MoveDeleteManager.moveFolder(MoveDeleteManager.java:100)
at org.eclipse.core.internal.resources.Resource.unprotectedMove(Resource.java:1976)
at org.eclipse.core.internal.resources.Resource.move(Resource.java:1600)
at org.eclipse.core.internal.resources.Resource.move(Resource.java:1561)
at org.eclipse.jdt.internal.core.CopyResourceElementsOperation.processPackageFragmentResource(CopyResourceElementsOperation.java:468)
at org.eclipse.jdt.internal.core.CopyResourceElementsOperation.processElement(CopyResourceElementsOperation.java:403)
at org.eclipse.jdt.internal.core.MultiOperation.processElements(MultiOperation.java:163)
at org.eclipse.jdt.internal.core.CopyResourceElementsOperation.processElements(CopyResourceElementsOperation.java:417)
at org.eclipse.jdt.internal.core.MultiOperation.executeOperation(MultiOperation.java:90)
at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:728)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:793)
at org.eclipse.jdt.internal.core.JavaModel.rename(JavaModel.java:285)
at org.eclipse.jdt.internal.core.PackageFragment.rename(PackageFragment.java:432)
at org.eclipse.jdt.internal.corext.refactoring.changes.RenamePackageChange.renamePackage(RenamePackageChange.java:212)
at org.eclipse.jdt.internal.corext.refactoring.changes.RenamePackageChange.doRename(RenamePackageChange.java:121)
at org.eclipse.jdt.internal.corext.refactoring.AbstractJavaElementRenameChange.perform(AbstractJavaElementRenameChange.java:89)
at org.eclipse.ltk.core.refactoring.CompositeChange.perform(CompositeChange.java:278)
at org.eclipse.jdt.internal.corext.refactoring.changes.DynamicValidationStateChange.access$0(DynamicValidationStateChange.java:1)
at org.eclipse.jdt.internal.corext.refactoring.changes.DynamicValidationStateChange$1.run(DynamicValidationStateChange.java:102)
at org.eclipse.jdt.internal.core.BatchOperation.executeOperation(BatchOperation.java:39)
at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:728)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:4887)
at org.eclipse.jdt.internal.corext.refactoring.changes.DynamicValidationStateChange.perform(DynamicValidationStateChange.java:105)
at org.eclipse.ltk.core.refactoring.CompositeChange.perform(CompositeChange.java:278)
at org.eclipse.ltk.core.refactoring.PerformChangeOperation$1.run(PerformChangeOperation.java:258)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
at org.eclipse.ltk.core.refactoring.PerformChangeOperation.executeChange(PerformChangeOperation.java:306)
at org.eclipse.ltk.internal.ui.refactoring.UIPerformChangeOperation.executeChange(UIPerformChangeOperation.java:92)
at org.eclipse.ltk.core.refactoring.PerformChangeOperation.run(PerformChangeOperation.java:218)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:87)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)


Is this a known bug? Is there a workaround or fix?

Susan

One answer



permanent link
Ralph Schoon (63.5k33646) | answered Dec 10 '14, 2:23 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Susan, I recently had the same thing. Whatever I did, this happened. I don't know why. I solved it by creating a new project and bringing my code over. It was a copy in the first place, so no harm done. I am not sure what the root cause was, but somehow the project was broken.

Comments
Susan Hanson commented Dec 10 '14, 4:40 a.m.

So this is how i got into this mess in the first place :-)  When I do a new plugin, I like to make a copy of a previous one and then refactor to rename the package and rename the java files.  The copy of the project works but refactor/rename of the package and java files fail.  So then I create a new package, create new files, copy/paste the contents.  Since my participants only have 2 java files, it isn't too painful, but it would be alot better if I could figure out why RTC is getting the NullPointerException and fix that part.  It is a brand new project (literally, just copied from an existing "working" project).


Ralph Schoon commented Dec 10 '14, 4:46 a.m. | edited Dec 10 '14, 4:47 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

I was unable to find the root cause of this and it was a lot more wasted time trying and complaining than just recreating the project 8)

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.