I have developed a small utility for reading database tables and I'm trying to access DB2 tables. I am using DB2 for z/OS and my application is a standalone JAR file that you have to execute in command line using java -jar
. Also, I have the db2jcc_license_cu.jar
license that I received from a DBA. I already tried to pack this license in my JAR application, but I always get this error:
[jcc][t4][10509][13454][4.21.29] Connection to the data server failed. The IBM Data Server for JDBC and SQLJ license was invalid
or was not activated for the DB2 for z/OS subsystem. If you are connecting directly to
the data server and using DB2 Connect Unlimited Edition for System z, perform the
activation step by running the activation program in the license activation kit.
If you are using any other edition of DB2 Connect, obtain the license file,
db2jcc_license_cisuz.jar, from the license activation kit, and follow the installation
directions to include the license file in the class path. ERRORCODE=-4230, SQLSTATE=42968
The connection url is jdbc:db2://<server>:<port>/<schema_name>:progressiveStreaming=2;
which should be a Type 4 connection. I am using the Universal DB2 Driver. I don't know if including license jar is sufficient to make things work or if I need something more, like loading license or similar operations.
Any help will be appreciated.