This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Doubt on Hibernate application Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Reply 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
Ranch Hand

Joined: Jul 11, 2001
Posts: 15230

This would be better asked in our ORM forum. Moving...
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 8142
    
  52

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: 8142
    
  52

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.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Doubt on Hibernate application
 
Similar Threads
hibernate with Container Managed Transactions (CMT)
ibm-web-ext.xmi
not able to deploy
Urgent feedback pls
Unable to set up Hibernate Session Factory