• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt on Hibernate application

 
rudreshashok kumar
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This would be better asked in our ORM forum. Moving...
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic