oddfar / campus-imaotai

i茅台app自动预约,每日自动预约,支持docker一键部署(本项目不提供成品,使用的是已淘汰的算法)
https://oddfar.github.io/campus-doc/campus-imaotai
Apache License 2.0
4.11k stars 1.35k forks source link

docker-compose一键部署报错, Table 'campus_imaotai.sys_config' doesn't exist #194

Closed Nodewebzsz closed 10 months ago

Nodewebzsz commented 10 months ago

:: Spring Boot :: (v2.5.15)

2024-01-11 22:09:37 |INFO |Version.java:21 |HV000001: Hibernate Validator 6.2.5.Final 2024-01-11 22:09:37 |INFO |StartupInfoLogger.java:55 |Starting CampusApplication using Java 1.8.0111 on 06db7607746e with PID 1 (/home/campus/campus.jar started by root in /home/campus) 2024-01-11 22:09:37 |DEBUG |StartupInfoLogger.java:56 |Running with Spring Boot v2.5.15, Spring v5.3.27 2024-01-11 22:09:37 |INFO |SpringApplication.java:686 |The following 1 profile is active: "prod" 2024-01-11 22:09:41 |INFO |DirectJDKLog.java:173 |Initializing ProtocolHandler ["http-nio-8160"] 2024-01-11 22:09:41 |INFO |DirectJDKLog.java:173 |Starting service [Tomcat] 2024-01-11 22:09:41 |INFO |DirectJDKLog.java:173 |Starting Servlet engine: [Apache Tomcat/9.0.75] 2024-01-11 22:09:41 |INFO |DirectJDKLog.java:173 |Initializing Spring embedded WebApplicationContext 2024-01-11 22:09:41 |DEBUG |GenericFilterBean.java:242 |Filter 'jwtAuthenticationTokenFilter' configured for use 2024-01-11 22:09:42 |INFO |HikariDataSource.java:80 |master - Starting... 2024-01-11 22:09:42 |INFO |HikariDataSource.java:82 |master - Start completed. 2024-01-11 22:09:42 |INFO |DynamicRoutingDataSource.java:160 |dynamic-datasource - add a datasource named [master] success 2024-01-11 22:09:42 |INFO |DynamicRoutingDataSource.java:243 |dynamic-datasource initial loaded [1] datasource,primary datasource named [master] | |_. __ | | | |\/|)(| | |\ |)|||_\ / |
3.5.4.1 2024-01-11 22:09:45 |WARN |AbstractApplicationContext.java:591 |Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sysConfigController': Unsatisfied dependency expressed through field 'configService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sysConfigServiceImpl': Invocation of init method failed; nested exception is org.springframework.jdbc.BadSqlGrammarException:

Error querying database. Cause: java.sql.SQLSyntaxErrorException: Table 'campus_imaotai.sys_config' doesn't exist

The error may exist in com/oddfar/campus/framework/mapper/SysConfigMapper.java (best guess)

The error may involve defaultParameterMap

The error occurred while setting parameters

SQL: SELECT config_id,config_name,config_key,config_value,config_type,group_code,remark,create_time,create_user,update_time,update_user,del_flag FROM sys_config WHERE del_flag=0

Cause: java.sql.SQLSyntaxErrorException: Table 'campus_imaotai.sys_config' doesn't exist

; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: Table 'campus_imaotai.sys_config' doesn't exist 2024-01-11 22:09:45 |INFO |DynamicRoutingDataSource.java:217 |dynamic-datasource start closing .... 2024-01-11 22:09:45 |INFO |HikariDataSource.java:350 |master - Shutdown initiated... 2024-01-11 22:09:45 |INFO |HikariDataSource.java:352 |master - Shutdown completed. 2024-01-11 22:09:45 |INFO |DefaultDataSourceDestroyer.java:98 |dynamic-datasource close the datasource named [master] success, 2024-01-11 22:09:45 |INFO |DynamicRoutingDataSource.java:221 |dynamic-datasource all closed success,bye Exception in thread "Thread-2" java.lang.IllegalStateException: LettuceConnectionFactory was destroyed and cannot be used anymore at org.springframework.util.Assert.state(Assert.java:76) at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.assertInitialized(LettuceConnectionFactory.java:1263) at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.getConnection(LettuceConnectionFactory.java:414) at org.springframework.data.redis.core.RedisConnectionUtils.fetchConnection(RedisConnectionUtils.java:193) at org.springframework.data.redis.core.RedisConnectionUtils.doGetConnection(RedisConnectionUtils.java:144) at org.springframework.data.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:105) at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:209) at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:189) at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:96) at org.springframework.data.redis.core.DefaultValueOperations.set(DefaultValueOperations.java:236) at com.oddfar.campus.common.core.RedisCache.setCacheObject(RedisCache.java:31) at com.oddfar.campus.business.service.impl.IMTServiceImpl.getMTVersion(IMTServiceImpl.java:93) at com.oddfar.campus.business.service.impl.IMTServiceImpl.refreshMTVersion(IMTServiceImpl.java:102) at com.oddfar.campus.business.service.impl.IMTServiceImpl.refreshAll(IMTServiceImpl.java:508) at com.oddfar.campus.business.service.impl.IMTServiceImpl$1.run(IMTServiceImpl.java:72) at java.lang.Thread.run(Thread.java:745) 2024-01-11 22:09:45 |INFO |DirectJDKLog.java:173 |Stopping service [Tomcat] 2024-01-11 22:09:45 |ERROR |SpringApplication.java:870 |Application run failed org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sysConfigController': Unsatisfied dependency expressed through field 'configService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sysConfigServiceImpl': Invocation of init method failed; nested exception is org.springframework.jdbc.BadSqlGrammarException:

Error querying database. Cause: java.sql.SQLSyntaxErrorException: Table 'campus_imaotai.sys_config' doesn't exist

The error may exist in com/oddfar/campus/framework/mapper/SysConfigMapper.java (best guess)

The error may involve defaultParameterMap

The error occurred while setting parameters

SQL: SELECT config_id,config_name,config_key,config_value,config_type,group_code,remark,create_time,create_user,update_time,update_user,del_flag FROM sys_config WHERE del_flag=0

Cause: java.sql.SQLSyntaxErrorException: Table 'campus_imaotai.sys_config' doesn't exist

; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: Table 'campus_imaotai.sys_config' doesn't exist at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:660) at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:640) at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119) at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:920) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:780) at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:453) at org.springframework.boot.SpringApplication.run(SpringApplication.java:343) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1370) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1359) at com.oddfar.campus.CampusApplication.main(CampusApplication.java:14) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) at org.springframework.boot.loader.Launcher.launch(Launcher.java:108) at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88) Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sysConfigServiceImpl': Invocation of init method failed; nested exception is org.springframework.jdbc.BadSqlGrammarException:

Error querying database. Cause: java.sql.SQLSyntaxErrorException: Table 'campus_imaotai.sys_config' doesn't exist

The error may exist in com/oddfar/campus/framework/mapper/SysConfigMapper.java (best guess)

The error may involve defaultParameterMap

The error occurred while setting parameters

SQL: SELECT config_id,config_name,config_key,config_value,config_type,group_code,remark,create_time,create_user,update_time,update_user,del_flag FROM sys_config WHERE del_flag=0

Cause: java.sql.SQLSyntaxErrorException: Table 'campus_imaotai.sys_config' doesn't exist

; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: Table 'campus_imaotai.sys_config' doesn't exist at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:160) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:440) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311) at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:657) ... 28 common frames omitted Caused by: org.springframework.jdbc.BadSqlGrammarException:

Error querying database. Cause: java.sql.SQLSyntaxErrorException: Table 'campus_imaotai.sys_config' doesn't exist

The error may exist in com/oddfar/campus/framework/mapper/SysConfigMapper.java (best guess)

The error may involve defaultParameterMap

The error occurred while setting parameters

SQL: SELECT config_id,config_name,config_key,config_value,config_type,group_code,remark,create_time,create_user,update_time,update_user,del_flag FROM sys_config WHERE del_flag=0

Cause: java.sql.SQLSyntaxErrorException: Table 'campus_imaotai.sys_config' doesn't exist

; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: Table 'campus_imaotai.sys_config' doesn't exist at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:239) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:70) at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:92) at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:439) at com.sun.proxy.$Proxy115.selectList(Unknown Source) at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:224) at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.executeForMany(MybatisMapperMethod.java:166) at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:77) at com.baomidou.mybatisplus.core.override.MybatisMapperProxy$PlainMethodInvoker.invoke(MybatisMapperProxy.java:152) at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:89) at com.sun.proxy.$Proxy138.selectList(Unknown Source) at com.oddfar.campus.common.core.BaseMapperX.selectList(BaseMapperX.java:59) at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627) at com.baomidou.mybatisplus.core.override.MybatisMapperProxy$DefaultMethodInvoker.invoke(MybatisMapperProxy.java:166) at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:89) at com.sun.proxy.$Proxy138.selectList(Unknown Source) at com.oddfar.campus.framework.service.impl.SysConfigServiceImpl.loadingConfigCache(SysConfigServiceImpl.java:144) at com.oddfar.campus.framework.service.impl.SysConfigServiceImpl.init(SysConfigServiceImpl.java:36) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:389) at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:333) at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:157) ... 40 common frames omitted Caused by: java.sql.SQLSyntaxErrorException: Table 'campus_imaotai.sys_config' doesn't exist at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:121) at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:916) at com.mysql.cj.jdbc.ClientPreparedStatement.execute(ClientPreparedStatement.java:354) at com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44) at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java) at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:65) at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:80) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:61) at com.sun.proxy.$Proxy142.query(Unknown Source) at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:65) at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:333) at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:158) at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:110) at com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor.intercept(MybatisPlusInterceptor.java:81) at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:59) at com.sun.proxy.$Proxy141.query(Unknown Source) at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:154) at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:147) at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:142) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:425) ... 61 common frames omitted

oddfar commented 10 months ago

数据库不全,重新导入,用mysql5.7

Nodewebzsz commented 10 months ago

image image ![Uploading image.png…]() sql文件也是最新的,还是报错啊

czmchen commented 7 months ago

同样问题,解决了没