Version of activiti database (6.0.0.4) is more recent than the engine (5.13) 的解决办法



问题描述:

    在项目开发的过程中,使用了 Activity 进行了系统流程引擎的开发工作,在项目开进行了一半后,接到项目经理的通知,需要将 Activity 的版本进行降级,在版本提升后,启动系统遇到如下的问题:

org.activiti.engine.ActivitiException: Version of activiti database (6.0.0.4) is more recent than the engine (5.13)

at org.activiti.engine.impl.db.DbSqlSession.isUpgradeNeeded(DbSqlSession.java:815)
at org.activiti.engine.impl.db.DbSqlSession.dbSchemaUpdate(DbSqlSession.java:710)
at org.activiti.engine.impl.db.DbSqlSession.performSchemaOperationsProcessEngineBuild(DbSqlSession.java:1013)
at org.activiti.engine.impl.SchemaOperationsProcessEngineBuild.execute(SchemaOperationsProcessEngineBuild.java:25)
at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:61)
at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31)
at org.activiti.engine.impl.ProcessEngineImpl.(ProcessEngineImpl.java:76)
at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:365)
at junit.TActiviti.createTable(TActiviti.java:38)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)

at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)



问题分析:

    在项目初始开发阶段,使用的Activity为6.0.0.4版本的,在后面发现有的jar不兼容,只能向下兼容,不能向上兼容,所以就只能将Activity的版本进行降级处理,降级后的版本为5.13。



解决方案:

一:通过修改Activity属性表中的值实现;

查询属性表 :“ select * from act_ge_property ” ,如下图:

Version of activiti database (6.0.0.4) is more recent than the engine (5.13) 的解决办法_第1张图片


修改语句:“ update act_ge_property set VALUE_='5.13' where schema.version = '6.0.0.4' ” 

注:schema.history 和schema.version都需要修改哟!!!


修改后如下图:

Version of activiti database (6.0.0.4) is more recent than the engine (5.13) 的解决办法_第2张图片


二:将库中的表全部删除,将项目配置完成后,通过Hibernate的ORM自动重新创建Activity所需要的表,再将表导出为sql脚本儿,再导入到项目的数据库中。








    好了,关于 org.activiti.engine.ActivitiException: Version of activiti database (6.0.0.4) is more recent than the engine (5.13)的解决办法 就写到这儿了,如果还有什么疑问或遇到什么问题欢迎扫码提问,也可以给我留言哦,我会一一详细的解答的。
歇后语:“ 共同学习,共同进步 ”,也希望大家多多关注CSND的IT社区。

你可能感兴趣的:(Activiti,Activiti,开源工作流程引擎进阶)