2
回答
activiti-oracle 启动流程 报Caused by: java.sql.SQLException: ORA-01401: 插入的值对于列过大
华为云实践训练营,热门技术免费实践!>>>   

说明:activiti版本是5.22,并且已将activiti.oracle.drop.engine.sql、activiti.oracle.drop.history.sql、activiti.oracle.drop.identity.sql文件生成;数据库版本是:Oracle9iR2。

源码:

import org.activiti.engine.ProcessEngine;
import org.activiti.engine.ProcessEngines;
import org.activiti.engine.RepositoryService;
import org.activiti.engine.RuntimeService;
import org.activiti.engine.TaskService;
import org.activiti.engine.repository.DeploymentBuilder;
import org.activiti.engine.task.Task;

public class Activiti11 {

    public static void main(String[] args) {
        ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();
        RepositoryService repositoryService = processEngine.getRepositoryService();
        DeploymentBuilder builder = repositoryService.createDeployment();
        builder.addClasspathResource("diagrams/MyProcess.bpmn"); // 获取流程中的任务TASK组件
        TaskService ts = processEngine.getTaskService();
        builder.deploy(); // select * from `ACT_GE_PROPERTY`;这时这个表中会多条数据
        RuntimeService runtimeService = processEngine.getRuntimeService();
        runtimeService.startProcessInstanceByKey("myProcess");// 启动流程,ID必须与你配置的一致
        // 利用 taskservice进行任务查询,查询第一个任务,查询后完成

        Task task = ts.createTaskQuery().singleResult();
        System.out.println("第一个流程任务完成前" + task.getName());
        ts.complete(task.getId());
        System.out.println("ok......");
    }

}
 

 

报错信息:

log4j:WARN No appenders could be found for logger (org.activiti.engine.ProcessEngines).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Exception in thread "main" org.apache.ibatis.exceptions.PersistenceException: 
### Error updating database.  Cause: java.sql.SQLException: ORA-01401: 插入的值对于列过大

### The error may involve org.activiti.engine.impl.persistence.entity.ResourceEntity.bulkInsertResource_oracle-Inline
### The error occurred while setting parameters
### SQL: INSERT ALL                   INTO ACT_GE_BYTEARRAY(ID_, REV_, NAME_, BYTES_, DEPLOYMENT_ID_, GENERATED_) VALUES          (?,          1,          ?,          ?,          ?,          ?)                   INTO ACT_GE_BYTEARRAY(ID_, REV_, NAME_, BYTES_, DEPLOYMENT_ID_, GENERATED_) VALUES          (?,          1,          ?,          ?,          ?,          ?)             SELECT * FROM dual
### Cause: java.sql.SQLException: ORA-01401: 插入的值对于列过大

    at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
    at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:172)
    at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:157)
    at org.activiti.engine.impl.db.DbSqlSession.flushBulkInsert(DbSqlSession.java:847)
    at org.activiti.engine.impl.db.DbSqlSession.flushPersistentObjects(DbSqlSession.java:817)
    at org.activiti.engine.impl.db.DbSqlSession.flushInserts(DbSqlSession.java:794)
    at org.activiti.engine.impl.db.DbSqlSession.flush(DbSqlSession.java:615)
    at org.activiti.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:212)
    at org.activiti.engine.impl.interceptor.CommandContext.close(CommandContext.java:138)
    at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:66)
    at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:37)
    at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40)
    at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:35)
    at org.activiti.engine.impl.RepositoryServiceImpl.deploy(RepositoryServiceImpl.java:79)
    at org.activiti.engine.impl.repository.DeploymentBuilderImpl.deploy(DeploymentBuilderImpl.java:156)
    at Activiti11.main(Activiti11.java:17)
Caused by: java.sql.SQLException: ORA-01401: 插入的值对于列过大

    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)
    at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)
    at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:589)
    at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:656)
    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.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:59)
    at com.sun.proxy.$Proxy4.execute(Unknown Source)
    at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:45)
    at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:73)
    at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:49)
    at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:115)
    at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:75)
    at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:170)
    ... 14 more
 

举报
二小
发帖于2个月前 2回/52阅
顶部