Mysql从Windows迁移到Linux,遇到的坑

最近有个项目从Windows上迁移到Linux上,数据库在迁移成功,但是项目无法启动

[BPM] 2018-09-23 17:04:52 ERROR [localhost-startStop-1] ContextLoader.initWebApplicationContext(307) | Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sysUserSyncService': Injection of resource dependencies failed; nested e
xception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sysUserService': Injection of resource dependencies failed;
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bpmNodeUserService': Injection of resource dependenc
ies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bpmNodeUserCalculationSelector' defined
in class path resource [conf/app-beans.xml]: Cannot resolve reference to bean 'sameNodeCalculationDepartment' while setting bean property 'bpmNodeUserCalculatio
n' with key [TypedStringValue: value [sameNodeDepartment], target type [null]]; nested exception is org.springframework.beans.factory.BeanCreationException: Err
or creating bean with name 'sameNodeCalculationDepartment': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.Bea
nCreationException: Error creating bean with name 'taskOpinionService': Injection of resource dependencies failed; nested exception is org.springframework.beans
.factory.BeanCreationException: Error creating bean with name 'bpmService': Injection of resource dependencies failed; nested exception is org.springframework.b
eans.factory.BeanCreationException: Error creating bean with name 'proce***unService': Injection of resource dependencies failed; nested exception is org.spring
framework.beans.factory.BeanCreationException: Error creating bean with name 'taskSignDataService': Injection of resource dependencies failed; nested exception
is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'processEngine': FactoryBean threw exception on object creation; neste
d exception is org.activiti.engine.ActivitiException: no activiti tables in db. set <property name="databaseSchemaUpdate" to value="true" or value="create-drop"
 (use create-drop for testing only!) in bean processEngineConfiguration in activiti.cfg.xml for automatic schema creation
        at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:307)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1106)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:609)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:469)
        at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:383)

.....省略.....

但是该Linux上的项目连接Windows上的数据库,并没有这个错误,所以确定问题所在是Linux的数据库有问题,经过几番研究,发现问题所在!
Mysql在Windows下默认对大小写不敏感,但在Linux下默认区分大小写的!!
所以在配置文件上添加lower_case_table_names=1,重启Mysql,再重启项目,成功!

转载于:https://blog.51cto.com/mysky0708/2287974

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值