I'm trying to make a connection pool with the dbcp framework for my oracle server. I used this tutorial for the connection. The problem is to create a OraclePreparedStatement with this connection:
Connection oracleCon;
OraclePreparedStatement o_stmt;
String sql = "INSERT INTO T002_metadata (T002_datacitexml,T002_version, T002_active) VALUES (?,?,?) RETURNING T002_id INTO ?";
oracleCon = ConnectionManager.ds.getConnection();
o_stmt = ((OraclePreparedStatement) oracleCon.prepareStatement(sql));
After executing this, an exception is thrown.
org.apache.commons.dbcp.DelegatingPreparedStatement cannot be cast to oracle.jdbc.OraclePreparedStatement
Is there any possibility to cast the statement?