I have an application running fine "in production" using Cayenne 1.2M9,
but when testing it locally with Cayenne 1.2 RC1, I get this exception:
Exception = com.sybase.jdbc2.jdbc.SybSQLException: Stored procedure
'getpid' may be run only in unchained transaction mode. The 'SET CHAINED
OFF' command will cause the current session to use unchained transaction
mode.
I didn't make any changes to the Cayenne portion, just twiddled a few
Tapestry bits and was testing the application out. The error occurs
when I insert a record and need a primary key -- I call a stored
procedure directly using JDBC in my custom PK class (which has been
working perfectly for over a year):
public Object generatePkForDbEntity(DataNode dataNode, DbEntity ent)
throws Exception
{
// Get our connection so we can call the stored procedure
Connection connection =
dataNode.getDataSource().getConnection();
CallableStatement getPID = connection.prepareCall("{call
getpid(?,?,?)}");
// Prepare the stored procedure
getPID.setInt(1, currentBlockSize); // Slot 1: Number of
PIDs requested
getPID.registerOutParameter(2, Types.BINARY); // Slot 2: First PID
allocated
getPID.registerOutParameter(3, Types.INTEGER); // Slot 3: Number of
PIDs allocated
try
{
// Call the stored procedure
getPID.execute();
...
I get the exception on the execute() line.
I did diffs on the Sybase code, but didn't see any changes -- at least
not since it was converted to Subversion.
Anyone have ideas?
Thanks!
/dev/mrg
PS. Auto commit is false.
This archive was generated by hypermail 2.0.0 : Thu Jun 29 2006 - 17:28:34 EDT