Hi
I have been trying to get the hibernate ext tools(extV3.0Alpha & hibernate 3.0.3),to work with eclipse Eclipse 3.1M4, I am not able to generate the seeion factory from the console perspective.
this is my cfg file
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> <hibernate-configuration> <session-factory> <propertyname="hibernate.connection.username">username</property> <property name="hibernate.connection.password">password</property> <property name="hibernate.dialect">org.hibernate.dialect.DB2Dialect</property> <property name="hibernate.connection.url">jdbc:db2:DBNAME</property> <property name="hibernate.connection.driver_class">com.ibm.db2.jdbc.app.DB2Driver</property> </session-factory> </hibernate-configuration>
But even though I have all the necessary DB2 jars in my project library,I always get the following exception,
org.hibernate.console.HibernateConsoleRuntimeException: Problems while loading database driverclass (com.ibm.db2.jdbc.app.DB2Driver) at org.hibernate.console.ConsoleConfiguration.registerFakeDriver(ConsoleConfiguration.java:195) at org.hibernate.console.ConsoleConfiguration.buildWith(ConsoleConfiguration.java:155) at org.hibernate.console.ConsoleConfiguration.build(ConsoleConfiguration.java:128) at org.hibernate.eclipse.console.actions.BuildSessionFactoryAction.doRun(BuildSessionFactoryAction.java:50) at org.hibernate.eclipse.console.actions.ConsoleConfigurationBasedAction.run(ConsoleConfigurationBasedAction.java:47) at org.eclipse.ui.actions.BaseSelectionListenerAction.runWithEvent(BaseSelectionListenerAction.java:167) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:555) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:505) at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:419) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java(Compiled Code)) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java(Inlined Compiled Code)) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java(Compiled Code)) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java(Compiled Code)) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java(Compiled Code)) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1540) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:285) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:144) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:102) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:220) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:273) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:129) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:41) at java.lang.reflect.Method.invoke(Method.java:386) at org.eclipse.core.launcher.Main.basicRun(Main.java:185) at org.eclipse.core.launcher.Main.run(Main.java:710) at org.eclipse.core.launcher.Main.main(Main.java:694) Caused by: java.lang.ClassNotFoundException: com.ibm.db2.jdbc.app.DB2Driver at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java(Compiled Code)) at org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader.loadClass(AbstractClassLoader.java(Compiled Code)) at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code)) at java.lang.Class.forName1(Native Method) at java.lang.Class.forName(Class.java:176) at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:103) at org.hibernate.console.ConsoleConfiguration.registerFakeDriver(ConsoleConfiguration.java:187) ... 27 more
Which is very weird, and frustrating, I use "DB2 connect" to connect to a remote DB(forgive the redundancy), i can connect and query the same database from WSAD with hand coded cfg,hbm and pojo's.
Any help wud be appreciated
Shyam
|