Hi,
I am getting following error while calling the stored procedure on iseries(AS400) from hibernate. But the problem is it works perfect in alternate call and gives exception in other alternate execution call .
Could someone provide any hint to fix this error.? The procedure is to get the sequence number from the database sequence and increase it by one on every call.
2012-05-15 12:38:35,555 (SQLErrorCodesFactory.java:125) INFO org.springframework.jdbc.support.SQLErrorCodesFactory - SQLErrorCodes loaded: [DB2, Derby, H2, HSQL, Informix, MS-SQL, MySQL, Oracle, PostgreSQL, Sybase]
Root cause of this error is: [java.sql.SQLException: [SQL0428] SQL statement cannot be run.] java.sql.SQLException: [SQL0428] SQL statement cannot be run. at com.ibm.as400.access.JDError.throwSQLException(JDError.java:650) at com.ibm.as400.access.JDError.throwSQLException(JDError.java:621) at com.ibm.as400.access.AS400JDBCStatement.commonExecute(AS400JDBCStatement.java:914) at com.ibm.as400.access.AS400JDBCPreparedStatement.execute(AS400JDBCPreparedStatement.java:821) at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:169)
java call from hibernatetemplate is
connection.prepareCall("{ CALL XXXXO10.XXXXTP('XXXX', ?) }");
|