• 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

  • 相关阅读:
    [转]html js中name和id的区别和使用分析
    【转】JSP中文乱码问题终极解决方案
    jsp内置对象作业3-application用户注册
    jsp内置对象作业2-留言簿
    jsp内置对象作业1-用户登录
    【转】HTTP协议详解
    [转]response.getWriter().write()与out.print()的区别
    [转]Cookie/Session机制详解
    【转】伪类选择器
    【转】Web前端浏览器兼容初探
  • 原文地址:https://www.cnblogs.com/yshyee/p/3620107.html
Copyright © 2020-2023  润新知