activiti集成spring异常(DbSqlSession)

在eclipse配置一个简单的activiti项目,配置的是mysql数据库,报错如下:

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Exception in thread "main" org.activiti.engine.ActivitiException: Could not update Activiti database schema: unknown version from database: '5.18.0.1'
at org.activiti.engine.impl.db.DbSqlSession.dbSchemaUpdate(DbSqlSession.java:1007)
at org.activiti.engine.impl.db.DbSqlSession.performSchemaOperationsProcessEngineBuild(DbSqlSession.java:1385)
at org.activiti.engine.impl.SchemaOperationsProcessEngineBuild.execute(SchemaOperationsProcessEngineBuild.java:25)
at org.activiti.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:24)
at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:57)
at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31)
at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40)
at org.activiti.engine.impl.ProcessEngineImpl.<init>(ProcessEngineImpl.java:77)
at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:413)
at com.pcitc.activiti.FirstActiviti.main(FirstActiviti.java:18)

最后网上搜索了很多答案,都解决不了。最后发现是我之前运行过activiti的样例代码activiti-explorer,并且把数据库配置为mysql,这个样例程序已经在数据库里面建好了表导致的。于是我把之前的表删除了,问题就没有了,但是不知道是啥原因???只能分析下源代码了。

上一篇:servler中表单加了enctype="multipart/form-data"属性后request就接收不到表单传过来的值了


下一篇:.NET Core5 MVC/WebAPI - HTTP Error 500.30 - ASP.NET Core app failed to start