Support Topics Documentation Slack YouTube Blog

Error on deploy business logic

Application ID: 5DA64846-E3FA-C63E-FF1B-E265995AA700
Error UID: 5D4E984A-B96D-0428-FF8F-D40D03569900

Backendless encountered an error while handling the request. An internal trouble ticket with ID 5D4E984A-B96D-0428-FF8F-D40D03569900 has been created and we will be investigating the issue.
org.quartz.impl.jdbcjobstore.LockException: Failure obtaining db row lock: A problem occurred while trying to acquire a cached PreparedStatement in a background thread. [See nested exception: java.sql.SQLException: A problem occurred while trying to acquire a cached PreparedStatement in a background thread.]
java.lang.RuntimeException: org.quartz.impl.jdbcjobstore.LockException: Failure obtaining db row lock: A problem occurred while trying to acquire a cached PreparedStatement in a background thread. [See nested exception: java.sql.SQLException: A problem occurred while trying to acquire a cached PreparedStatement in a background thread.]
	at com.backendless.taskman.timers.TimerExecutorImpl.delete(TimerExecutorImpl.java:340)
	at com.backendless.taskman.timers.TimerExecutorImpl.delete(TimerExecutorImpl.java:304)
	at com.backendless.management.servercode.TimerService.lambda$stopTimers$2(TimerService.java:262)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
	at com.backendless.management.servercode.TimerService.stopTimers(TimerService.java:262)
	at controllers.console.ServerCode.lambda$deployDraft$1(ServerCode.java:127)
	at com.backendless.async.ExecutorService.lambda$submit$0(ExecutorService.java:64)
	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.quartz.impl.jdbcjobstore.LockException: Failure obtaining db row lock: A problem occurred while trying to acquire a cached PreparedStatement in a background thread. [See nested exception: java.sql.SQLException: A problem occurred while trying to acquire a cached PreparedStatement in a background thread.]
	at org.quartz.impl.jdbcjobstore.StdRowLockSemaphore.executeSQL(StdRowLockSemaphore.java:184)
	at org.quartz.impl.jdbcjobstore.DBSemaphore.obtainLock(DBSemaphore.java:113)
	at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3857)
	at org.quartz.impl.jdbcjobstore.JobStoreTX.executeInLock(JobStoreTX.java:93)
	at org.quartz.impl.jdbcjobstore.JobStoreSupport.removeTrigger(JobStoreSupport.java:1428)
	at org.quartz.core.QuartzScheduler.unscheduleJob(QuartzScheduler.java:1065)
	at org.quartz.core.QuartzScheduler.deleteJob(QuartzScheduler.java:960)
	at org.quartz.impl.StdScheduler.deleteJob(StdScheduler.java:301)
	at com.backendless.taskman.timers.TimerExecutorImpl.delete(TimerExecutorImpl.java:335)
	... 10 more
Caused by: java.sql.SQLException: A problem occurred while trying to acquire a cached PreparedStatement in a background thread.
	at com.mchange.v2.c3p0.stmt.GooGooStatementCache.acquireStatement(GooGooStatementCache.java:571)
	at com.mchange.v2.c3p0.stmt.GooGooStatementCache.checkoutStatement(GooGooStatementCache.java:204)
	at com.mchange.v2.c3p0.impl.NewPooledConnection.checkoutStatement(NewPooledConnection.java:321)
	at com.mchange.v2.c3p0.impl.NewProxyConnection.prepareStatement(NewProxyConnection.java:373)
	at jdk.internal.reflect.GeneratedMethodAccessor1654.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.quartz.impl.jdbcjobstore.AttributeRestoringConnectionInvocationHandler.invoke(AttributeRestoringConnectionInvocationHandler.java:73)
	at com.sun.proxy.$Proxy268.prepareStatement(Unknown Source)
	at org.quartz.impl.jdbcjobstore.StdRowLockSemaphore.executeSQL(StdRowLockSemaphore.java:115)
	... 18 more
Caused by: java.sql.SQLNonTransientConnectionException: No operations allowed after connection closed.
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:110)
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:89)
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:63)
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:73)
	at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:73)
	at com.mysql.cj.jdbc.ConnectionImpl.prepareStatement(ConnectionImpl.java:1659)
	at com.mysql.cj.jdbc.ConnectionImpl.prepareStatement(ConnectionImpl.java:1575)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at com.mchange.v2.c3p0.stmt.GooGooStatementCache$1StmtAcquireTask.run(GooGooStatementCache.java:547)
	at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)
Caused by: com.mysql.cj.exceptions.ConnectionIsClosedException: No operations allowed after connection closed.
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
	at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61)
	at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:105)
	at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:151)
	at com.mysql.cj.NativeSession.checkClosed(NativeSession.java:1171)
	at com.mysql.cj.jdbc.ConnectionImpl.checkClosed(ConnectionImpl.java:576)
	at com.mysql.cj.jdbc.ConnectionImpl.prepareStatement(ConnectionImpl.java:1590)
	... 7 more
Caused by: com.mysql.cj.exceptions.CJCo

Problem description

Describe what you did in console that led to the error. Please provide a description of what actually happens. Be descriptive: “it doesn’t work” does not describe what the behavior actually is. This will help us with reproducing the problem.

Steps to reproduce

Please describe steps to reproduce starting from the first action.

What actions lead to the error?

I’ve checked all your timers. They exist and they are active.
Please, clarify, how can I reproduce the problem.

It occurs sometime,I am unable to deploy API changes


Please check this, Its ocurring many times now.
I created logic and now I am unable to deploy it.
It will work after refresh but I’ll lost my changes

Hi @Baljeet_Singh !

Sorry for inconvenience. I have created internal ticket BKNDLSS-24539 for this problem. Our engineers will look to it and will release fix as soon as possible.

There is no need to reload page when you encounter such exception - it caused by failed attempt to obtain lock for timer. You can try to wait for some time, so lock will be released by other process, and repeat deploy operation.

Regards, Andriy