cancel
Showing results for 
Search instead for 
Did you mean: 

DB2 - ver 9.7 - Where to find the JDBC drivers ?

jegathees_waran
Active Participant
0 Kudos

Hi Friends,

Our customer is having DB2 database ver 9.7. I tried to connect to DB2 from PI (7.0) Java stack. It is unable. The following error is coming.

Error:

Error when attempting to get processing resources: com.sap.aii.af.service.util.concurrent.ResourcePoolException: Unable to create new pooled resource: DriverManagerException: Cannot establish connection to URL 'com.ibm.db2.jcc.DB2Driver': ClassNotFoundException: jdbc:db2://PXIDEV:5813/PXD

I took the connection details from their PI java stack and put in JDBC receiver CC. The above error is showing in CC Monitoring.

I found one SAP Note 1079888. One link is given. But, I am unable to find the exact link to download drivers.

Can you provide me the link or suggest me where to download and how to install in PI ?

Thanking you.

Kind regards,

Jegathees P.

Accepted Solutions (1)

Accepted Solutions (1)

jegathees_waran
Active Participant
0 Kudos

Hi Gabriel & Gaurav

Really thank you very much for your kind and immediate help.

We deployed those 2 JAR files and we mentioned the same in the CLASSPATH variable. We face some Adapter Engine error.

Once it is solved, I will close the thread.

Really thank you very much once again.

Kind regards,

Jegathees P.

GabrielSagaya
Active Contributor
0 Kudos

Hi,

Please post the Adapter engin error here.

Answers (6)

Answers (6)

GabrielSagaya
Active Contributor
0 Kudos

Please include 2 jar files (db2jcc.jar and db2jcc_license_cu.jar) for type 4 connection

http://www.razorsql.com/docs/help_db2.html

jegathees_waran
Active Participant
0 Kudos

Hi Gaurav,

Now our BASIS people deployed 'db2jcc.jar' through SDM. I am able to see that jar file under this folder 'com.sap.aii.af.jmsproviderlib'. After this, I stopped and started my JDBC CC, still it is showing the same error.

1) Do we need to deploy more JAR files ?

2) Is this connection string correct for DB2 ver 9.7 ?

3) Do we need to give any reference in the CLASSPATH variable.

I am confusing. Can you kindly help me to resolve this ?

Kind regards,

Jegathees P.

Former Member
0 Kudos

Hi,

Please include the two Jar files suggested by Gabriel in the archive 'com.sap.aii.af.jmsproviderlib'. And then, re-deploy this updated sda on the PI server. This should solve your problem.

The connection parameters in the JDBC channel should be as follows:

DRIVER CLASS: com.ibm.db2.jcc.DB2Driver

DRIVER LOCATION: db2jcc.jar and db2jcc_license_cu.jar

(Both of these jars must be included)

JDBC URL FORMAT: jdbc:db2://<host>[:<port>]/<database_name>

JDBC URL Examples:

jdbc:db2://127.0.0.1:50000/SAMPLE

Regards, Gaurav.

jegathees_waran
Active Participant
0 Kudos

Hi Friends,

Thank you for all your reply. It is really helping us to move work forward.

Final clarification, for the DB2 drivers, it is mentioned in the SAP note 1079888 "The JDBC driver you actually use must be contained in CLASSPATH.".

Where do we see this CLASSPATH ? Is it J2EE Engine ? What will we refer ? If you clarify this last point, it will be successful to connect to DB2 from PI.

Your help is highly appreciated in this.

Kind regards,

Jegathees P.

Former Member
0 Kudos

Hi Jegathees,

The SAP Note that you are referring to is a general note for using DB2 drivers via an independent java application. And hence "The JDBC driver you actually use must be contained in CLASSPATH " for such cases.

In your case, this should work without adding the driver reference in CLASSPATH.

Please follow the steps mentioned above by me and deploy the updated SDA with the DB2 drivers and this will work fine for you.

Regards, Gaurav.

jegathees_waran
Active Participant
0 Kudos

Hi Fernad & Supriya,

Our basis people says it seems JDBC drivers are already installed in J2EE. How to confirm this in J2EE ? Any idea ?

Moreover, in which path, db2jcc*.jar files will be there in J2EE ? and what is the CLASSPATH ? Where to see this in J2EE ? How do we refer this jar file.

The SDN link which you have given for 'How to install JDBC drivers" for Oracle & SQL. Is there similar document for DB2 ?

Kindly reply.

Thanking you.

Jegathees P.

former_member181985
Active Contributor
0 Kudos

yes you can use the same document. The procedure is same for all external drirvers

Former Member
0 Kudos

The process of adding the DB2 driver (jar) to the sda is the same as defined in the link by Supriya. The steps are fairly simple:

1. Get the archive (.sda) For PI 7.1 - com.sap.aii.adapter.lib.sda and for lower releases, use aii_af_jmsproviderlib.sda

2. Add all jars to the archive.

3. modify the provider.xml file and WinZip the .sda file again.

4. Deploy the updated archive (.sda) on the PI Server.

This process is same for any DB driver that you want to use in PI.

Regards, Gaurav.

Former Member
0 Kudos
Former Member
0 Kudos

Hi Jegathees P

Please check this document how to install jdbc driver in PI 7.0

http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/70ffd890-0201-0010-708f-d5dad2dfc...

And download the driver in this link

http://www-01.ibm.com/support/docview.wss?rs=71&uid=swg21363866

Hope can help.

Best Regards

Fernand