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:大小写不敏感

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

     

      
  • 相关阅读:
    J2EE开发工作中遇到的异常问题及解决方法总结
    报错:1130-host ... is not allowed to connect to this MySql server 开放mysql远程连接 不使用localhost
    配置JAVA的环境变量
    win7系统下ping不是内部或外部命令
    【pyhon】理想论坛单帖爬虫取得信息存入MySql数据库
    【Python】安装Python的mysql模块
    【Python】爬取理想论坛单帖爬虫
    挖一口井最好的时间除了十年前就是现在
    【Python】http.client库的用法
    【pyhon】nvshens按目录图片批量下载爬虫1.00(多线程版)
  • 原文地址:https://www.cnblogs.com/zhuque/p/14395716.html
Copyright © 2011-2022 走看看