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

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值