zoukankan      html  css  js  c++  java
  • org.quartz.impl.jdbcjobstore.LockException

    说明:在使用Tomcat6.0.32+Spring3.05+Quartz1.8.6+Mysql5.5.9 此项目在我本机上没有问题,当我把mysql 脚本导入到服务器上,将数据源配置修改为服务器对应的mysql时,再次运行程序出现以下问题,

    错误信息如下:

    严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scheduler' defined in ServletContext resource [/WEB-INF/spring-conf.xml]: Invocation of init method failed; nested exception is org.quartz.SchedulerConfigException: Failure occured during job recovery. [See nested exception: org.quartz.impl.jdbcjobstore.LockException: Failure obtaining db row lock: Table 'wzhpush2.qrtz_LOCKS' doesn't exist [See nested exception: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'wzhpush2.qrtz_LOCKS' doesn't exist]]
        

    明明我的表都是存在的,却提示:Table 'wzhpush2.qrtz_LOCKS' doesn't exist。

    最后找到原因是:我本地是Window平台,此平台下面Mysql默认是不区分下小写的,而服务器时Linux平台,在linux平台下面Mysql默认是严格区分大小写的。此时,修改Mysql配置文件让其不区分大小写,问题解决。。
    >sudo vim /etc/mysql/my.cnf

    在[mysqld]下面添加:

    lower_case_table_names = 1

    然后保存退出,重启Mysql

    >sudo restart mysql

  • 相关阅读:
    mysql中InnoDB存储引擎的行锁和表锁
    阿里云出海 埃森哲护航
    阿里云出海 埃森哲护航
    阿里云出海 埃森哲护航
    阿里云出海 埃森哲护航
    Python开发简单爬虫
    Python开发简单爬虫
    Python开发简单爬虫
    Python开发简单爬虫
    问大家一个问题,如何用1万元创业,每天利润达到500元?
  • 原文地址:https://www.cnblogs.com/yshyee/p/3620107.html
Copyright © 2011-2022 走看看