• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Class not found exception while creating datasource

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am creating datasource in websphere 6.1 type4 (DB2 Universal JDBC Driver Provider) to DB2 9.5 database.

I am getting the following error

The test connection operation failed for data source DB2DSLOG on server server1 at node dbtusrv01203Node01 with the following exception: java.lang.ClassNotFoundException: com.ibm.db2.jcc.DB2ConnectionPoolDataSource. View JVM logs for further details.


Since DB2 is installed in different machine, i have copied db2jcc.jar & db2jcc_license_cu.jar files to websphere machine.

I feel its having some class path issue.

Please help me regarding this...

Thanks in Advance
Antony Rajesh
 
Marshal
Posts: 25832
69
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Antony Rajesh wrote:Since DB2 is installed in different machine, i have copied db2jcc.jar & db2jcc_license_cu.jar files to websphere machine.

I feel its having some class path issue.



Your diagnosis is correct. So you copied those jars to some directory on the Websphere machine? So far so good. And when you configured the data source, did you input the name of that directory somewhere? You do have to do that. (I don't remember exactly where but I don't feel like starting up the admin application to find out.)
 
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check the path of the jar files classpath of the JDBC Provider. Does those two match. If not, i would correct the path of the jars there.

Anant
 
author and cow tipper
Posts: 5000
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where on your filesystem did you place these db2 files? In the app, or on the classpath of the JVM?

There are many WebSphere Classloaders that will load classes in slightly different ways, so you need to be careful.

I think the WebSphere ext directory is a decent choice to place these files.

-Cameron McKenzie



 
Antony Rajesh
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Thanks to every one who are all answered for my question.

I solved the issue by setting the path(db2jcc.jar file path) in websphere variable DB2_UNIVERSAL_DRIVER_PATH

Thanks again for your help.

Regards
Antony
 
Nothing? Or something? Like this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic