Activiti 配置Oracle不能自动创建表解决方法

                       

使用配置文件创建工作流表

<bean id="processEngineConfiguration" class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration">    <!-- 连接数据库配置 -->    <property name="jdbcDriver" value="oracle.jdbc.driver.OracleDriver"></property>    <property name="jdbcUrl" value="jdbc:oracle:thin:@localhost:1521:orcl"></property>    <property name="jdbcUsername" value="activiti"></property>    <property name="jdbcPassword" value="activiti"></property>    <!-- 如果表不存在  自动创建 -->    <property name="databaseSchemaUpdate" value="true"></property></bean>
  
  
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10

启动报如下错误:

### The error may exist in org/activiti/db/mapping/entity/Property.xml### The error may involve org.activiti.engine.impl.persistence.entity.PropertyEntity.selectProperty-Inline### The error occurred while setting parameters### SQL: select * from ACT_GE_PROPERTY where NAME_ = ?### Cause: java.sql.SQLException: ORA-00942: 表或视图不存在
  
  
  • 1
  • 2
  • 3
  • 4
  • 5

原因是引擎在创建表之前 isTablePresent() 方法 发现 schema 的值为null,所以需要配置属性

<property name="databaseSchema" value="activiti"></property>
  
  
  • 1

重新启动,成功创建表。再次启动又报错

Caused by: java.sql.SQLException: ORA-00955: 名称已由现有对象使用
  
  
  • 1

将值改为 大写 即可

<property name="databaseSchema" value="ACTIVITI"></property>
  
  
  • 1

作者:itmyhome

           

再分享一下我老师大神的人工智能教程吧。零基础!通俗易懂!风趣幽默!还带黄段子!希望你也加入到我们人工智能的队伍中来!https://blog.csdn.net/jiangjunshow

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值