Вот мой Java-код для вызова хранимой процедуры.Я получаю сообщение об ошибке: java.lang.ClassCastException: oracle.jdbc.driver.OracleCallableStatementWrapper несовместим с oracle.jdbc.OracleCallableStatement
</p>
<pre><code>public Connection initiateDBConnection() throws NamingException,
SQLException {
Connection result = null;
InitialContext initialContext = new InitialContext();
DataSource datasource = (DataSource) initialContext
.doLookup(Constants.DATASOURCE_CONTEXT);
result = (Connection) WSJdbcUtil
.getNativeConnection((WSJdbcConnection) datasource
.getConnection());
return result;
}
public void callStoredProcedure(String procedureName,
Map<Integer, Object> map) throws SQLException, NamingException {
OracleCallableStatement statement = (OracleCallableStatement) initiateDBConnection()
.prepareCall(procedureName);
Iterator<Entry<Integer, Object>> params = map.entrySet().iterator();
while (params.hasNext()) {
Entry<Integer, Object> contents = params.next();
statement.setNString(contents.getKey(),
(String) contents.getValue());
System.out.println("Key: " + contents.getKey() + "Value: "
+ contents.getValue());
}
statement.execute();
statement.close();
}