This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
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....
Srinivas Modekurti<br />Systems Engineer<br />Walgreens Co
Did you put the DB2 JDBC JAR(s) into the directory where JBoss wants them?
Joined: Nov 15, 2004
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 ?
Joined: Aug 07, 2003
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.
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....
Joined: Aug 07, 2003
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.