NutzCN Logo
问答 task运行出错,行锁失败,搞不清楚什么原因
发布于 2398天前 作者 qq_d08a65b6 3057 次浏览 复制 上一个帖子 下一个帖子
标签:
[DEBUG][2018-05-30 17:34:20][DecodeHandler:58] -  [DUBBO] Decode decodeable message com.alibaba.dubbo.rpc.protocol.dubbo.DecodeableRpcResult, dubbo version: 5.0.1-SNAPSHOT, current host: 120.76.188.31
[DEBUG][2018-05-30 17:34:20][NutIoc:166] - Get 'globals'<class cn.wizzer.app.task.commons.base.Globals>
[DEBUG][2018-05-30 17:34:20][NutIoc:192] - 	 >> Load definition name=globals
[DEBUG][2018-05-30 17:34:20][ComboIocLoader:226] - Found IocObject(globals) in AnnotationIocLoader(packages=[cn.wizzer])
[DEBUG][2018-05-30 17:34:20][NutIoc:223] - 	 >> Make...'globals'<class cn.wizzer.app.task.commons.base.Globals>
[DEBUG][2018-05-30 17:34:20][ScopeContext:65] - Save object 'globals' to [app] 
[DEBUG][2018-05-30 17:34:20][DefaultMirrorFactory:76] - Load class cn.wizzer.app.task.commons.base.Globals without AOP
[DEBUG][2018-05-30 17:34:20][ReferTypeValue:64] - name=taskPlatformService not found, search for type=cn.wizzer.app.task.modules.services.TaskPlatformService
[DEBUG][2018-05-30 17:34:20][NutIoc:166] - Get 'taskPlatformServiceImpl'<interface cn.wizzer.app.task.modules.services.TaskPlatformService>
[DEBUG][2018-05-30 17:34:20][DBSemaphore:107] - Lock 'TRIGGER_ACCESS' is desired by: main
[DEBUG][2018-05-30 17:34:20][StdRowLockSemaphore:92] - Lock 'TRIGGER_ACCESS' is being obtained: main
[DEBUG][2018-05-30 17:34:20][StdRowLockSemaphore:141] - Lock 'TRIGGER_ACCESS' was not obtained by: main - will try again.
[DEBUG][2018-05-30 17:34:21][StdRowLockSemaphore:92] - Lock 'TRIGGER_ACCESS' is being obtained: main
[DEBUG][2018-05-30 17:34:21][StdRowLockSemaphore:141] - Lock 'TRIGGER_ACCESS' was not obtained by: main - will try again.
[DEBUG][2018-05-30 17:34:22][StdRowLockSemaphore:92] - Lock 'TRIGGER_ACCESS' is being obtained: main
[DEBUG][2018-05-30 17:34:22][StdRowLockSemaphore:141] - Lock 'TRIGGER_ACCESS' was not obtained by: main
[DEBUG][2018-05-30 17:34:22][ScopeContext:85] - Remove object 'taskMainLauncher' from [app] 
[ERROR][2018-05-30 17:34:22][NbApp:218] - something happen!!
org.nutz.ioc.IocException: IocBean[taskMainLauncher] throw Exception when creating
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:152)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:241)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:271)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:161)
	at org.nutz.boot.NbApp.execute(NbApp.java:208)
	at org.nutz.boot.NbApp.run(NbApp.java:177)
	at cn.wizzer.app.task.commons.core.TaskMainLauncher.main(TaskMainLauncher.java:49)
Caused by: java.lang.RuntimeException: org.quartz.impl.jdbcjobstore.LockException: Failure obtaining db row lock: Line 1: FOR UPDATE clause allowed only for DECLARE CURSOR. [See nested exception: com.microsoft.sqlserver.jdbc.SQLServerException: Line 1: FOR UPDATE clause allowed only for DECLARE CURSOR.]
	at org.nutz.integration.quartz.QuartzManagerImpl.clear(QuartzManagerImpl.java:192)
	at cn.wizzer.app.task.modules.services.impl.TaskPlatformServiceImpl.clear(TaskPlatformServiceImpl.java:70)
	at cn.wizzer.app.task.commons.base.Globals.init(Globals.java:23)
	at cn.wizzer.app.task.commons.core.TaskMainLauncher.init(TaskMainLauncher.java:91)
	at cn.wizzer.app.task.commons.core.TaskMainLauncher$FM$init$fd3a93ac716761ef652deda007bf9ab8.invoke(TaskMainLauncher.java)
	at org.nutz.ioc.impl.ObjectMakerImpl$2.trigger(ObjectMakerImpl.java:180)
	at org.nutz.ioc.weaver.DefaultWeaver.onCreate(DefaultWeaver.java:89)
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:141)
	... 6 more
Caused by: org.quartz.impl.jdbcjobstore.LockException: Failure obtaining db row lock: Line 1: FOR UPDATE clause allowed only for DECLARE CURSOR. [See nested exception: com.microsoft.sqlserver.jdbc.SQLServerException: Line 1: FOR UPDATE clause allowed only for DECLARE CURSOR.]
	at org.quartz.impl.jdbcjobstore.StdRowLockSemaphore.executeSQL(StdRowLockSemaphore.java:157)
	at org.quartz.impl.jdbcjobstore.DBSemaphore.obtainLock(DBSemaphore.java:113)
	at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3842)
	at org.quartz.impl.jdbcjobstore.JobStoreTX.executeInLock(JobStoreTX.java:93)
	at org.quartz.impl.jdbcjobstore.JobStoreSupport.clearAllSchedulingData(JobStoreSupport.java:2002)
	at org.quartz.core.QuartzScheduler.clear(QuartzScheduler.java:1541)
	at org.quartz.impl.StdScheduler.clear(StdScheduler.java:239)
	at org.nutz.integration.quartz.QuartzManagerImpl.clear(QuartzManagerImpl.java:189)
	... 13 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:259)
	at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1547)
	at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:548)
	at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:479)
	at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7344)
	at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:2713)
	at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:224)
	at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:204)
	at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(SQLServerPreparedStatement.java:401)
	at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeQuery(FilterChainImpl.java:2830)
	at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_executeQuery(FilterEventAdapter.java:465)
	at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeQuery(FilterChainImpl.java:2827)
	at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.executeQuery(PreparedStatementProxyImpl.java:181)
	at com.alibaba.druid.pool.DruidPooledPreparedStatement.executeQuery(DruidPooledPreparedStatement.java:228)
	at org.quartz.impl.jdbcjobstore.StdRowLockSemaphore.executeSQL(StdRowLockSemaphore.java:96)
	... 20 more
[INFO][2018-05-30 17:34:22][QuartzScheduler:666] - Scheduler defaultScheduler_$_iZ941ikdiixZ1527672856535 shutting down.
[INFO][2018-05-30 17:34:22][QuartzScheduler:585] - Scheduler defaultScheduler_$_iZ941ikdiixZ1527672856535 paused.
[DEBUG][2018-05-30 17:34:22][SimpleThreadPool:328] - Shutting down threadpool...
2 回复

把clear注释掉试试

注释后还是报这个错,但程序没有关闭,之前报错后是会自动关闭的

添加回复
请先登陆
回到顶部