-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Reason: could not instantiate id generator
PostPosted: Thu Apr 27, 2006 3:11 pm 
Newbie

Joined: Thu Apr 27, 2006 3:00 pm
Posts: 1
I'm developing an eclipse plugin and it uses hibernate (v 3.1.3)
I'm using MySQL v5

I'm getting an error stating java.sql.SQLException: No suitable driver
although I do have mysql-connector-java-3.1.12-bin.jar in my jre/lib/ext

Since a plugin's runtime environment is different does it require the jar file to be placed in a different place or specified elsewhere?

The exact error is:
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:110)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:72)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1881)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1174)
at bizobjects.base._BaseRootDAO.initialize(_BaseRootDAO.java:54)
at bizobjects.base._BaseRootDAO.initialize(_BaseRootDAO.java:41)
at bizobjects.base._BaseRootDAO.initialize(_BaseRootDAO.java:32)
at treeAllo.popup.actions.SomeAction.run(SomeAction.java:32)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:246)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:538)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:400)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3125)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2758)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:367)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163)
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.core.launcher.Main.invokeFramework(Main.java:334)
at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
at org.eclipse.core.launcher.Main.run(Main.java:973)
at org.eclipse.core.launcher.Main.main(Main.java:948)
14:50:47,193 WARN Configurator:126 - No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: bundleresource://237/ehcache-failsafe.xml
Unhandled event loop exception
Reason:
could not instantiate id generator


Thanks in advance.

-Vivek


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 28, 2006 12:39 am 
Expert
Expert

Joined: Thu Dec 23, 2004 9:08 pm
Posts: 2008
Afaik, you have to configure all jars that your plugin uses in plugin.xml. I'm not sure if there's a requirement that they be in the plugin directory tree, but I've never seen a plugin reference anything outside that tree. It may be a security thing.

You need the <runtime> attribute, then configure <library name="yourjdbcjar.jar"/> or whatever. Almost all 3rd-party eclipse plugins use this, you should already have examples for this in your eclipse/plugin directory.

_________________
Code tags are your friend. Know them and use them.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.