在尝试通过Refactor推送Spring Roo代码时,Spring Tool Suite出现错误 - >推进。知道我做错了什么/忘了吗?
package net.javavideotutorials.example;
import javax.persistence.Entity;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.jpa.activerecord.RooJpaActiveRecord;
import org.springframework.roo.addon.tostring.RooToString;
@RooJavaBean
@RooToString
@RooJpaActiveRecord
public class Users {
private Long id;
private String username;
private String password;
}
请参阅日志文件:
!ENTRY org.eclipse.ltk.ui.refactoring 4 10000 2016-07-25 16:17:51.781 !MESSAGE内部错误 !堆栈0 java.lang.reflect.InvocationTargetException 在org.eclipse.jface.operation.ModalContext.run(ModalContext.java:398) 在org.eclipse.ltk.internal.ui.refactoring.RefactoringWizardDialog2.run(RefactoringWizardDialog2.java:319) 在org.eclipse.ltk.ui.refactoring.RefactoringWizard.internalPerformFinish(RefactoringWizard.java:636) 在org.eclipse.ltk.ui.refactoring.UserInputWizardPage.performFinish(UserInputWizardPage.java:145) 在org.eclipse.ltk.ui.refactoring.RefactoringWizard.performFinish(RefactoringWizard.java:710) 在org.eclipse.ltk.internal.ui.refactoring.RefactoringWizardDialog2.okPressed(RefactoringWizardDialog2.java:445) 在org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:466) 在org.eclipse.jface.dialogs.Dialog $ 2.widgetSelected(Dialog.java:618) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:249) 在org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) 在org.eclipse.swt.widgets.Display.sendEvent(Display.java:4410) 在org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) 在org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4228) 在org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3816) 在org.eclipse.jface.window.Window.runEventLoop(Window.java:818) 在org.eclipse.jface.window.Window.open(Window.java:794) 在org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation $ 1.run(RefactoringWizardOpenOperation.java:188) 在org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) 在org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation.run(RefactoringWizardOpenOperation.java:203) 在org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation.run(RefactoringWizardOpenOperation.java:122) at org.eclipse.ajdt.internal.ui.refactoring.PushInRefactoringAction.run(PushInRefactoringAction.java:84) 在org.eclipse.ajdt.internal.ui.refactoring.PushInRefactoringAction.run(PushInRefactoringAction.java:60) 在org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:247) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:565) at org.eclipse.jface.action.ActionContributionItem.lambda $ 4(ActionContributionItem.java:397) 在org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) 在org.eclipse.swt.widgets.Display.sendEvent(Display.java:4410) 在org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079) 在org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4228) 在org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3816) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine $ 4.run(PartRenderingEngine.java:1121) 在org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) 在org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022) 在org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150) 在org.eclipse.ui.internal.Workbench $ 5.run(Workbench.java:687) 在org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) 在org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:604) 在org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148) 在org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138) 在org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) 在org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) 在org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) 在org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) 在org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) 在org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673) 在org.eclipse.equinox.launcher.Main.basicRun(Main.java:610) 在org.eclipse.equinox.launcher.Main.run(Main.java:1519) 引起:java.lang.NullPointerException 在org.eclipse.jdt.core.dom.rewrite.ImportRewrite.addImport(ImportRewrite.java:707) 在org.eclipse.jdt.core.dom.rewrite.ImportRewrite.addImport(ImportRewrite.java:684) at org.eclipse.ajdt.internal.ui.refactoring.PushInRefactoring $ PerUnitInformation.rewriteImports(PushInRefactoring.java:150) 在org.eclipse.ajdt.internal.ui.refactoring.PushInRefactoring.checkFinalConditions(PushInRefactoring.java:336) 在org.eclipse.ltk.core.refactoring.CheckConditionsOperation.run(CheckConditionsOperation.java:83) 在org.eclipse.ltk.core.refactoring.CreateChangeOperation.run(CreateChangeOperation.java:119) 在org.eclipse.ltk.core.refactoring.PerformChangeOperation.run(PerformChangeOperation.java:207) 在org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2240) 在org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2267) 在org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:86) at org.eclipse.jface.operation.ModalContext $ ModalContextThread.run(ModalContext.java:119) 根异常: 显示java.lang.NullPointerException 在org.eclipse.jdt.core.dom.rewrite.ImportRewrite.addImport(ImportRewrite.java:707) 在org.eclipse.jdt.core.dom.rewrite.ImportRewrite.addImport(ImportRewrite.java:684) at org.eclipse.ajdt.internal.ui.refactoring.PushInRefactoring $ PerUnitInformation.rewriteImports(PushInRefactoring.java:150) 在org.eclipse.ajdt.internal.ui.refactoring.PushInRefactoring.checkFinalConditions(PushInRefactoring.java:336) 在org.eclipse.ltk.core.refactoring.CheckConditionsOperation.run(CheckConditionsOperation.java:83) 在org.eclipse.ltk.core.refactoring.CreateChangeOperation.run(CreateChangeOperation.java:119) 在org.eclipse.ltk.core.refactoring.PerformChangeOperation.run(PerformChangeOperation.java:207) 在org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2240) 在org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2267) 在org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:86) at org.eclipse.jface.operation.ModalContext $ ModalContextThread.run(ModalContext.java:119)