Script variable error

Hello

I created the attached BPMN. I tried to run and I got the following error:
Caused by: org.apache.ibatis.exceptions.PersistenceException:

Error updating database. Cause: java.sql.SQLIntegrityConstraintViolationException: ORA-01400: cannot insert NULL into (“UCF_ACQ_NGC_02_DECISION_WF”.“ACT_HI_VARINST”.“NAME_”)

The error may involve org.camunda.bpm.engine.impl.persistence.entity.HistoricVariableInstanceEntity.insertHistoricVariableInstance-Inline

The error occurred while setting parameters

SQL: insert into ACT_HI_VARINST ( ID_, PROC_DEF_KEY_, PROC_DEF_ID_, PROC_INST_ID_, EXECUTION_ID_, ACT_INST_ID_, TENANT_ID_, CASE_DEF_KEY_, CASE_DEF_ID_, CASE_INST_ID_, CASE_EXECUTION_ID_, TASK_ID_, NAME_, REV_, VAR_TYPE_, BYTEARRAY_ID_, DOUBLE_, LONG_, TEXT_, TEXT2_ ) values ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )

Cause: java.sql.SQLIntegrityConstraintViolationException: ORA-01400: cannot insert NULL into (“UCF_ACQ_NGC_02_DECISION_WF”.“ACT_HI_VARINST”.“NAME_”)

    at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:26) ~[mybatis-3.2.8.jar:3.2.8]
    at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:154) ~[mybatis-3.2.8.jar:3.2.8]
    at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:141) ~[mybatis-3.2.8.jar:3.2.8]
    at org.camunda.bpm.engine.impl.db.sql.DbSqlSession.executeInsertEntity(DbSqlSession.java:145) ~[camunda-engine-7.5.0.jar:7.5.0]
    at org.camunda.bpm.engine.impl.db.sql.DbSqlSession.insertEntity(DbSqlSession.java:137) ~[camunda-engine-7.5.0.jar:7.5.0]
    at org.camunda.bpm.engine.impl.db.AbstractPersistenceSession.executeDbOperation(AbstractPersistenceSession.java:41) ~[camunda-engine-7.5.0.jar:7.5.0]
    at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperationManager(DbEntityManager.java:294) ~[camunda-engine-7.5.0.jar:7.5.0]
    ... 11 more

Caused by: java.sql.SQLIntegrityConstraintViolationException: ORA-01400: cannot insert NULL into (“UCF_ACQ_NGC_02_DECISION_WF”.“ACT_HI_VARINST”.“NAME_”)

    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:447) ~[ojdbc6.jar:11.2.0.4.0]
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396) ~[ojdbc6.jar:11.2.0.4.0]
    at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:951) ~[ojdbc6.jar:11.2.0.4.0]
    at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:513) ~[ojdbc6.jar:11.2.0.4.0]
    at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:227) ~[ojdbc6.jar:11.2.0.4.0]
    at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531) ~[ojdbc6.jar:11.2.0.4.0]
    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:208) ~[ojdbc6.jar:11.2.0.4.0]
    at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1046) ~[ojdbc6.jar:11.2.0.4.0]
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1336) ~[ojdbc6.jar:11.2.0.4.0]
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3613) ~[ojdbc6.jar:11.2.0.4.0]
    at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3714) ~[ojdbc6.jar:11.2.0.4.0]
    at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1378) ~[ojdbc6.jar:11.2.0.4.0]
    at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:44) ~[mybatis-3.2.8.jar:3.2.8]
    at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:69) ~[mybatis-3.2.8.jar:3.2.8]
    at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:48) ~[mybatis-3.2.8.jar:3.2.8]
    at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:105) ~[mybatis-3.2.8.jar:3.2.8]
    at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:71) ~[mybatis-3.2.8.jar:3.2.8]
    at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:152) ~[mybatis-3.2.8.jar:3.2.8]
    at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:141) ~[mybatis-3.2.8.jar:3.2.8]
    at org.camunda.bpm.engine.impl.db.sql.DbSqlSession.executeInsertEntity(DbSqlSession.java:145) ~[camunda-engine-7.5.0.jar:7.5.0]
    at org.camunda.bpm.engine.impl.db.sql.DbSqlSession.insertEntity(DbSqlSession.java:137) ~[camunda-engine-7.5.0.jar:7.5.0]
    at org.camunda.bpm.engine.impl.db.AbstractPersistenceSession.executeDbOperation(AbstractPersistenceSession.java:41) ~[camunda-engine-7.5.0.jar:7.5.0]
    at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperationManager(DbEntityManager.java:294) ~[camunda-engine-7.5.0.jar:7.5.0]
    ... 11 more

the BPMN:
script_error.bpmn (2.8 KB)
We found the problem as well
The script originally was created with Result variable but later we deleted that one. The modeler was not delete the result variable so the Camunda try to save a null as a variable.

Hi @Gabor_Sandor,

I am sorry, but could you rephrase your question? I am not sure I understand the problem fully.

Cheers,
Askar

@Gabor_Sandor,
it seems to be a bug in Modeler.
I’ve created s ticket for this: https://github.com/camunda/camunda-modeler/issues/542
For now you can just remove camunda:resultVariable="" manually from your BPMN XML.

Best.
Svetlana

1 Like