• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

No Suitable Drived found

 
Srinivas Modekurti
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
David Harkness
Ranch Hand
Posts: 1646
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you put the DB2 JDBC JAR(s) into the directory where JBoss wants them?
 
Srinivas Modekurti
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1646
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1646
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic