Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Connecting to DB2

user12028935Apr 17 2013 — edited Apr 18 2013
Hello,
I am on Jdeveloper 11.1.1.7 and am trying to connect to a DB2 database. I have tried both the DB2 UDB and the Generic JDBC connection.
I am getting the error: Test failed: Driver class not found. Verify the Driver location

I have all the jars in a directory on my C drive. In the Manage Libraries Gui, I created a DB2 library and put the directory in the class path, as per the instructions in Reference A below.

QUESTION #1: Is the ERROR referring to the jar files?
A. According to Jdeveloper's own help these are required
DB2 UDB 8.1 db2jcc.jar AND db2jcc_javax.jar AND db2jcc_license_cu.jar
DB2 UDB 9.5 db2jcc.jar AND db2jcc4.jar

B. According to REFERENCE A (Below) which says I need:
db2jcc.jar (recommended if you are using the Type 4 network driver)
db2java.jar (if necessary, rename db2java.zip to db2java.jar)
db2jcc_license_cisuz.jar
db2jcc_license_cu.jar

I have these files except for the db2jcc_javax.jar, which I only learned about this morning.

Question #2 What impact does the Driver Class string have?
In Jdeveloper help, the my oracle Support and it is: Driver Class:com.ibm.db2.jcc.DB2Driver
In Reference C below, it gives the driver class of COM.ibm.db2.jdbc.app.DB2Driver

Is this picked up from the jar files?

Question #3: Does the AS400 Have to be configured to allow access from Java? See Reference D below, page 7.

References:
A. Blog on Connecting to DB2 https://blogs.oracle.com/pt/entry/connecting_to_db2_using_jdevel Dec 2009
B. My Oracle Support: How to Connect with JDeveloper 11g to IBM DB2 database [ID 1267811.1] Jan 2013
C. ADF Forum: 88924
D. IBM pdf http://publib.boulder.ibm.com/html/as400/v4r5/ic2924/info/java/rzaid/clnsvr.pdf

Correct and helpful answers will be rewarded with points! :)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 16 2013
Added on Apr 17 2013
2 comments
1,682 views