I am trying to call a DB2 stored procedure from a java application and getting the error below:
Caused by: com.ibm.db2.jcc.am.SqlException: [jcc][10453][12711][4.22.29] Cannot get the describe information for the calling stored procedure with name XXXXXXXX and path ' SYSIBM , SYSFUN , SYSPROC , SYSIBMADM , WSTCFS1 ' ERRORCODE=-4472, SQLSTATE=null
I found the explanation and solution (search- ERRORCODE=-4472) of this error but doesn't makes much sense.
And this is the version of driver I am using:
<dependency>
<groupId>com.ibm.db2.jcc</groupId>
<artifactId>db2jcc4</artifactId>
<version>11.1.1.1</version>
</dependency>
Calling the same stored procedure from IBM Data Studio works fine though.
You need to have both
db2jcc4.jaranddb2jcc_license_cisuz.jarin the classpath for the connection. In addition the user/password for the table schema you want to access has to be granted.You can find both files under the Unix System Services in the z/OS image where Db2 is installed. No need to have a repo and the files much match the Db2 version you are going to access, that’s why you need to contact your DBA.
With Data Studio you can access because either the Db2 Connect license is installed in your computer or the jdbc access has been set up with the proper files and classpath, as described in the previous paragraph.