i am using rad 7.0 with was 6.1. and db2 9.5.
i have a console application in a standard java project, which works within a main method.
and a web project (a little application) which has a servlet and a jsp file.
in both of them there are db2jcc.jar and db2jcc_license_cu.jar,
pdq.jar, pdqmgmt.jar files of my db2 9.5.
in both of the projects i have the same line to connect to db and to get some data:
Data data = SampleUtil.getData("jdbc:db2://localhost:50000/sample",
also i must say that i have a sampleutil.java file in both projects which defines methods for database access, like getdata above.
it works for consol application perfectly but in web application
in the same line
15.03.2009 20:59:32:937 EET 0000002b ServletWrappe E SRVE0068E: Uncaught exception thrown in one of the service methods of the servlet: SearchLoginServlet. Exception thrown : java.lang.RuntimeException: Unable to load the driver. Message com.ibm.db2.jcc.DB2Driver
what should i do? thanks
note: i have asked it in db2 forums but there is no reply yet and i think maybe it is about general developing and i wrote it here thanks
Re: com.ibm.db2.jcc.DB2Driver2009-09-04T11:41:44ZThis is the accepted answer. This is the accepted answer.hello !!!
have u found ur solution ??? i too need to connect db2 n rad by code in jsp
it is givin exception "com.ibm.db2.jcc.DB2Driver" . do m using wrong driver ???
Re: com.ibm.db2.jcc.DB2Driver2009-10-09T15:02:32ZThis is the accepted answer. This is the accepted answer.
- SystemAdmin 110000D4XK
gauravbh1 2700022H268 Posts
Re: com.ibm.db2.jcc.DB2Driver2009-11-17T10:59:57ZThis is the accepted answer. This is the accepted answer.Do you have the db2cc.jar file inside <webProject>\WebContent\WEB-INF\lib folder?
It should work fine if you have the jar file at this location.