다음은 저장 프로 시저를 호출하기위한 Java 코드입니다. 내가 말하는 오류가 계속 : java.lang.ClassCastException가 : oracle.jdbc.driver.OracleCallableStatementWrapper 호환되지 않는 oracle.jdbc.OracleCallableStatementJava에서 Oracle 저장 프로 시저 호출
와 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();
}
, 내가 처음 시도 이잖아하지만 난 SQL92 토큰 호환되지 오류 – Bytekoder
그 구문을 지원하지 않는 구문이나 JDBC 드라이버에 문제가있을 수 점점 계속 . – nayakam