Eclipse重构失败 - >继续抛出异常!

时间:2011-03-15 04:30:02

标签: java eclipse web-applications refactoring

我正在使用Eclipse Helios,对于跨越多个文件的每次重构,它都明显失败了!什么都没发生。在检查日志时,这是我看到的错误:

!ENTRY org.eclipse.ltk.ui.refactoring 4 10000 2011-03-13 14:15:31.842
!MESSAGE Internal Error
!STACK 0

java.lang.reflect.InvocationTargetException
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:421)
at org.eclipse.ltk.internal.ui.refactoring.RefactoringWizardDialog2.run(RefactoringWizardDialog2.java:330)
at org.eclipse.ltk.ui.refactoring.RefactoringWizard.internalPerformFinish(RefactoringWizard.java:573)
at org.eclipse.ltk.ui.refactoring.UserInputWizardPage.performFinish(UserInputWizardPage.java:153)
at org.eclipse.jdt.internal.ui.refactoring.reorg.RenameTypeWizardInputPage.performFinish(RenameTypeWizardInputPage.java:144)
at org.eclipse.ltk.ui.refactoring.RefactoringWizard.performFinish(RefactoringWizard.java:646)
at org.eclipse.ltk.internal.ui.refactoring.RefactoringWizardDialog2.okPressed(RefactoringWizardDialog2.java:454)
at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:472)
at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation$1.run(RefactoringWizardOpenOperation.java:180)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation.run(RefactoringWizardOpenOperation.java:192)
at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation.run(RefactoringWizardOpenOperation.java:115)
at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate(RefactoringStarter.java:38)
at org.eclipse.jdt.internal.ui.refactoring.UserInterfaceStarter.activate(UserInterfaceStarter.java:62)
at org.eclipse.jdt.internal.ui.refactoring.reorg.RenameUserInterfaceStarter.activate(RenameUserInterfaceStarter.java:31)
at org.eclipse.jdt.ui.refactoring.RenameSupport.openDialog(RenameSupport.java:159)
at org.eclipse.jdt.ui.refactoring.RenameSupport.openDialog(RenameSupport.java:116)
at org.eclipse.jdt.internal.corext.refactoring.RefactoringExecutionStarter.startRenameRefactoring(RefactoringExecutionStarter.java:438)
at org.eclipse.jdt.internal.ui.refactoring.actions.RenameJavaElementAction.run(RenameJavaElementAction.java:203)
at org.eclipse.jdt.internal.ui.refactoring.actions.RenameJavaElementAction.run(RenameJavaElementAction.java:101)
at org.eclipse.jdt.ui.actions.RenameAction.run(RenameAction.java:108)
at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:274)
at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:250)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
Caused by: java.lang.NoClassDefFoundError: org/eclipse/jst/jsp/core/internal/java/search/JSPIndexManager
at org.eclipse.jst.jsp.core.internal.java.search.JSPSearchSupport.searchRunnable(JSPSearchSupport.java:424)
at org.eclipse.jst.jsp.core.internal.java.search.JSPSearchSupport.searchRunnable(JSPSearchSupport.java:349)
at org.eclipse.jst.jsp.ui.internal.java.refactoring.JSPRenameParticipant.createChangesFor(JSPRenameParticipant.java:215)
at org.eclipse.jst.jsp.ui.internal.java.refactoring.JSPRenameParticipant.createChange(JSPRenameParticipant.java:153)
at org.eclipse.ltk.core.refactoring.participants.ProcessorBasedRefactoring.createChange(ProcessorBasedRefactoring.java:308)
at org.eclipse.ltk.core.refactoring.CreateChangeOperation.run(CreateChangeOperation.java:124)
at org.eclipse.ltk.core.refactoring.PerformChangeOperation.run(PerformChangeOperation.java:209)
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)
Root exception:
java.lang.NoClassDefFoundError: org/eclipse/jst/jsp/core/internal/java/search/JSPIndexManager
at org.eclipse.jst.jsp.core.internal.java.search.JSPSearchSupport.searchRunnable(JSPSearchSupport.java:424)
at org.eclipse.jst.jsp.core.internal.java.search.JSPSearchSupport.searchRunnable(JSPSearchSupport.java:349)
at org.eclipse.jst.jsp.ui.internal.java.refactoring.JSPRenameParticipant.createChangesFor(JSPRenameParticipant.java:215)
at org.eclipse.jst.jsp.ui.internal.java.refactoring.JSPRenameParticipant.createChange(JSPRenameParticipant.java:153)
at org.eclipse.ltk.core.refactoring.participants.ProcessorBasedRefactoring.createChange(ProcessorBasedRefactoring.java:308)
at org.eclipse.ltk.core.refactoring.CreateChangeOperation.run(CreateChangeOperation.java:124)
at org.eclipse.ltk.core.refactoring.PerformChangeOperation.run(PerformChangeOperation.java:209)
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)

这个错误对我来说没有多大意义,能够导航甚至“尝试”修复它。对于文件/方法“本地”的重构,它似乎工作正常。我试过把这个拿出去,但只是惊呆了!我倾向于使用重构功能A LOT。我正在使用J2EE + Glassfish v3。我有freemarker,restlet和构建路径上的DBUtils的JAR。

有什么想法吗?有谁遇到(并修复:)这个问题??

提前致谢!

3 个答案:

答案 0 :(得分:2)

看起来像一个插件问题。根异常是,

Caused by: java.lang.NoClassDefFoundError: org/eclipse/jst/jsp/core/internal/java/search/JSPIndexManager

意味着找不到应该存在的某个类。你最近安装/删除了插件吗?你可能不得不重新安装eclipse。

答案 1 :(得分:2)

由于我只有2个插件,因此很容易找出问题所在。似乎JBoss和Glassfish插件之间存在依赖性冲突(在更新时也是如此)。删除JBoss插件(帮助> Eclipse MarketPlace>已安装 - 选择一个插件,单击“卸载”并选择其中的所有组件,然后单击“下一步/完成”)。

这似乎修复了重构而没有重新安装。感谢user654801将其指出为插件问题。否则就很难把它钉死了!

答案 2 :(得分:0)

我有同样的问题。我和Nupul一样解决它。

我禁用了J2EE标准工具,我不需要它们:

Eclipse Europa:

帮助 - > Sowtware更新 - >管理配置

禁用J2EE标准工具(JST)项目SDK