zoukankan      html  css  js  c++  java
  • java程序“Database error recovering from misfires”和“Failure obtaining db row lock: Table 'jmeter.QRTZ_LOCKS' doesn't exist”

    OS:centos 7

    JDK:1.8

    DB:mysql

    应用:tomcat

    war包从windows平台迁移到centos平台,日志中提示错误,并且添加Quartz定时任务失败,提示“创建定时任务失败”,并且应用日志中有报错。

    2021-02-09 14:00:00.104 [QuartzScheduler_RenrenScheduler-localhost.localdomain1612849157555_MisfireHandler] ERROR o.s.scheduling.quartz.LocalDataSourceJobStore - MisfireHandler: Error handling misfires: Database error recovering from misfires.
    org.quartz.JobPersistenceException: Database error recovering from misfires.
            at org.quartz.impl.jdbcjobstore.JobStoreSupport.doRecoverMisfires(JobStoreSupport.java:3274)
            at org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.manage(JobStoreSupport.java:4012)
            at org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.run(JobStoreSupport.java:4033)
    
    2021-02-09 14:09:29.805 [QuartzScheduler_RenrenScheduler-localhost.localdomain1612849157555_ClusterManager] ERROR o.s.scheduling.quartz.LocalDataSourceJobStore - ClusterManager: Error managing cluster: Failure obtaining db row lock: Table 'jmeter.QRTZ_LOCKS' doesn't exist
    org.quartz.impl.jdbcjobstore.LockException: Failure obtaining db row lock: Table 'jmeter.QRTZ_LOCKS' doesn't exist
            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.doCheckin(JobStoreSupport.java:3335)
            at org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager.manage(JobStoreSupport.java:3935)
            at org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager.run(JobStoreSupport.java:3972)
    Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'jmeter.QRTZ_LOCKS' doesn't exist
            at sun.reflect.GeneratedConstructorAccessor93.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:404)
            at com.mysql.jdbc.Util.getInstance(Util.java:387)
            at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:939)
            at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3878)
            at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3814)
            at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2478)
            at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2625)
            at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2551)
            at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1861)
            at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1962)
            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:123)
            ... 4 common frames omitted

    解决办法:

    linux系统下修改Mysql的my.cnf配置文件, 在[mysqld]在下面增加一行

    lower_case_table_names=1

    0:大小写敏感;
    1:大小写不敏感

    重启一下数据库和应用,问题解决。

     

      
  • 相关阅读:
    C和C++内存模型
    makefile 学习归纳
    为知笔记给你更多
    二级指针探讨
    使用vscode书写博客
    C/C++ 笔试题一
    从一段经典错误代码说起——关于局部变量指针和函数传参的问题分析
    socket编程再分析(-)——基础
    samba服务器配置
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />详解
  • 原文地址:https://www.cnblogs.com/zhuque/p/14395716.html
Copyright © 2011-2022 走看看