org.quartz.impl.jdbcjobstore.LockException
2024-08-25 18:18:25
说明:在使用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
最新文章
- 【WebGoat习题解析】AJAX Security->;Insecure Client Storage
- cnavas
- IntentService源码分析
- RDIFramework.NET ━ 9.16 案例模块━ Web部分
- 2015某编程网易语言vip课堂全套教程 包含post,hook入门到精通等
- 查询一个ID出现2种结果的情况
- mysql中character_set_connection的作用
- 如何避免JavaScript的内存泄露及内存管理技巧
- Gym 100507L	Donald is a postman (水题)
- 使用date转换UNIX时间戳
- Linux内核学习笔记-1.简介和入门
- 简单使用JSON,JavaScript读取JSON文本(三)
- php 中文转拼音首字母问题
- CSS实现的几款不错的菜单栏
- Spring @Transactional 使用
- Mysql ibd文件恢复指南
- Android为TV端助力context转换类型
- Stackoverflow热门问题
- Spark操作parquet文件
- 开源性能测试工具Locust使用篇(一)