You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Stack trace: java.lang.ClassCastException: com.sun.proxy.$Proxy37 cannot be cast to com.vertica.jdbc.VerticaConnection at org.pentaho.di.verticabulkload.VerticaBulkLoader$1.run(VerticaBulkLoader.java:262)
This occurs when retrieving connections from a ConnectionPool such as the Tomcat JDBC Connection Pool which wraps the JDBC Connection instance:
Connection pools create wrappers around the actual connection in order to properly pool them. We also create interceptors in these wrappers to be able to perform certain functions. If there is a need to retrieve the actual connection, one can do so using the javax.sql.PooledConnection interface.
Version: VerticaBulkLoader-6.1.0.7-258.jar
Stack trace:
java.lang.ClassCastException: com.sun.proxy.$Proxy37 cannot be cast to com.vertica.jdbc.VerticaConnection at org.pentaho.di.verticabulkload.VerticaBulkLoader$1.run(VerticaBulkLoader.java:262)
This occurs when retrieving connections from a ConnectionPool such as the Tomcat JDBC Connection Pool which wraps the JDBC Connection instance:
See: The Tomcat JDBC Connection Pool: Getting the actual JDBC connection
The VerticaBulkLoader class could check to see if the connection is wrapped and if so the following can be used to obtain the wrapped connection:
Connection con = datasource.getConnection(); Connection actual = ((javax.sql.PooledConnection)con).getConnection();
This would allow to use JNDI and the usage of JDBC connection pools to manage Vertica JDBC connections.
VerticaCopyStream stream = new VerticaCopyStream( (VerticaConnection) ( data.db.getConnection() ), dml );
See: VerticaBulkLoader.java#L262
The text was updated successfully, but these errors were encountered: