I want to use Connection.createArrayOf method to create a java.sql.Array to use in a prepared statement, but all of the following implementations throw Feature Not Supported Exception
Is there no implementation of this method? Is it deprecated? Is there any other way to initialize java.sql.Array? Or have I imported the wrong package?
com.mysql.cj.jdbc.ConnectionImpl:
public Array createArrayOf(String typeName, Object[] elements) throws SQLException {
try {
throw SQLError.createSQLFeatureNotSupportedException();
} catch (CJException var4) {
throw SQLExceptionsMapping.translateException(var4, this.getExceptionInterceptor());
}
}
com.mysql.cj.jdbc.ConnectionWrapper:
public Array createArrayOf(String typeName, Object[] elements) throws SQLException {
try {
this.checkClosed();
try {
return this.mc.createArrayOf(typeName, elements);
} catch (SQLException var5) {
this.checkAndFireConnectionError(var5);
return null;
}
} catch (CJException var6) {
throw SQLExceptionsMapping.translateException(var6, super.exceptionInterceptor);
}
}
com.zaxxer.hikari.pool.HikariProxyConnection:
public Array createArrayOf(String var1, Object[] var2) throws SQLException {
try {
return super.delegate.createArrayOf(var1, var2);
} catch (SQLException var4) {
throw this.checkException(var4);
}
}
com.mysql.cj.jdbc.ha.MultiHostMySQLConnection:
public Array createArrayOf(String typeName, Object[] elements) throws SQLException {
try {
return this.getActiveMySQLConnection().createArrayOf(typeName, elements);
} catch (CJException var4) {
throw SQLExceptionsMapping.translateException(var4, this.getExceptionInterceptor());
}
}