Declare Cursor Thrown during BPM Engine Startup (Doc ID 1615749.1)

Last updated on OCTOBER 25, 2016

Applies to:

Oracle Business Process Management Suite - Version 10.3.3 to 10.3.3 [Release AS10gR3]
Information in this document applies to any platform.

Symptoms

When attempting to start the engine, the following exception error message occurs:

[14/01/14 17.06.29:151 CET] 0000003b LocalExceptio E   CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method "sendLaterItems" on bean "BeanId(01-eng-bpmengine#engine-bpmengine.jar#engine-startup-bpmengine, null)". Exception data: fuego.server.exception.EngineRuntimeException: Server runtime exception. An error occurred while accesing the database.
Detail:SQL statement: ' SELECT DUETIME, ID, PROCESSID, INSTID, THREADID, ANCESTORTHREADID, TSTAMP, TYPE, ACTIVITYNAME, ORIGINPROCESSDN, REALTHREADID, NETYPE, PRIORITY, LATER, DATA  FROM PTODOITEMS WITH (ROWLOCK , UPDLOCK)  WHERE DUETIME < 2014-01-14 17:06:29.072 AND LATER = true ORDER BY DUETIME, PROCESSID, ID FOR UPDATE'

at fuego.ejbengine.EJBToDoQueue.executeItem(EJBToDoQueue.java:316)
at fuego.ejbengine.EJBToDoQueue.sendLaterItems(EJBToDoQueue.java:254)
at fuego.ejbengine.cluster.DistributedEJBToDoQueue.sendLaterItems(DistributedEJBToDoQueue.java:86)
at fuego.ejbengine.ejb.EngineStartupBean.sendLaterItems(EngineStartupBean.java:160)
at fuego.ejbengine.interfaces.EJSLocalStatelessengine_startup_bpmengine_2e95367d.sendLaterItems(Unknown Source)
at fuego.ejbengine.servlet.SchedulerServlet$SendItemsTask.runImpl(SchedulerServlet.java:94)
at fuego.ejbengine.servlet.AbstractSchedulerServlet$ScheduledTask.run(AbstractSchedulerServlet.java:199)
at java.util.Timer$TimerImpl.run(Timer.java:296)
Caused by: fuego.transaction.DatabaseException: An error occurred while accesing the database.
Detail:SQL statement: ' SELECT DUETIME, ID, PROCESSID, INSTID, THREADID, ANCESTORTHREADID, TSTAMP, TYPE, ACTIVITYNAME, ORIGINPROCESSDN, REALTHREADID, NETYPE, PRIORITY, LATER, DATA  FROM PTODOITEMS WITH (ROWLOCK , UPDLOCK)  WHERE DUETIME < 2014-01-14 17:06:29.072 AND LATER = true ORDER BY DUETIME, PROCESSID, ID FOR UPDATE'

at fuego.server.persistence.jdbc.JdbcToDoItemPersMgr.getExpiredItemsByType(JdbcToDoItemPersMgr.java:218)
at fuego.server.persistence.jdbc.JdbcToDoItemPersMgr.getAllLaterExpiredItems(JdbcToDoItemPersMgr.java:112)
at fuego.server.persistence.Persistence.getAllLaterExpiredToDoItems(Persistence.java:96)
at fuego.ejbengine.EJBToDoQueue$SendLaterItem.execute(EJBToDoQueue.java:861)
at fuego.server.execution.DefaultEngineExecution$AtomicExecutionTA.runTransaction(DefaultEngineExecution.java:304)
at fuego.transaction.TransactionAction.startBaseTransaction(TransactionAction.java:470)
at fuego.transaction.TransactionAction.startTransaction(TransactionAction.java:551)
at fuego.transaction.TransactionAction.start(TransactionAction.java:212)
at fuego.server.execution.DefaultEngineExecution.executeImmediate(DefaultEngineExecution.java:123)
at fuego.server.execution.DefaultEngineExecution.executeAutomaticWork(DefaultEngineExecution.java:62)
at fuego.server.execution.EngineExecution.executeAutomaticWork(EngineExecution.java:42)
at fuego.ejbengine.EJBToDoQueue.executeItem(EJBToDoQueue.java:313)
... 7 more
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Line 1: FOR UPDATE clause allowed only for DECLARE CURSOR.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:196)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1454)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:388)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:338)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4026)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1416)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:185)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:160)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(SQLServerPreparedStatement.java:281)
at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.pmiExecuteQuery(WSJdbcPreparedStatement.java:1082)
at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.executeQuery(WSJdbcPreparedStatement.java:703)
at fuego.jdbc.FaultTolerantPreparedStatement.executeQuery(FaultTolerantPreparedStatement.java:603)
at fuego.server.persistence.jdbc.JdbcToDoItemPersMgr.getExpiredItemsByType(JdbcToDoItemPersMgr.java:204)
... 18 more

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms