Hi everyone, I'm new to the hibernate technology. Currently i'm facing the problem while calling the stored procedure from hibernate code. My procedure is in the MySQL database and hibernate version is 3.0. The Exception is as,- 1047 [main] WARN org.hibernate.util.JDBCExceptionReporter - SQL Error: 1312, SQLState: 0A000 1047 [main] ERROR org.hibernate.util.JDBCExceptionReporter - PROCEDURE smpptwodlrs.getContactRecords can't return a result set in the given context org.hibernate.exception.GenericJDBCException: could not execute query at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126) at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) at org.hibernate.loader.Loader.doList(Loader.java:2231) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2125) at org.hibernate.loader.Loader.list(Loader.java:2120) at org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:312) at org.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1722) at org.hibernate.impl.AbstractSessionImpl.list(AbstractSessionImpl.java:165) at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:175) at roseindia.tutorial.hibernate.SelectHQLExample.main(SelectHQLExample.java:25) Caused by: java.sql.SQLException: PROCEDURE smpptwodlrs.getContactRecords can't return a result set in the given context at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1997) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1167) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1278) at com.mysql.jdbc.Connection.execSQL(Connection.java:2251) at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1586) at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208) at org.hibernate.loader.Loader.getResultSet(Loader.java:1808) at org.hibernate.loader.Loader.doQuery(Loader.java:697) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259) at org.hibernate.loader.Loader.doList(Loader.java:2228) ... 7 more could not execute query Exception::org.hibernate.exception.GenericJDBCException: could not execute query
Any help will be appreciated.
Thanking you.
|