-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: java.sql.SQLException: [SQL0428] SQL statement cannot be run
PostPosted: Tue May 15, 2012 3:34 am 
Newbie

Joined: Tue May 15, 2012 3:14 am
Posts: 1
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', ?) }");


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.