This discussion is archived
1 Reply Latest reply: Dec 7, 2012 8:08 AM by Angel Perez RSS

Eclipse SDK plugins unable to connect to Database in FW 2.x and 4.x

Angel Perez Newbie
Currently Being Moderated
To be honest, I've had this error since the first time I used the SPL SDK with eclipse, the OUAF plugins are unable to connect to the database due some Hibernate error. I've followed the SDK Installation guide and everything else works perfectly (Artifact Gen, Deploy, etc).

Example:
Eclipse > File > New > Entity... > Table Name: > Search.. (Nothing happens here, this actions produces the following errors in the Eclipse log)

Eclipse Log file can be found in:
C:\SPLSDK\<SPLENVIRON>\eclipseWorkspace\.metadata\.log

I hope someone has a clue that helps me to fix this old issue. It happens in FW 2.x and 4.x.

Thanks in advanced.

Log #1
!ENTRY org.eclipse.jdt.ui 1 1 2012-10-26 18:22:34.531
!MESSAGE Creating new database repository for project 'EclipseProject' url=jdbc:oracle:thin:@LOCALHOST:1521:<SPLENVIRON> user=cisadm

!ENTRY org.eclipse.ui 4 0 2012-10-26 18:22:34.671
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
     at com.splwg.eclipse.database.preferences.DatabaseHelper.initializeDBRepository(DatabaseHelper.java:89)
     at com.splwg.eclipse.database.preferences.DatabaseHelper.newDatabaseRepository(DatabaseHelper.java:53)
     at com.splwg.eclipseEditors.wizards.helpers.StringSearchWidgetHelper.getDatabaseRepository(StringSearchWidgetHelper.java:85)
     at com.splwg.eclipseEditors.wizards.helpers.StringSearchWidgetHelper.executeSearch(StringSearchWidgetHelper.java:71)
     at com.splwg.eclipseEditors.wizards.helpers.StringSearchWidgetHelper$1.widgetSelected(StringSearchWidgetHelper.java:55)
     at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228)
     at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
     at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
     at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3910)
     at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3503)
     at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
     at org.eclipse.jface.window.Window.open(Window.java:801)
     at org.eclipse.ui.internal.actions.NewWizardShortcutAction.run(NewWizardShortcutAction.java:135)
     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:1003)
     at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3910)
     at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3503)
     at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
     at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
     at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
     at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
     at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
     at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
     at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
     at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
     at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
     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:368)
     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:559)
     at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
     at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
     at org.eclipse.equinox.launcher.Main.main(Main.java:1287)
Caused by: java.lang.reflect.InvocationTargetException
     at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:421)
     at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507)
     at com.splwg.eclipse.database.preferences.DatabaseHelper.initializeDBRepository(DatabaseHelper.java:78)
     ... 41 more
Caused by: java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
     at org.hibernate.cfg.Configuration.<clinit>(Configuration.java:152)
     at com.splwg.tools.artifactgen.metadata.DatabaseRepository.initializeServer(DatabaseRepository.java:127)
     at com.splwg.eclipse.database.preferences.DatabaseHelper$1.run(DatabaseHelper.java:82)
     at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
     at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:494)
     at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
     at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:398)
     at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:105)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
     ... 4 more


Log #2
!ENTRY org.eclipse.jdt.ui 1 1 2012-10-26 18:26:10.502
!MESSAGE Creating new database repository for project 'EclipseProject' url=jdbc:oracle:thin:@LOCALHOST:1521:<SPLENVIRON> user=cisadm

!ENTRY org.eclipse.ui 4 0 2012-10-26 18:26:10.538
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
     at com.splwg.eclipse.database.preferences.DatabaseHelper.initializeDBRepository(DatabaseHelper.java:89)
     at com.splwg.eclipse.database.preferences.DatabaseHelper.newDatabaseRepository(DatabaseHelper.java:53)
     at com.splwg.eclipseEditors.wizards.helpers.StringSearchWidgetHelper.getDatabaseRepository(StringSearchWidgetHelper.java:85)
     at com.splwg.eclipseEditors.wizards.helpers.StringSearchWidgetHelper.executeSearch(StringSearchWidgetHelper.java:71)
     at com.splwg.eclipseEditors.wizards.helpers.StringSearchWidgetHelper$1.widgetSelected(StringSearchWidgetHelper.java:55)
     at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228)
     at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
     at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
     at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3910)
     at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3503)
     at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
     at org.eclipse.jface.window.Window.open(Window.java:801)
     at org.eclipse.ui.internal.actions.NewWizardShortcutAction.run(NewWizardShortcutAction.java:135)
     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:1003)
     at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3910)
     at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3503)
     at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
     at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
     at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
     at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
     at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
     at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
     at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
     at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
     at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
     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:368)
     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:559)
     at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
     at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
     at org.eclipse.equinox.launcher.Main.main(Main.java:1287)
Caused by: java.lang.reflect.InvocationTargetException
     at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:421)
     at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:507)
     at com.splwg.eclipse.database.preferences.DatabaseHelper.initializeDBRepository(DatabaseHelper.java:78)
     ... 41 more
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.cfg.Configuration
     at com.splwg.tools.artifactgen.metadata.DatabaseRepository.initializeServer(DatabaseRepository.java:127)
     at com.splwg.eclipse.database.preferences.DatabaseHelper$1.run(DatabaseHelper.java:82)
     at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)

Edited by: Angel Perez on Oct 26, 2012 4:54 PM

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points