Mysql起不来了,运行jar包出错

来源:2-2 运行工作流项目

徐徐徐徐徐徐徐

2021-10-26

我的MySQL好像出了问题,运行jar包后报错了----

PS D:\SpringBoot_Vue3_OfficeSystem_Soft\emos-workflow> java -jar emos-workflow.jar --spring.config.location=application.yml

################################################
#                                              #
#        ## #   #    ## ### ### ##  ###        #
#       # # #   #   # #  #  # # # #  #         #
#       ### #   #   ###  #  # # ##   #         #
#       # # ### ### # #  #  ### # # ###        #
#                                              #
# Obfuscation by Allatori Obfuscator v7.6 DEMO #
#                                              #
#           http://www.allatori.com            #
#                                              #
################################################


  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::                (v2.4.2)

23:32:56  INFO   Starting EmosWorkflowApplication using Java 15.0.2 on LAPTOP-OM4ASB80 with PID 13552 (D:\SpringBoot_Vue3_OfficeSystem_Soft\emos-workflow\emos-workflow.jar started by xulia in D:\SpringBoot_Vue3_OfficeSystem_Soft\emos-workflow)
23:32:56  INFO   No active profile set, falling back to default profiles: default
23:32:59  INFO   Multiple Spring Data modules found, entering strict repository configuration mode!
23:32:59  INFO   Bootstrapping Spring Data Redis repositories in DEFAULT mode.
23:32:59  INFO   Finished Spring Data repository scanning in 12 ms. Found 0 Redis repository interfaces.
23:32:59  INFO   @Bean method DroolsConfiguration.kiePostProcessor is non-static and returns an object assignable to Spring's BeanFactoryPostProcessor interface. This will result in a failure to process annotations such as @Autowired, @Resource and @PostConstruct within the method's declaring @Configuration class. Add the 'static' modifier to this method to avoid these container lifecycle issues; see @Bean javadoc for complete details.
23:32:59  INFO   :: BeanFactoryPostProcessor::postProcessBeanFactory called ::
23:32:59  WARN   Unable to find pom.properties in /D:/SpringBoot_Vue3_OfficeSystem_Soft/emos-workflow/emos-workflow.jar!/BOOT-INF/classes
23:32:59  WARN   As folder project tried to fall back to pom.xml, but could not find one
23:32:59  WARN   Unable to load pom.properties from/D:/SpringBoot_Vue3_OfficeSystem_Soft/emos-workflow/emos-workflow.jar!/BOOT-INF/classes
23:32:59  INFO   Found project with releaseId: org.default:artifact:1.0.0
23:33:00  INFO   Bean 'org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler@339bf286' of type [org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
23:33:00  INFO   Bean 'methodSecurityConfig' of type [org.activiti.spring.boot.MethodSecurityConfig$$EnhancerBySpringCGLIB$$47859193] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
23:33:00  INFO   Bean 'methodSecurityMetadataSource' of type [org.springframework.security.access.method.DelegatingMethodSecurityMetadataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
23:33:00  INFO   Logging initialized @5060ms to org.eclipse.jetty.util.log.Slf4jLog
23:33:00  INFO   Server initialized with port: 9090
23:33:00  INFO   jetty-9.4.35.v20201120; built: 2020-11-20T21:17:03.964Z; git: bdc54f03a5e0a7e280fab27f55c3c75ee8da89fb; jvm 15.0.2+7-27
23:33:00  INFO   Initializing Spring embedded WebApplicationContext
23:33:00  INFO   Root WebApplicationContext: initialization completed in 3677 ms
23:33:00  INFO   DefaultSessionIdManager workerName=node0
23:33:00  INFO   No SessionScavenger set, using defaults
23:33:00  INFO   node0 Scavenging every 660000ms
23:33:00  INFO   Started o.s.b.w.e.j.JettyEmbeddedWebAppContext@3b0f7d9d{application,/emos-workflow,[file:///C:/Users/xulia/AppData/Local/Temp/jetty-docbase.9090.15148840638798673505/],AVAILABLE}
23:33:00  INFO   Started @5695ms
23:33:01  INFO

Using generated security password: 0101bae6-84e6-4a53-91e9-9db693e06fd1

23:33:01  INFO   Init DruidDataSource
23:33:01  INFO   {dataSource-1} inited
23:33:01  INFO   Initializing ExecutorService
23:33:01  INFO   Initializing ExecutorService 'AsyncTaskExecutor'
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.springframework.boot.loader.jar.Handler (file:/D:/SpringBoot_Vue3_OfficeSystem_Soft/emos-workflow/emos-workflow.jar) to constructor sun.net.www.protocol.jar.Handler()
WARNING: Please consider reporting this to the maintainers of org.springframework.boot.loader.jar.Handler
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
23:33:04  INFO   The following process definition files will be deployed: [leave.bpmn20.xml, meeting.bpmn20.xml, reim.bpmn20.xml, leave.bpmn20.xml, meeting.bpmn20.xml, reim.bpmn20.xml]
23:33:04  INFO   Found 1 Process Engine Configurators in total:
23:33:04  INFO   class org.activiti.spring.process.autoconfigure.ProcessExtensionsConfiguratorAutoConfiguration$$EnhancerBySpringCGLIB$$9881b931 (priority:10000)
23:33:04  INFO   Executing beforeInit() of class org.activiti.spring.process.autoconfigure.ProcessExtensionsConfiguratorAutoConfiguration$$EnhancerBySpringCGLIB$$9881b931 (priority:10000)
23:33:05  INFO   Executing configure() of class org.activiti.spring.process.autoconfigure.ProcessExtensionsConfiguratorAutoConfiguration$$EnhancerBySpringCGLIB$$9881b931 (priority:10000)
23:33:05  INFO   ProcessEngine default created
23:33:06  INFO   Using default implementation for ThreadExecutor
23:33:06  INFO   Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
23:33:06  INFO   Quartz Scheduler v.2.3.2 created.
23:33:06  INFO   Using db table-based data access locking (synchronization).
23:33:06  INFO   JobStoreCMT initialized.
23:33:06  INFO   Scheduler meta-data: Quartz Scheduler (v2.3.2) 'quartzScheduler' with instanceId 'NON_CLUSTERED'
  Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
  NOT STARTED.
  Currently in standby mode.
  Number of jobs executed: 0
  Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10 threads.
  Using job-store 'org.springframework.scheduling.quartz.LocalDataSourceJobStore' - which supports persistence. and is not clustered.

23:33:06  INFO   Quartz scheduler 'quartzScheduler' initialized from an externally provided properties instance.
23:33:06  INFO   Quartz scheduler version: 2.3.2
23:33:06  INFO   JobFactory set to: org.springframework.scheduling.quartz.SpringBeanJobFactory@1455154c
23:33:08  INFO   Start creation of KieBase: defaultKieBase
23:33:08  INFO   End creation of KieBase: defaultKieBase
23:33:08  INFO   Will secure any request with [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@110b7837, org.springframework.security.web.context.SecurityContextPersistenceFilter@42679fc2, org.springframework.security.web.header.HeaderWriterFilter@2199e845, org.springframework.security.web.authentication.logout.LogoutFilter@1c046c92, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@100aa331, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@6f6cc7da, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@6ee88e21, org.springframework.security.web.session.SessionManagementFilter@40943a6, org.springframework.security.web.access.ExceptionTranslationFilter@6e8fdd19, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@773c2214]
23:33:09  INFO   Exposing 2 endpoint(s) beneath base path '/actuator'
23:33:09  INFO   Initializing Spring DispatcherServlet 'dispatcherServlet'
23:33:09  INFO   Initializing Servlet 'dispatcherServlet'
23:33:09  INFO   Completed initialization in 2 ms
23:33:09  INFO   Started ServerConnector@55f3c410{HTTP/1.1, (http/1.1)}{0.0.0.0:9090}
23:33:09  INFO   Jetty started on port(s) 9090 (http/1.1) with context path '/emos-workflow'
23:33:09  INFO   Starting Quartz Scheduler now
23:33:11  WARN   Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Failed to start bean 'quartzScheduler'; nested exception is org.springframework.scheduling.SchedulingException: Could not start Quartz Scheduler; 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 'emos.qrtz_locks' doesn't exist [See nested exception: java.sql.SQLSyntaxErrorException: Table 'emos.qrtz_locks' doesn't exist]]
23:33:11  INFO   Shutting down Quartz Scheduler
23:33:11  INFO   Scheduler quartzScheduler_$_NON_CLUSTERED shutting down.
23:33:11  INFO   Scheduler quartzScheduler_$_NON_CLUSTERED paused.
23:33:11  INFO   Scheduler quartzScheduler_$_NON_CLUSTERED shutdown complete.
23:33:12  INFO   Shutting down ExecutorService 'AsyncTaskExecutor'
23:33:12  INFO   {dataSource-1} closed
23:33:12  INFO   Stopped ServerConnector@55f3c410{HTTP/1.1, (http/1.1)}{0.0.0.0:9090}
23:33:12  INFO   node0 Stopped scavenging
23:33:12  INFO   Destroying Spring FrameworkServlet 'dispatcherServlet'
23:33:12  INFO   Stopped o.s.b.w.e.j.JettyEmbeddedWebAppContext@3b0f7d9d{application,/emos-workflow,[file:///C:/Users/xulia/AppData/Local/Temp/jetty-docbase.9090.15148840638798673505/],STOPPED}
23:33:12  INFO

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
23:33:12  ERROR  Application run failed
org.springframework.context.ApplicationContextException: Failed to start bean 'quartzScheduler'; nested exception is org.springframework.scheduling.SchedulingException: Could not start Quartz Scheduler; 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 'emos.qrtz_locks' doesn't exist [See nested exception: java.sql.SQLSyntaxErrorException: Table 'emos.qrtz_locks' doesn't exist]]
        at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:181)
        at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:54)
        at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:356)
        at java.base/java.lang.Iterable.forEach(Iterable.java:75)
        at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:155)
        at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:123)
        at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:940)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:591)
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:144)
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:767)
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759)
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:426)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:326)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1311)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1300)
        at com.example.emos.workflow.EmosWorkflowApplication.main(lb:40)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:564)
        at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:107)
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
        at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88)
