Skip to content
Advertisement

How to call a DB2 stored procedure passing a List as param?

Java version: Java1.8
JDBC: db2jcc4-11.1.1.1
Ant1.7
Websphere8.5

I am upgrading a service to allow for passing an array of currency codes (AA, BB, CC, DD) into a stored procedure. The NSP work has been completed and verified. Here is my code below.

Mapper

JavaScript

StringHandler

JavaScript

During runtime, I am getting this error when submitting the change to my database:

FATAL com.pseuplex.j2ee.ExceptionFilter – java/sql/Connection.createArrayOf(Ljava/lang/String;[Ljava/lang/Object;)Ljava/sql/Array; java.lang.AbstractMethodError: java/sql/Connection.createArrayOf(Ljava/lang/String;[Ljava/lang/Object;)Ljava/sql/Array;

I have checked pages of stack overflow questions similar to this one, but none of the solutions have led me to a solution. Any help would be greatly appreciated.

Advertisement

Answer

Just following up on this for future reference, I found my solution to the AbstractMethodError. I was using an old version of dbcp and ended up having to upgrade to commons-dbcp2 as well as commons-pool2.

After the upgrade, I simply changed my datasource to target dbcp2 and everything worked fine.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement