一、该问题的重现步骤是什么?
1. 初始化数据库bladex-flowable-mysql.sql
2. 修改为自己的数据库配置
3.启动项目blade-flow-design
二、你期待的结果是什么?实际看到的又是什么?
期待:启动成功
实际:启动失败
三、你正在使用的是什么产品,什么版本?在什么操作系统上?
bladex 2.8.1release windows
四、请提供详细的错误堆栈信息,这很重要。
:: BladeX 2.8.1.RELEASE :: blade-flowdesign:dev :: Running SpringBoot 2.2.13.RELEASE ::
2022-06-13 10:12:58.136 INFO 23212 --- [ main] o.s.flow.FlowDesignApplication : Starting FlowDesignApplication on LAPTOP-RQJ2IA81 with PID 23212 (D:\IdeaWorkSpace\blade-flow\backend-flow\blade-ops\blade-flow-design\target\classes started by aaa in D:\IdeaWorkSpace\blade-flow\backend-flow)
2022-06-13 10:12:58.139 INFO 23212 --- [ main] o.s.flow.FlowDesignApplication : The following profiles are active: dev
2022-06-13 10:12:59.367 INFO 23212 --- [ main] s.c.l.p.BladePropertySourcePostProcessor : BladePropertySourcePostProcessor init.
2022-06-13 10:12:59.367 INFO 23212 --- [ main] s.c.l.p.BladePropertySourcePostProcessor : BladePropertySourcePostProcessor process @BladePropertySource bean.
2022-06-13 10:12:59.391 WARN 23212 --- [ main] s.c.l.p.BladePropertySourcePostProcessor : Not found @BladePropertySource on spring bean class.
2022-06-13 10:12:59.669 WARN 23212 --- [ main] io.undertow.websockets.jsr : UT026010: Buffer pool was not set on WebSocketDeploymentInfo, the default pool will be used
2022-06-13 10:12:59.693 INFO 23212 --- [ main] io.undertow.servlet : Initializing Spring embedded WebApplicationContext
2022-06-13 10:12:59.694 INFO 23212 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1502 ms
2022-06-13 10:12:59.771 INFO 23212 --- [ main] f.a.AutowiredAnnotationBeanPostProcessor : Inconsistent constructor declaration on bean with name 'serverInfo': single autowire-marked constructor flagged as optional - this constructor is effectively required since there is no default constructor to fall back to: public org.springblade.core.launch.server.ServerInfo(org.springframework.boot.autoconfigure.web.ServerProperties)
2022-06-13 10:12:59.921 INFO 23212 --- [ main] c.a.d.s.b.a.DruidDataSourceAutoConfigure : Init DruidDataSource
2022-06-13 10:13:00.331 INFO 23212 --- [ main] com.alibaba.druid.pool.DruidDataSource : {dataSource-1} inited
2022-06-13 10:13:01.134 WARN 23212 --- [ main] uration$JodaDateTimeJacksonConfiguration : Auto-configuration of Jackson's Joda-Time integration is deprecated in favor of using java.time (JSR-310).
2022-06-13 10:13:02.342 INFO 23212 --- [ main] liquibase.executor.jvm.JdbcExecutor : SELECT COUNT(*) FROM bladex_flow.ACT_DE_DATABASECHANGELOGLOCK
2022-06-13 10:13:02.346 INFO 23212 --- [ main] liquibase.executor.jvm.JdbcExecutor : SELECT COUNT(*) FROM bladex_flow.ACT_DE_DATABASECHANGELOGLOCK
2022-06-13 10:13:02.348 INFO 23212 --- [ main] liquibase.executor.jvm.JdbcExecutor : SELECT `LOCKED` FROM bladex_flow.ACT_DE_DATABASECHANGELOGLOCK WHERE ID=1
2022-06-13 10:13:02.360 INFO 23212 --- [ main] l.lockservice.StandardLockService : Successfully acquired change log lock
2022-06-13 10:13:03.954 INFO 23212 --- [ main] liquibase.executor.jvm.JdbcExecutor : SELECT MD5SUM FROM bladex_flow.ACT_DE_DATABASECHANGELOG WHERE MD5SUM IS NOT NULL LIMIT 1
2022-06-13 10:13:03.955 INFO 23212 --- [ main] liquibase.executor.jvm.JdbcExecutor : SELECT COUNT(*) FROM bladex_flow.ACT_DE_DATABASECHANGELOG
2022-06-13 10:13:03.956 INFO 23212 --- [ main] l.c.StandardChangeLogHistoryService : Reading from bladex_flow.ACT_DE_DATABASECHANGELOG
2022-06-13 10:13:03.956 INFO 23212 --- [ main] liquibase.executor.jvm.JdbcExecutor : SELECT * FROM bladex_flow.ACT_DE_DATABASECHANGELOG ORDER BY DATEEXECUTED ASC, ORDEREXECUTED ASC
2022-06-13 10:13:03.995 INFO 23212 --- [ main] liquibase.executor.jvm.JdbcExecutor : CREATE TABLE bladex_flow.ACT_DE_MODEL (id VARCHAR(255) NOT NULL, name VARCHAR(400) NOT NULL, model_key VARCHAR(400) NOT NULL, `description` VARCHAR(4000) NULL, model_comment VARCHAR(4000) NULL, created datetime(6) NULL, created_by VARCHAR(255) NULL, last_updated datetime(6) NULL, last_updated_by VARCHAR(255) NULL, version INT NULL, model_editor_json LONGTEXT NULL, thumbnail LONGBLOB NULL, model_type INT NULL, CONSTRAINT PK_ACT_DE_MODEL PRIMARY KEY (id))
2022-06-13 10:13:04.011 ERROR 23212 --- [ main] liquibase.changelog.ChangeSet : Change Set META-INF/liquibase/flowable-modeler-app-db-changelog.xml::1::flowable failed. Error: Table 'act_de_model' already exists [Failed SQL: (1050) CREATE TABLE bladex_flow.ACT_DE_MODEL (id VARCHAR(255) NOT NULL, name VARCHAR(400) NOT NULL, model_key VARCHAR(400) NOT NULL, `description` VARCHAR(4000) NULL, model_comment VARCHAR(4000) NULL, created datetime(6) NULL, created_by VARCHAR(255) NULL, last_updated datetime(6) NULL, last_updated_by VARCHAR(255) NULL, version INT NULL, model_editor_json LONGTEXT NULL, thumbnail LONGBLOB NULL, model_type INT NULL, CONSTRAINT PK_ACT_DE_MODEL PRIMARY KEY (id))]
2022-06-13 10:13:04.014 INFO 23212 --- [ main] l.lockservice.StandardLockService : Successfully released change log lock
2022-06-13 10:13:04.017 WARN 23212 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'modelerLiquibase' defined in class path resource [org/springblade/flow/config/FlowableBeanConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [liquibase.Liquibase]: Factory method 'modelerLiquibase' threw exception; nested exception is org.flowable.ui.common.service.exception.InternalServerErrorException: Error creating liquibase database
2022-06-13 10:13:04.018 INFO 23212 --- [ main] com.alibaba.druid.pool.DruidDataSource : {dataSource-1} closing ...
2022-06-13 10:13:04.024 INFO 23212 --- [ main] com.alibaba.druid.pool.DruidDataSource : {dataSource-1} closed
2022-06-13 10:13:04.034 INFO 23212 --- [ main] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2022-06-13 10:13:04.047 ERROR 23212 --- [ main] o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'modelerLiquibase' defined in class path resource [org/springblade/flow/config/FlowableBeanConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [liquibase.Liquibase]: Factory method 'modelerLiquibase' threw exception; nested exception is org.flowable.ui.common.service.exception.InternalServerErrorException: Error creating liquibase database
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:657) ~[spring-beans-5.2.12.RELEASE.jar:5.2.12.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:637) ~[spring-beans-5.2.12.RELEASE.jar:5.2.12.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1336) ~[spring-beans-5.2.12.RELEASE.jar:5.2.12.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1176) ~[spring-beans-5.2.12.RELEASE.jar:5.2.12.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:556) ~[spring-beans-5.2.12.RELEASE.jar:5.2.12.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516) ~[spring-beans-5.2.12.RELEASE.jar:5.2.12.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324) ~[spring-beans-5.2.12.RELEASE.jar:5.2.12.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.2.12.RELEASE.jar:5.2.12.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322) ~[spring-beans-5.2.12.RELEASE.jar:5.2.12.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.12.RELEASE.jar:5.2.12.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:897) ~[spring-beans-5.2.12.RELEASE.jar:5.2.12.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:879) ~[spring-context-5.2.12.RELEASE.jar:5.2.12.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551) ~[spring-context-5.2.12.RELEASE.jar:5.2.12.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.2.13.RELEASE.jar:2.2.13.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) ~[spring-boot-2.2.13.RELEASE.jar:2.2.13.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:405) ~[spring-boot-2.2.13.RELEASE.jar:2.2.13.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) ~[spring-boot-2.2.13.RELEASE.jar:2.2.13.RELEASE]
at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:140) [spring-boot-2.2.13.RELEASE.jar:2.2.13.RELEASE]
at org.springblade.core.launch.BladeApplication.run(BladeApplication.java:50) [blade-core-launch-2.8.1.RELEASE.jar:na]
at org.springblade.flow.FlowDesignApplication.main(FlowDesignApplication.java:35) [classes/:na]
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [liquibase.Liquibase]: Factory method 'modelerLiquibase' threw exception; nested exception is org.flowable.ui.common.service.exception.InternalServerErrorException: Error creating liquibase database
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.2.12.RELEASE.jar:5.2.12.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:652) ~[spring-beans-5.2.12.RELEASE.jar:5.2.12.RELEASE]
... 19 common frames omitted
Caused by: org.flowable.ui.common.service.exception.InternalServerErrorException: Error creating liquibase database
at org.springblade.flow.config.FlowableBeanConfiguration.modelerLiquibase(FlowableBeanConfiguration.java:48) ~[classes/:na]
at org.springblade.flow.config.FlowableBeanConfiguration$$EnhancerBySpringCGLIB$$672a6cdc.CGLIB$modelerLiquibase$0(<generated>) ~[classes/:na]
at org.springblade.flow.config.FlowableBeanConfiguration$$EnhancerBySpringCGLIB$$672a6cdc$$FastClassBySpringCGLIB$$7859ba90.invoke(<generated>) ~[classes/:na]
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244) ~[spring-core-5.2.12.RELEASE.jar:5.2.12.RELEASE]
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331) ~[spring-context-5.2.12.RELEASE.jar:5.2.12.RELEASE]
at org.springblade.flow.config.FlowableBeanConfiguration$$EnhancerBySpringCGLIB$$672a6cdc.modelerLiquibase(<generated>) ~[classes/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_251]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_251]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_251]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_251]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.2.12.RELEASE.jar:5.2.12.RELEASE]
... 20 common frames omitted
Caused by: liquibase.exception.MigrationFailedException: Migration failed for change set META-INF/liquibase/flowable-modeler-app-db-changelog.xml::1::flowable:
Reason: liquibase.exception.DatabaseException: Table 'act_de_model' already exists [Failed SQL: (1050) CREATE TABLE bladex_flow.ACT_DE_MODEL (id VARCHAR(255) NOT NULL, name VARCHAR(400) NOT NULL, model_key VARCHAR(400) NOT NULL, `description` VARCHAR(4000) NULL, model_comment VARCHAR(4000) NULL, created datetime(6) NULL, created_by VARCHAR(255) NULL, last_updated datetime(6) NULL, last_updated_by VARCHAR(255) NULL, version INT NULL, model_editor_json LONGTEXT NULL, thumbnail LONGBLOB NULL, model_type INT NULL, CONSTRAINT PK_ACT_DE_MODEL PRIMARY KEY (id))]
at liquibase.changelog.ChangeSet.execute(ChangeSet.java:646) ~[liquibase-core-3.8.9.jar:na]
at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:53) ~[liquibase-core-3.8.9.jar:na]
at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:83) ~[liquibase-core-3.8.9.jar:na]
at liquibase.Liquibase.update(Liquibase.java:202) ~[liquibase-core-3.8.9.jar:na]
at liquibase.Liquibase.update(Liquibase.java:179) ~[liquibase-core-3.8.9.jar:na]
at liquibase.Liquibase.update(Liquibase.java:175) ~[liquibase-core-3.8.9.jar:na]
at liquibase.Liquibase.update(Liquibase.java:168) ~[liquibase-core-3.8.9.jar:na]
at org.springblade.flow.config.FlowableBeanConfiguration.modelerLiquibase(FlowableBeanConfiguration.java:44) ~[classes/:na]
... 30 common frames omitted
Caused by: liquibase.exception.DatabaseException: Table 'act_de_model' already exists [Failed SQL: (1050) CREATE TABLE bladex_flow.ACT_DE_MODEL (id VARCHAR(255) NOT NULL, name VARCHAR(400) NOT NULL, model_key VARCHAR(400) NOT NULL, `description` VARCHAR(4000) NULL, model_comment VARCHAR(4000) NULL, created datetime(6) NULL, created_by VARCHAR(255) NULL, last_updated datetime(6) NULL, last_updated_by VARCHAR(255) NULL, version INT NULL, model_editor_json LONGTEXT NULL, thumbnail LONGBLOB NULL, model_type INT NULL, CONSTRAINT PK_ACT_DE_MODEL PRIMARY KEY (id))]
at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:402) ~[liquibase-core-3.8.9.jar:na]
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:59) ~[liquibase-core-3.8.9.jar:na]
at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:131) ~[liquibase-core-3.8.9.jar:na]
at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1276) ~[liquibase-core-3.8.9.jar:na]
at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1258) ~[liquibase-core-3.8.9.jar:na]
at liquibase.changelog.ChangeSet.execute(ChangeSet.java:609) ~[liquibase-core-3.8.9.jar:na]
... 37 common frames omitted
Caused by: java.sql.SQLSyntaxErrorException: Table 'act_de_model' already exists
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120) ~[mysql-connector-java-8.0.22.jar:8.0.22]
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97) ~[mysql-connector-java-8.0.22.jar:8.0.22]
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) ~[mysql-connector-java-8.0.22.jar:8.0.22]
at com.mysql.cj.jdbc.StatementImpl.executeInternal(StatementImpl.java:764) ~[mysql-connector-java-8.0.22.jar:8.0.22]
at com.mysql.cj.jdbc.StatementImpl.execute(StatementImpl.java:648) ~[mysql-connector-java-8.0.22.jar:8.0.22]
at com.alibaba.druid.pool.DruidPooledStatement.execute(DruidPooledStatement.java:632) ~[druid-1.2.5.jar:1.2.5]
at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:398) ~[liquibase-core-3.8.9.jar:na]
... 42 common frames omitted
Process finished with exit code 1
五、若有更多详细信息,请在下面提供。
关闭liquibase不管用
这个属性要设置成false,然后clean下项目。
Caused by: java.sql.SQLSyntaxErrorException: Table 'act_de_model' already exists
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120) ~[mysql-connector-java-8.0.22.jar:8.0.22]
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97) ~[mysql-connector-java-8.0.22.jar:8.0.22]
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) ~[mysql-connector-java-8.0.22.jar:8.0.22]
at com.mysql.cj.jdbc.StatementImpl.executeInternal(StatementImpl.java:764) ~[mysql-connector-java-8.0.22.jar:8.0.22]
at com.mysql.cj.jdbc.StatementImpl.execute(StatementImpl.java:648) ~[mysql-connector-java-8.0.22.jar:8.0.22]
at com.alibaba.druid.pool.DruidPooledStatement.execute(DruidPooledStatement.java:632) ~[druid-1.2.5.jar:1.2.5]
at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:398) ~[liquibase-core-3.8.9.jar:na]
... 42 common frames omitted
还是没解决,还是同样的报错 clean 项目和这个模块了不行
扫一扫访问 Blade技术社区 移动端