org.quartz.impl.jdbcjobstore.LockException

Failure obtaining db row lock: Line 1: FOR UPDATE clause allowed only for DECLARE CURSOR.

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web454

  • via Unknown by sslavic,
  • Stack trace

    • org.quartz.impl.jdbcjobstore.LockException: Failure obtaining db row lock: Line 1: FOR UPDATE clause allowed only for DECLARE CURSOR. at org.quartz.impl.jdbcjobstore.StdRowLockSemaphore.executeSQL(StdRowLockSemaphore.java:115)[quartz-2.0.0.jar:na] at org.quartz.impl.jdbcjobstore.DBSemaphore.obtainLock(DBSemaphore.java:117)[quartz-2.0.0.jar:na] at org.quartz.impl.jdbcjobstore.JobStoreSupport.doCheckin(JobStoreSupport.java:3174)[quartz-2.0.0.jar:na] at org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager.manage(JobStoreSupport.java:3783)[quartz-2.0.0.jar:na] at org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager.initialize(JobStoreSupport.java:3770)[quartz-2.0.0.jar:na] at org.quartz.impl.jdbcjobstore.JobStoreSupport.schedulerStarted(JobStoreSupport.java:653)[quartz-2.0.0.jar:na] at org.quartz.core.QuartzScheduler.start(QuartzScheduler.java:507)[quartz-2.0.0.jar:na] at org.quartz.impl.StdScheduler.start(StdScheduler.java:143)[quartz-2.0.0.jar:na] at org.springframework.scheduling.quartz.SchedulerFactoryBean.startScheduler(SchedulerFactoryBean.java:651)[spring-context-support-3.1.0.M1.jar:3.1.0.M1] at org.springframework.scheduling.quartz.SchedulerFactoryBean.start(SchedulerFactoryBean.java:714)[spring-context-support-3.1.0.M1.jar:3.1.0.M1] at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:166)[spring-context-3.1.0.M1.jar:3.1.0.M1] at org.springframework.context.support.DefaultLifecycleProcessor.access$1(DefaultLifecycleProcessor.java:154)[spring-context-3.1.0.M1.jar:3.1.0.M1] at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:335)[spring-context-3.1.0.M1.jar:3.1.0.M1] at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:143)[spring-context-3.1.0.M1.jar:3.1.0.M1] at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:108)[spring-context-3.1.0.M1.jar:3.1.0.M1] at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:913)[spring-context-3.1.0.M1.jar:3.1.0.M1] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:458)[spring-context-3.1.0.M1.jar:3.1.0.M1] at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:294)[spring-web-3.1.0.M1.jar:3.1.0.M1] at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:215)[spring-web-3.1.0.M1.jar:3.1.0.M1] at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)[spring-web-3.1.0.M1.jar:3.1.0.M1] at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4681)[catalina.jar:7.0.11] at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5184)[catalina.jar:7.0.11] at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5179)[catalina.jar:7.0.11] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[na:1.6.0_24] at java.util.concurrent.FutureTask.run(FutureTask.java:138)[na:1.6.0_24] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[na:1.6.0_24] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[na:1.6.0_24] at java.lang.Thread.run(Thread.java:662)[na:1.6.0_24] Caused by: java.sql.SQLException: Line 1: FOR UPDATE clause allowed only for DECLARE CURSOR. at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:368)[jtds-1.2.4.jar:1.2.4] at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2820)[jtds-1.2.4.jar:1.2.4] at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2258)[jtds-1.2.4.jar:1.2.4] at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:632)[jtds-1.2.4.jar:1.2.4] at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:477)[jtds-1.2.4.jar:1.2.4] at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeQuery(JtdsPreparedStatement.java:778)[jtds-1.2.4.jar:1.2.4] at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)[commons-dbcp-1.4.jar:1.4] at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)[commons-dbcp-1.4.jar:1.4] at org.quartz.impl.jdbcjobstore.StdRowLockSemaphore.executeSQL(StdRowLockSemaphore.java:85)[quartz-2.0.0.jar:na] ... 27 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown visitor
    Unknown visitorOnce,
    oddodd
    2 times, last one
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    ruifungruifung
    Once,
    24 more bugmates