COULD NOT CONNECT TO DB2NEED HELP

Hi everybody,

i am trying to connect to DB2(personal edition) using JDBC adapter and hence trying to create a JDBC connection.

but Iam getting an error: UNABLE TO CINFIGURE CONNECTION MANAGER.

when i tried to use the WMDB in the adapters section using the same properties ans parametes and I COULD CONNECT.

but when iam trying for JDBC adapter connection iam getting this exception. could anybody plase help me.
the parameters that iam using are.

LOCAL_Transaction.
Class : COM.ibm.db2.jdbc.net.DB2Driver
server :127.0.0.1
username:db2admin
Password :db2admin
database : <databasename>
port: i tried both 6789 and 50000
protocol : <blank>
other properties :<blank>
enable connection pooling :true
min connection :1
max connection :10
increment :1
block timeout:60000
expiretimeout :60000

could anybody please tell where the problem is.

thanks in advance

Mike

Mike Miller,
Remember that “DB Driver” param that you use with WmDB package and the “DataSource Class” param with JDBC adapter are different!!

What is the JDBC adapter that you are using?
Do you have the jars in server classpath?
Is the DataSource Class param on JDBC adapter correct?

Above are the few gotchas on successfully configuring JDBC adapter.

  • Saurabh.

Saurabh,

i am using the jdbc version 6.0.1. i have db2java.zip and db2jcc.jar in the IS classpath.

i tried the drivers COM.ibm.db2.jdbc.net.DB2Driver
COM.ibm.db2.jdbc.app.DB2Driver

also tried using com.ibm.db2.jcc.DB2Driver (is this corrrect)

but iam constantly getting the same error : UNABLE TO CONFIGURE CONNECTION MANAGER. com.ibm.db2.jcc.DB2Driver

is there any other class that i have to use. i was using the port:6789. is that correct.

thanks in advance
Mike

Mike,
I myself havent use this flavour, but this is what I think.

with DB2 Universal JDBC Driver, try com.ibm.db2.jcc.DB2DataSource
DB2 JDBC Type 2 Driver, try COM.ibm.db2.jdbc.DB2DataSource

port (on which DB2 UDB server is listening for requests) shld be 50000

Let us know if this succeeds.

HTH,
Saurabh.

Mike,

Try putting driverType=thin in other properties.

We used this for oracle connectivity throiugh JDBC adapters

BM

hi saurabh,

thanks for the reply it worked.

i tried COM.ibm.db2.jdbc.DB2DataSource and port 6789. and i could connect.

thanks
Mike