This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes No Suitable Drived found Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "No Suitable Drived found" Watch "No Suitable Drived found" New topic
Author

No Suitable Drived found

Srinivas Modekurti
Greenhorn

Joined: Nov 15, 2004
Posts: 9
Hello all,
I have been having trouble getting Hibernate work in my JBOSS. My hibernate mapping file uses a DB2 jdbc driver to connect to Db2. Everything works great when run in standalone environment. But when I deploy the application on JBOSS, hibernate complains that there is no suitable driver found. I am using myeclipse plugin for eclipse to generate the code.

Any help in this regard will be greatly appreciated....

Vasu


Srinivas Modekurti<br />Systems Engineer<br />Walgreens Co
David Harkness
Ranch Hand

Joined: Aug 07, 2003
Posts: 1646
Did you put the DB2 JDBC JAR(s) into the directory where JBoss wants them?
Srinivas Modekurti
Greenhorn

Joined: Nov 15, 2004
Posts: 9
Yes, I have copied the DB2Java.zip file to jboss-3.2.6\server\default\lib location. Is there any other place that I need to copy the driver on JBOSS ?
David Harkness
Ranch Hand

Joined: Aug 07, 2003
Posts: 1646
First, a JAR is just a re-named ZIP file, but is that ZIP actually the archived folder contaniing the JAR, a README file, a license, docs, etc? Or is it really just the classes ZIPped up?

Will JBoss know to accept a ZIP instead of a JAR? I've never used JBoss, but I remember that with WebLogic (at least 7.0) it did accept the classes12.zip that Oracle's driver used to come packaged as, so JBoss probably does.

Finally, did you try the JBoss forum?
Srinivas Modekurti
Greenhorn

Joined: Nov 15, 2004
Posts: 9
Thanks for your help. I finally found out the problem from Myeclipse forum. I had to add the bin directory of DB2 to the JBOSS server classpath. That has solved everything. I guess this was required for only DB2 but for ORacle and other drivers, I never added anything else to the server classpath....
David Harkness
Ranch Hand

Joined: Aug 07, 2003
Posts: 1646
There are four types of JDBC drivers, and the important thing in this case is that some types require DLLs or other native libraries to do their work and others (type 4) do not. The latter are pure Java. Oracle has both types of drivers, and the latest type 4 drivers support all but a few features only found in the older type 2 drivers that require the OCI client libraries.

Good catch!
 
jQuery in Action, 2nd edition
 
subject: No Suitable Drived found
 
Similar Threads
[JDBCExceptionReporter] No suitable driver found for jdbc:db2:/
jdbc driver error v9.1.3
Can't run a JSP page due to error 500
WebSphere Studio JDBC Connection Problem
java.sql.SQLException: No suitable driver