File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes Doubt on Hibernate application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Doubt on Hibernate application" Watch "Doubt on Hibernate application" New topic
Author

Doubt on Hibernate application

rudreshashok kumar
Greenhorn

Joined: Aug 27, 2006
Posts: 16
HI All,

I started learning Hibernate and wanted to develop a small application, so deployed the first example from the following url (sample1)
http://www-128.ibm.com/developerworks/websphere/techjournal/0409_patil/0409_patil.html
deployed as told by the tutor in WASD 5, and changed the database properties, When started the application, i am getting Error saying "
F net.sf.hibernate.connection.DriverManagerConnectionProvider JDBC Driver class not found: com.ibm.db2.jcc.DB2Driver
net.sf.hibernate.HibernateException: JDBC Driver class not found: com.ibm.db2.jcc.DB2Driver

I have given it as
<property name="hibernate.connection.driver_class">com.ibm.db2.jcc.DB2Driver</property>

i tried to change the db2java.jar with my own db2 driver even then same error

can some one pls help me in solving this

Thanks
Rudresh
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

This would be better asked in our ORM forum. Moving...


GenRocket - Experts at Building Test Data
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10102
    
165

net.sf.hibernate.connection.DriverManagerConnectionProvider JDBC Driver class not found: com.ibm.db2.jcc.DB2Driver
net.sf.hibernate.HibernateException: JDBC Driver class not found: com.ibm.db2.jcc.DB2Driver


You will have to have the jar file containing the driver (com.ibm.db2.jcc.DB2Driver) in the classpath of the application.


[My Blog] [JavaRanch Journal]
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10102
    
165

I just had a look at the article that you are refering and it does mention where to place the jar file of your driver. Here's what it says:

Be sure you copied the JDBC driver JAR files into the WEB-INF/lib folder, otherwise an exception may occur.
 
jQuery in Action, 2nd edition
 
subject: Doubt on Hibernate application