`

org.activiti.engine.impl.db.DbSqlSession - problem during schema drop, statement

阅读更多

原文连接:http://www.hxstrive.com/article/126.htm

 

从下面抛出的异常信息可以看出,activiti在删除activiti数据表时出现外键引用的错误,这个错误可能是我们无意删除了activiti表中某些外键引用的数据,造成activiti在删除数据表时,抛出这个错误。

 

错误信息:

7 [main] INFO org.activiti.engine.ProcessEngines - Initializing process engine using configuration 'file:/F:/Project_All/Eclipase_Workspace/Activiti_test01/bin/activiti.cfg.xml'

7 [main] INFO org.activiti.engine.ProcessEngines - initializing process engine for resource file:/F:/Project_All/Eclipase_Workspace/Activiti_test01/bin/activiti.cfg.xml

2015-2-14 9:20:40 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions

信息: Loading XML bean definitions from resource loaded through InputStream

5562 [main] INFO org.activiti.engine.impl.db.DbSqlSession - performing drop on engine with resource org/activiti/db/drop/activiti.mysql.drop.engine.sql

12467 [main] ERROR org.activiti.engine.impl.db.DbSqlSession - problem during schema drop, statement drop index ACT_IDX_VARIABLE_TASK_ID on ACT_RU_VARIABLE

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'activiti.act_ru_variable' doesn't exist

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

at java.lang.reflect.Constructor.newInstance(Constructor.java:513)

at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)

at com.mysql.jdbc.Util.getInstance(Util.java:382)

at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052)

at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3603)

at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3535)

at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1989)

at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2150)

at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2620)

at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2570)

at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:779)

at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:622)

at org.activiti.engine.impl.db.DbSqlSession.executeSchemaResource(DbSqlSession.java:930)

at org.activiti.engine.impl.db.DbSqlSession.executeSchemaResource(DbSqlSession.java:881)

at org.activiti.engine.impl.db.DbSqlSession.executeMandatorySchemaResource(DbSqlSession.java:698)

at org.activiti.engine.impl.db.DbSqlSession.dbSchemaDrop(DbSqlSession.java:679)

at org.activiti.engine.impl.db.DbSqlSession.performSchemaOperationsProcessEngineBuild(DbSqlSession.java:1000)

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:72)

at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:363)

at org.activiti.engine.ProcessEngines.buildProcessEngine(ProcessEngines.java:194)

at org.activiti.engine.ProcessEngines.initProcessEnginFromResource(ProcessEngines.java:167)

at org.activiti.engine.ProcessEngines.init(ProcessEngines.java:98)

at org.activiti.engine.ProcessEngines.getProcessEngine(ProcessEngines.java:224)

at org.activiti.engine.ProcessEngines.getDefaultProcessEngine(ProcessEngines.java:217)

at com.bug315.ActivitiTest01.main(ActivitiTest01.java:15)

17427 [main] ERROR org.activiti.engine.impl.db.DbSqlSession - problem during schema drop, statement alter table ACT_RU_VARIABLE 

drop FOREIGN KEY ACT_FK_VAR_EXE

 

解决办法:

    手动将activiti的所有表删除,然后修改activiti.cfg.xml配置文件中的databaseSchemaUpdate=“drop-create”,最后启动activiti引擎,此时会出现表不存在等错误,因为表已经被你手动删除了。执行完后,再启动activiti引擎,这个问题就不再抛出了。

 

databaseSchemaUpdate属性的取值:

    flase: 默认值。activiti在启动时,会对比数据库表中保存的版本,如果没有表或者版本不匹配,将抛出异常。

    true: activiti会对数据库中所有表进行更新操作。如果表不存在,则自动创建。

    create_drop: 在activiti启动时创建表,在关闭时删除表(必须手动关闭引擎,才能删除表)。

    drop-create: 在activiti启动时删除原来的旧表,然后在创建新表(不需要手动关闭引擎)。

 

 

 原文连接:http://www.bug315.com/article/126.htm

 

分享到:
评论

相关推荐

    Activiti发布流程报错org.activiti.engine.ActivitiException: Error parsing XML

    郁闷啊,有时候不得不承认,无论是什么事,曾经是好的,到后边未必还是好的,不要拿曾经的种种来判断今天的结果, 前景:之前本地用jeecg(1.7版本)设计流程、发布流程、修改流程,所有的操作都是项目有汉字启动的,...

    eclipse安装activiti报错(requires 'org.eclipse.emf 2.6.0' but it could not be found)

    Software being installed: Activiti Eclipse BPMN 2.0 Designer 5.18.0.201508100929 (org.activiti.designer.feature.feature.group 5.18.0.201508100929) Missing requirement: Activiti Eclipse BPMN 2.0 ...

    activiti-engine-5.21.0-API文档-中文版.zip

    Maven坐标:org.activiti:activiti-engine:5.21.0; 标签:activiti、engine、中文文档、jar包、java; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性化翻译,文档中的...

    eclipse Activiti 插件 jar包 出错

    eclipse Activiti 插件 jar包 出错 org.eclipse.emf.transaction org.eclipse.emf.validation org.eclipse.emf.workspace org.activiti.designer.feature org.eclipse.graphiti.feature org.activiti.designer....

    eclipse安装Activiti-designer 所需jar包

    eclipse安装Activiti-designer 所需jar包 Cannot complete the install because one or more required items could not be found. Software being installed: Activiti Eclipse BPMN 2.0 Designer 5.18.0....

    Activiti连接达梦数据库.pdf

    "Activiti连接达梦数据库" Activiti是基于Java的开源工作流引擎,广泛应用于企业级业务流程管理中。然而,在某些国内项目中,需要使用国产的替代方案来替换传统的数据库驱动。达梦数据库是一种国产的数据库管理系统...

    org.activiti.designer.updatesite-5.18.1-SNAPSHOT.zip

    eclipse的activit插件org.activiti.designer.updatesite-5.18.1-SNAPSHOT,方便离线安装

    activiti-process-validation-5.21.0.jar

    &lt;!-- https://mvnrepository.com/artifact/org.activiti/activiti-engine --&gt; &lt;groupId&gt;org.activiti &lt;artifactId&gt;activiti-engine &lt;version&gt;5.21.0 &lt;/dependency&gt;

    eclipse-emf for activity

    session context was:(profile=epp.package.jee, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=). Unable to read repository at ...

    activiti-engine-5.22.0.jar

    替换原有activiti-engine-5.22.0.jar包,目前测试支持gbase8s、gbase8a。maven工程,需要将该jar包放到自己的私服上,另起目录位置。如果没有私服,可以下载开源jar包后,手动替换jar包

    activiti-engine-5.16.4-sources.jar

    activiti-engine-5.16.4-sources.jar-小彭源码免费下载

    activiti-5.22.0.zip

    源码中的 `org.activiti.engine.impl.db.DbSqlSession` 和相关实体类可以揭示其内部存储策略。 9. **服务与API**:Activiti 提供了多个核心服务,如 IdentityService(身份服务)、FormService(表单服务)等,它们...

    工作流引擎(activiti)JAR包

    1. activiti-engine.jar:包含了Activiti引擎的核心实现,用于执行流程实例。 2. spring-context.jar、spring-beans.jar等:Spring框架的核心库,负责依赖注入和应用上下文管理。 3. mysql-connector-java.jar:...

    部署Activiti-activiti-5.22.0源代码工程缺的一些jar包

    antlr-3.3.jar,antlr-runtime-3.3.jar,btm-2.1.3.jar,catch-exception-1.2.0.jar,dcharts-widget-0.10.0.jar,drools-compiler-5.5.0.Final.jar,drools-core-5.5.0.Final.jar,ecj-3.5.1.jar,javax.enterprise....

    解决 activiti7 生成的图片打不开的问题.txt

    解决 activiti7 生成的图片打不开的问题,版本如下 &lt;groupId&gt;org.activiti &lt;artifactId&gt;activiti-image-generator &lt;version&gt;7.1.0.M1 &lt;/dependency&gt;

    activiti-engine-5.9.jar

    activiti-engine-5.9.jar

    activiti-engine-5.21.0-API文档-中英对照版.zip

    Maven坐标:org.activiti:activiti-engine:5.21.0; 标签:activiti、engine、中英对照文档、jar包、java; 使用方法:解压翻译后的API文档,用浏览器打开“index.html”文件,即可纵览文档内容。 人性化翻译,文档...

    Eclipse离线集成activiti所需jar('org.eclipse.emf 2.6.0' but it could not be found解决方案)

    解压后,将jars文件夹里的3个jar包复制到eclipse安装目录的plugins文件夹下,然后 activiti-designer-5.14.1.zip 用离线安装的方法操作即可。如果报错(eclipse安装activiti报错,缺少jar包。具体报错如下: Cannot ...

    activiti-sandbox-script:如何使用沙盒脚本引擎运行Activiti

    沙盒脚本如何使用沙盒脚本引擎运行Activiti一般的做法创建org.activiti.engine.impl.scripting.ScriptingEngines的实现,该实现重写受保护的方法my.seoj.activiti.sandbox.script.Main.PrivilegedScriptingEngines....

    Activiti Designer插件jar包

    Missing requirement: Activiti Eclipse BPMN 2.0 Designer 5.14.1 (org.activiti.designer.feature.feature.group 5.14.1) requires 'org.eclipse.emf.validation 1.4.0' but it could not be found 没安装过这...

Global site tag (gtag.js) - Google Analytics