Summary:
If I call a stored procedure on Sybase from Websphere 5.0 then I receive "Caused by: java.sql.SQLException: JZ00F: Cursor property cannot be changed after the cursor has been declared" exception.
It seems to be a known problem (
http://www-1.ibm.com/support/docview.ws ... wg1PQ83999) However I don't know what could be a workaround. Could somebody help me?
Martin
Hibernate version:
3.0
Mapping documents:
<sql-query name="availablePositions" callable="true">
<return alias="pos" class="com.ubs.pp.pojo.AvailablePoisitonBean">
<return-property name="id" column="outright_position_uid"/>
<return-property name="settledQuantity" column="settled_quantity"/>
<return-property name="settledAllocatedQuantity" column="settled_allocated_quantity"/>
<return-property name="datedPendingSalesQuantity" column="dated_pending_sales_quantity"/>
<return-property name="datedSettledAllocatedQuantity" column="dated_settled_alloc_quantity"/>
<return-property name="datedPendingAllocatedQuantity" column="dated_pending_alloc_quantity"/>
</return>
{call tr_get_alloc_positions_lite(:counterpartyId, :financialInstrumentId, :dividendRequirementValue, :depositoryId, :date, :include_buys, :selection, :requires_matching_depot, :streetside_counterparty_code, :pbm_quantity, :today) }
</sql-query>
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
Caused by: java.sql.SQLException: JZ00F: Cursor property cannot be changed after the cursor has been declared.
at com.sybase.jdbc2.jdbc.ErrorMessage.raiseError(ErrorMessage.java:500)
at com.sybase.jdbc2.tds.TdsCursor.checkState(TdsCursor.java:493)
at com.sybase.jdbc2.tds.TdsCursor.setName(TdsCursor.java:68)
at com.sybase.jdbc2.jdbc.SybStatement.setCursorName(SybStatement.java:630)
at com.ibm.websphere.rsadapter.SybaseDataStoreHelper.doStatementCleanup(SybaseDataStoreHelper.java:146)
at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.closeWrapper(WSJdbcPreparedStatement.java(Compiled Co
de))
at com.ibm.ws.rsadapter.jdbc.WSJdbcCallableStatement.closeWrapper(WSJdbcCallableStatement.java:163)
at com.ibm.ws.rsadapter.jdbc.WSJdbcObject.close(WSJdbcObject.java(Compiled Code))
at org.hibernate.jdbc.AbstractBatcher.closePreparedStatement(AbstractBatcher.java(Inlined Compiled Code))
at org.hibernate.jdbc.AbstractBatcher.closeStatement(AbstractBatcher.java(Inlined Compiled Code))
at org.hibernate.jdbc.AbstractBatcher.closeQueryStatement(AbstractBatcher.java(Compiled Code))
at org.hibernate.jdbc.AbstractBatcher.closeQueryStatement(AbstractBatcher.java(Compiled Code))
at org.hibernate.loader.Loader.getResultSet(Loader.java(Compiled Code))
Name and version of the database you are using:
Sybase