2015-05-24 77 views
0

我正在關注this教程,以生成hbm和POJO文件,我堅持創建hibernate啓動配置。我能夠第一次以某種方式創建它,但之後我總是面臨錯誤 -Hibernate配置來創建hbm和POJO

Message: Problems occurred when invoking code from plug-in: "org.eclipse.jface". 

Exception Stack Trace: java.lang.NoClassDefFoundError: org/eclipse/jpt/jpa/core/JpaFacet 
at org.hibernate.eclipse.console.EclipseLaunchConsoleConfigurationPreferences.getProjectOverrides(EclipseLaunchConsoleConfigurationPreferences.java:228) 
at org.hibernate.eclipse.console.EclipseLaunchConsoleConfigurationPreferences.getProperties(EclipseLaunchConsoleConfigurationPreferences.java:163) 
at org.hibernate.console.ConfigurationFactory.createConfiguration(ConfigurationFactory.java:84) 
at org.hibernate.console.ConsoleConfiguration$3.execute(ConsoleConfiguration.java:240) 
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:63) 
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:107) 
at org.hibernate.console.ConsoleConfiguration.buildWith(ConsoleConfiguration.java:237) 
at org.hibernate.eclipse.launch.ConsoleConfigurationJavaClasspathTab.isValid(ConsoleConfigurationJavaClasspathTab.java:97) 
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer.refresh(LaunchConfigurationTabGroupViewer.java:473) 
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationPropertiesDialog.updateButtons(LaunchConfigurationPropertiesDialog.java:193) 
at org.eclipse.debug.ui.AbstractLaunchConfigurationTab.updateLaunchConfigurationDialog(AbstractLaunchConfigurationTab.java:113) 
at org.hibernate.eclipse.launch.ConsoleConfigurationTab.access$0(ConsoleConfigurationTab.java:1) 
at org.hibernate.eclipse.launch.ConsoleConfigurationTab$ChangeListener.modifyText(ConsoleConfigurationTab.java:24) 
at org.hibernate.eclipse.launch.ConnectionProfileCtrl.notifyModifyListeners(ConnectionProfileCtrl.java:366) 
at org.hibernate.eclipse.launch.ConnectionProfileCtrl$3.selectionChanged(ConnectionProfileCtrl.java:276) 
at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:163) 
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) 
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:50) 
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:178) 
at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:160) 
at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:2171) 
at org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:1202) 
at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:1231) 
at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:242) 
at org.eclipse.jface.util.OpenStrategy.access$4(OpenStrategy.java:236) 
at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:408) 
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) 
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353) 
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061) 
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172) 
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761) 
at org.eclipse.jface.window.Window.runEventLoop(Window.java:832) 
at org.eclipse.jface.window.Window.open(Window.java:808) 
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.open(LaunchConfigurationsDialog.java:1154) 
at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationPropertiesDialog.open(LaunchConfigurationPropertiesDialog.java:213) 
at org.eclipse.debug.ui.DebugUITools.openLaunchConfigurationPropertiesDialog(DebugUITools.java:661) 
at org.eclipse.debug.ui.DebugUITools.openLaunchConfigurationPropertiesDialog(DebugUITools.java:638) 
at org.hibernate.eclipse.console.actions.AddConfigurationAction.doAddConfiguration(AddConfigurationAction.java:79) 
at org.hibernate.eclipse.console.actions.AddConfigurationAction.run(AddConfigurationAction.java:67) 
at org.eclipse.jface.action.Action.runWithEvent(Action.java:519) 
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:595) 
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:511) 
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:420) 
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) 
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353) 
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061) 
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172) 
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761) 
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151) 
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) 
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032) 
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148) 
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636) 
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) 
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579) 
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150) 
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135) 
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) 
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) 
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) 
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:382) 
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:236) 
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) 
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648) 
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603) 
at org.eclipse.equinox.launcher.Main.run(Main.java:1465) 

我嘗試了很多次沒有成功。我注意到,如果我按照步驟創建hbm,設置classpath,設置數據庫連接和最後項目名稱,那麼錯誤不會顯示直到我打開配置文件。我是否缺少任何插件?

+0

http://stackoverflow.com/questions/13085534/problems-occurred-when-invoking-code-from-plug-in-org-eclipse-jface的可能重複 和 HTTP://計算器。 com/questions/776334 /問題發生時調用代碼從插件org-eclipse-jface-when-usin –

+0

@KarimTawfik我不這麼認爲。比較堆棧跟蹤和他們面臨問題的地方。 –

回答

0

我知道堆棧跟蹤是不同的,但這兩個問題都與eclipse插件有關。

+0

你還是會得到例外嗎? –