NutzCN Logo
问答 nutzwk切换数据库之后表不存在
发布于 2588天前 作者 qq_d6d46f6d 2414 次浏览 复制 上一个帖子 下一个帖子
标签: nutzwk

使用数据同步到服务器所在的数据库之后,日志提示表不存在
bank.SYS_QRTZ_LOCKS

[DEBUG] 2017-11-02 21:10:36,002 org.quartz.impl.jdbcjobstore.StdRowLockSemaphore.executeSQL(StdRowLockSemaphore.java:92) - Lock 'STATE_ACCESS' is being obtained: QuartzScheduler_defaultScheduler-localhost1509628112011_ClusterManager
[DEBUG] 2017-11-02 21:10:36,003 org.quartz.impl.jdbcjobstore.StdRowLockSemaphore.executeSQL(StdRowLockSemaphore.java:141) - Lock 'STATE_ACCESS' was not obtained by: QuartzScheduler_defaultScheduler-localhost1509628112011_ClusterManager
[DEBUG] 2017-11-02 21:10:43,303 org.quartz.impl.jdbcjobstore.DBSemaphore.obtainLock(DBSemaphore.java:107) - Lock 'STATE_ACCESS' is desired by: QuartzScheduler_defaultScheduler-localhost1509628104298_ClusterManager
[DEBUG] 2017-11-02 21:10:43,304 org.quartz.impl.jdbcjobstore.StdRowLockSemaphore.executeSQL(StdRowLockSemaphore.java:92) - Lock 'STATE_ACCESS' is being obtained: QuartzScheduler_defaultScheduler-localhost1509628104298_ClusterManager
[DEBUG] 2017-11-02 21:10:43,304 org.quartz.impl.jdbcjobstore.StdRowLockSemaphore.executeSQL(StdRowLockSemaphore.java:141) - Lock 'STATE_ACCESS' was not obtained by: QuartzScheduler_defaultScheduler-localhost1509628104298_ClusterManager - will try again.
[DEBUG] 2017-11-02 21:10:44,304 org.quartz.impl.jdbcjobstore.StdRowLockSemaphore.executeSQL(StdRowLockSemaphore.java:92) - Lock 'STATE_ACCESS' is being obtained: QuartzScheduler_defaultScheduler-localhost1509628104298_ClusterManager
[DEBUG] 2017-11-02 21:10:44,305 org.quartz.impl.jdbcjobstore.StdRowLockSemaphore.executeSQL(StdRowLockSemaphore.java:141) - Lock 'STATE_ACCESS' was not obtained by: QuartzScheduler_defaultScheduler-localhost1509628104298_ClusterManager - will try again.
[DEBUG] 2017-11-02 21:10:45,305 org.quartz.impl.jdbcjobstore.StdRowLockSemaphore.executeSQL(StdRowLockSemaphore.java:92) - Lock 'STATE_ACCESS' is being obtained: QuartzScheduler_defaultScheduler-localhost1509628104298_ClusterManager
[DEBUG] 2017-11-02 21:10:45,306 org.quartz.impl.jdbcjobstore.StdRowLockSemaphore.executeSQL(StdRowLockSemaphore.java:141) - Lock 'STATE_ACCESS' was not obtained by: QuartzScheduler_defaultScheduler-localhost1509628104298_ClusterManager
[ERROR] 2017-11-02 21:10:45,306 org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager.manage(JobStoreSupport.java:3880) - ClusterManager: Error managing cluster: Failure obtaining db row lock: Table 'bank.SYS_QRTZ_LOCKS' doesn't exist
org.quartz.impl.jdbcjobstore.LockException: Failure obtaining db row lock: Table 'bank.SYS_QRTZ_LOCKS' doesn't exist [See nested exception: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'bank.SYS_QRTZ_LOCKS' doesn't exist]
	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.doCheckin(JobStoreSupport.java:3274)
	at org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager.manage(JobStoreSupport.java:3874)
	at org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager.run(JobStoreSupport.java:3911)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'bank.SYS_QRTZ_LOCKS' doesn't exist
	at sun.reflect.GeneratedConstructorAccessor63.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
	at com.mysql.jdbc.Util.getInstance(Util.java:408)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:943)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3973)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3909)
	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2527)
	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2680)
	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2501)
	at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1858)
	at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1966)
	at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeQuery(FilterChainImpl.java:2714)
	at com.alibaba.druid.filter.FilterEventAdapter.preparedStatement_executeQuery(FilterEventAdapter.java:465)
	at com.alibaba.druid.filter.FilterChainImpl.preparedStatement_executeQuery(FilterChainImpl.java:2711)
	at com.alibaba.druid.proxy.jdbc.PreparedStatementProxyImpl.executeQuery(PreparedStatementProxyImpl.java:145)
	at com.alibaba.druid.pool.DruidPooledPreparedStatement.executeQuery(DruidPooledPreparedStatement.java:227)
	at org.quartz.impl.jdbcjobstore.StdRowLockSemaphore.executeSQL(StdRowLockSemaphore.java:96)
	... 4 more

但该表实际存在的,请问该如何调整

6 回复

程序没重启?连错数据库?

链接没错应该,前后台工程链接同一个库。前台可以链接,后台会报上面这个错。

本地后台工程链接这个新库也是报这个

SYS_QRTZ_LOCKS 这个表必须得有wk自己建才可以

大小写问题?

今天也遇到了,SYS_QRTZ_开头的表需要系统自己建才行

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