Caused by: org.springframework.scheduling.SchedulingException: Could not start Quartz Scheduler; 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 'emos.qrtz_locks' doesn't exist [See nested exception: java.sql.SQLSyntaxErrorException: Table 'emos.qrtz_locks' doesn't exist]]
        at org.springframework.scheduling.quartz.SchedulerFactoryBean.start(SchedulerFactoryBean.java:803)
        at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:178)
        ... 23 common frames omitted
Caused by: org.quartz.SchedulerConfigException: Failure occured during job recovery.
        at org.quartz.impl.jdbcjobstore.JobStoreSupport.schedulerStarted(JobStoreSupport.java:697)
        at org.quartz.core.QuartzScheduler.start(QuartzScheduler.java:539)
        at org.quartz.impl.StdScheduler.start(StdScheduler.java:142)
        at org.springframework.scheduling.quartz.SchedulerFactoryBean.startScheduler(SchedulerFactoryBean.java:728)
        at org.springframework.scheduling.quartz.SchedulerFactoryBean.start(SchedulerFactoryBean.java:800)
        ... 24 common frames omitted
Caused by: org.quartz.impl.jdbcjobstore.LockException: Failure obtaining db row lock: Table 'emos.qrtz_locks' doesn't exist
        at org.quartz.impl.jdbcjobstore.StdRowLockSemaphore.executeSQL(StdRowLockSemaphore.java:184)
        at org.quartz.impl.jdbcjobstore.DBSemaphore.obtainLock(DBSemaphore.java:113)
        at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3857)
        at org.quartz.impl.jdbcjobstore.JobStoreSupport.recoverJobs(JobStoreSupport.java:839)
        at org.quartz.impl.jdbcjobstore.JobStoreSupport.schedulerStarted(JobStoreSupport.java:695)
        ... 28 common frames omitted
Caused by: java.sql.SQLSyntaxErrorException: Table 'emos.qrtz_locks' doesn't exist
        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
        at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
        at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:953)
        at com.mysql.cj.jdbc.ClientPreparedStatement.executeQuery(ClientPreparedStatement.java:1003)
        at com.alibaba.druid.pool.DruidPooledPreparedStatement.executeQuery(DruidPooledPreparedStatement.java:228)
        at org.quartz.impl.jdbcjobstore.StdRowLockSemaphore.executeSQL(StdRowLockSemaphore.java:123)
        ... 32 common frames omitted
MySQL只显示这个
![图片描述](http://img.mukewang.com/szimg/6178232a09ce223812390647.jpg)
写回答

1回答

神思者

2021-10-27

两种可能,你数据库中没有qrtz开头的数据表,你导库有问题。或者你用的是自己的MySQL,区分表名大小写,这个是不行的,要改MySQL配置,变成区分表名大小写,你可以用我附带的MySQL已经设置好了

0
1
徐徐徐徐徐徐徐
已解决
2021-11-17
共1条回复

SpringBoot+Vue3 项目实战,打造企业级在线办公系统

以业务为基础,贯穿前后端技术栈,获得企业级项目开发经验

2249 学习 · 1271 问题

查看课程