定时任务表名在程序里是大写,导致启动程序报错找不到对应的表
wangshuai1810 opened this issue · 3 comments
wangshuai1810 commented
定时任务的表名在程序里统一写成小写是不是更符合规范啊
githubname1024 commented
烦请告知一下,数据库的版本,和当前的报错信息。我们这边check一下
wangshuai1810 commented
(一)、部分错误日志信息抓取如下:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'schedulerCenter': Unsatisfied dependency expressed through field 'clusterScheduler'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'clusterScheduler' defined in class path resource [spring/spring-quartz.xml]: Invocation of init method failed; nested exception is org.quartz.JobPersistenceException: Couldn't retrieve trigger: Table 'cachecloud-open.QRTZ_TRIGGERS' doesn't exist [See nested exception: java.sql.SQLSyntaxErrorException: Table 'cachecloud-open.QRTZ_TRIGGERS' doesn't exist]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:643)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:130)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1420)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:897)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:879)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
at com.sohu.cache.ApplicationStarter.main(ApplicationStarter.java:26)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:51)
at org.springframework.boot.loader.WarLauncher.main(WarLauncher.java:58)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'clusterScheduler' defined in class path resource [spring/spring-quartz.xml]: Invocation of init method failed; nested exception is org.quartz.JobPersistenceException: Couldn't retrieve trigger: Table 'cachecloud-open.QRTZ_TRIGGERS' doesn't exist [See nested exception: java.sql.SQLSyntaxErrorException: Table 'cachecloud-open.QRTZ_TRIGGERS' doesn't exist]
(二)、数据库采用的:
mysql> select version();
+-----------+
| version() |
+-----------+
| 8.0.29 |
+-----------+
王帅
***@***.***
…------------------ 原始邮件 ------------------
发件人: "sohutv/cachecloud" ***@***.***>;
发送时间: 2022年7月25日(星期一) 上午10:01
***@***.***>;
***@***.******@***.***>;
主题: Re: [sohutv/cachecloud] 定时任务表名在程序里是大写,导致启动程序报错找不到对应的表 (Issue #292)
烦请告知一下,数据库的版本,和当前的报错信息。我们这边check一下
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
githubname1024 commented