Hibernate version:3.2.6
Hi,
Im having a problem in calling the below stored procedure.
Code:
CREATE OR REPLACE PROCEDURE MDMUSER.SP_UPDATE_STATUS (
in_av_company_number IN VARCHAR2,
in_av_item_number IN VARCHAR2,
in_av_vendor_number IN VARCHAR2,
in_an_addr_seq_num IN NUMBER,
in_av_status IN VARCHAR2,
in_ad_status_eff_date IN DATE,
in_av_process_flag IN VARCHAR2,
in_av_user_name IN VARCHAR2,
out_av_ship_pt_status OUT varchar2,
out_av_recalc_sku OUT VARCHAR2,
out_recalc_item_vendor OUT VARCHAR2)
This is how im calling the procedure..
Code:
Query query=session.createSQLQuery("{call "
+" MDMUSER.SP_UPDATE_STATUS(?,?,?,?,?,?,?,?,?,?,?)}");
query.setParameter(0,companyNo);
query.setParameter(1,itemNo);
query.setParameter(2,vendorNo);
query.setByte(3,addrCode);
query.setParameter(4,status);
query.setDate(5,statusEffDt);
query.setParameter(6,futureChgFlag);
query.setParameter(7,userID);
query.setParameter(8,shipFrmStatus);
query.setParameter(9,recalcSKU);
query.setParameter(10,recalcItemVndr);
recordsAffected=query.executeUpdate();
The problem here is im trying to get the values for a OUT param, using query.setParameter().. im not sure whether this is correct. I just tried and im getting the following exception.
Code:
Hibernate: {call MDMUSER.SP_UPDATE_STATUS(?,?,?,?,?,?,?,?,?,?,?)}
Jul 4, 2008 10:09:13 AM org.hibernate.util.JDBCExceptionReporter
WARNING: SQL Error: 17148, SQLState: null
Jul 4, 2008 10:09:13 AM org.hibernate.util.JDBCExceptionReporter
SEVERE: Method only implemented in thin
org.hibernate.exception.GenericJDBCException: could not execute native bulk manipulation query
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.engine.query.NativeSQLQueryPlan.performExecuteUpdate(NativeSQLQueryPlan.java:174)
at org.hibernate.impl.SessionImpl.executeNativeUpdate(SessionImpl.java:1163)
at org.hibernate.impl.SQLQueryImpl.executeUpdate(SQLQueryImpl.java:334)
at com.mdm.business.Tickler.updateStatus(StatusTicklerValidator.java:104)
at com.mdm.business.UnitTest.main(UnitTest.java:36)
Caused by: java.sql.SQLException: Method only implemented in thin
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:124)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:161)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:226)
at oracle.jdbc.driver.Accessor.unmarshalOneRow(Accessor.java:1737)
at oracle.jdbc.driver.T4CTTIrxd.unmarshal(T4CTTIrxd.java:787)
at oracle.jdbc.driver.T4CTTIrxd.unmarshal(T4CTTIrxd.java:704)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:526)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:180)
at oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedStatement.java:542)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1027)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2887)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:2959)
at org.hibernate.engine.query.NativeSQLQueryPlan.performExecuteUpdate(NativeSQLQueryPlan.java:165)
Please suggest a solution..