0
votes

Getting below response on connecting to DB2 database:


"Cannot create PoolableConnectionFactory ([jcc][t4][10109][10354][3.59.81] The version of the IBM Universal JDBC driver in use is not licensed for connectivity to QDB2 databases. To connect to this server, please obtain a licensed copy of the IBM DB2 Universal Driver for JDBC and SQLJ. An appropriate license file db2jcc_license_.jar for this target platform must be installed to the application class path. Connectivity to QDB2 databases is enabled by any of the following license files: [ db2jcc_license_cisuz.jar ]. ERRORCODE=-4472, SQLSTATE=42968)"*


db2jcc.jar and db2jcc_license_cisuz.jar already added in JMeter(3.2)'s lib folder.

My configuration:

configuration

Screenshot of the jmeter/lib folder:

enter image description here

2
The directory containing db2jcc_license_cisuz.jar has to be on the CLASSPATH. Verifyt that is the case at your site. Additionally you are using an old (unsupported) version of the jdbc driver - your version corresponds to Db2-connect v9.5 fixpack 6a, so you should upgrade your jdbc driver to a currently supported version (such as the one supplied with Db2 v11) downloadable from IBM fix central. The version of the dbcjcc_license_cisuz.jar has to match the version of the Db2 server - mao
"The directory containing db2jcc_license_cisuz.jar has to be on the CLASSPATH"--- Whether this line means putting db2jcc_license_cisuz.jar in JMeter(3.2)'s lib folder.Additionally I added both jars location in Environment Variable's >> Variable Name= CLASSPATH and Variable Value=C:\Users\SG45565\Downloads\apache-jmeter-3.2\lib\db2jcc_license_cu.jar;C:\Users\SG45565\Downloads\apache-jmeter-3.2\lib\db2jcc.jar.Are you asking for updated db2jcc_license_cisuz.jar.Can u give it's download path.I can't modify my jdbc driver since it's my organization's environment.Can u please suggest something else? - shivam
Your CLASSPATH value shows db2jcc_license_cu.jar ,but it needs to show instead db2jcc_license_cisuz.jar , in addition to the db2jcc.jar. - mao

2 Answers

0
votes

Although the message seems to indicate a license issue , I see an error in your configuration on Validation Query.

Can you try to fix it and see if you still get the error ?

Change it to:

select 1 from sysibm.sysdummy1

Also can you show a screenshot of the jmeter/lib folder and highlight the presence of the 2 jars for DB2 ?

0
votes

The error you're getting is about mismatch of the DB2 JDBC Driver you are trying to use with JMeter and DB2 version on the server.

See IBM data server client and driver types IBM KB article for more information on JDBC driver types.

Personally I would recommend obtaining JDBC driver directly from your DB2 installation, it normally lives under java or jdbc folder in the DB2 server installation root.

JMeter DB2

So I would recommend copying the following files somewhere to JMeter Classpath (normally "lib" folder of your JMeter installation)

  • db2jcc4.jar
  • db2jcc_license_cu.jar

(depending on your DB2 version and type you might need other files as well)

JMeter restart will be required to pick the .jars up.

See The Real Secret to Building a Database Test Plan With JMeter article to learn more about databases load testing concept using JMeter.