I getting below error while trying to call con.createArrayOf method on Microsoft SQL server with datasource pool connection
Uncaught Throwable java.lang.AbstractMethodError: org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.createArrayOf(Ljava/lang/String;[Ljava/lang/Object;)Ljava/sql/Array;
Any lead would be appreciable.
Basically, you can't use the createArrayOf method with your current library. You'll have to use a different database driver library.
You could use something like https://docs.microsoft.com/en-us/sql/connect/jdbc/microsoft-jdbc-driver-for-sql-server since you're using SQL Server.
The error suggests you are using Apache DBCP 1.3 or older, as the method you are trying to call was introduced in JDBC 4 (Java 6), while Apache DBCP 1.3 supports JDBC 3 (Java 1.4/5).
Given the overview at https://commons.apache.org/proper/commons-dbcp/ you need to use at minimum Apache DBCP 1.4, or a newer version (the latest is 2.7.0, for Java 8 and higher).
Note though that upgrading won't help you much, because the Microsoft SQL Server JDBC driver implementation of createArrayOf
will throw a SQLFeatureNotSupportedException
as SQL Server doesn't support arrays.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.