java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly ended

We are getting the following exception:

org.apache.ibatis.exceptions.PersistenceException: 
### Error updating database.  Cause: java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly ended

### The error may exist in org/flowable/db/mapping/entity/HistoricActivityInstance.xml
### The error may involve org.flowable.engine.impl.persistence.entity.HistoricActivityInstanceEntityImpl.bulkInsertHistoricActivityInstance-Inline
### The error occurred while setting parameters
### SQL: insert into ACT_HI_ACTINST (         ID_,         REV_,         PROC_DEF_ID_,         PROC_INST_ID_,         EXECUTION_ID_,         ACT_ID_,         TASK_ID_,         CALL_PROC_INST_ID_,         ACT_NAME_,         ACT_TYPE_,         ASSIGNEE_,         START_TIME_,         END_TIME_,         DURATION_,         DELETE_REASON_,         TENANT_ID_       ) values                    (?,           1,           ?,           ?,           ?,           ?,           ?,           ?,           ?,           ?,           ?,           ?,           ?,           ?,           ?,           ?)        ,           (?,           1,           ?,           ?,           ?,           ?,           ?,           ?,           ?,           ?,           ?,           ?,           ?,           ?,           ?,           ?)        ,           (?,           1,           ?,           ?,           ?,           ?,           ?,           ?,           ?,           ?,           ?,           ?,           ?,           ?,           ?,           ?)        ,           (?,           1,           ?,           ?,           ?,           ?,           ?,           ?,           ?,           ?,           ?,           ?,           ?,           ?,           ?,           ?)        ,           (?,           1,           ?,           ?,           ?,           ?,           ?,           ?,           ?,           ?,           ?,           ?,           ?,           ?,           ?,           ?)        ,           (?,           1,           ?,           ?,           ?,           ?,           ?,           ?,           ?,           ?,           ?,           ?,           ?,           ?,           ?,           ?)
### Cause: java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly ended

	at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
	at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:199)
	at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:184)
	at org.flowable.common.engine.impl.db.DbSqlSession.flushBulkInsert(DbSqlSession.java:473)
	at org.flowable.common.engine.impl.db.DbSqlSession.flushInsertEntities(DbSqlSession.java:429)
	at org.flowable.common.engine.impl.db.DbSqlSession.flushInserts(DbSqlSession.java:406)
	at org.flowable.common.engine.impl.db.DbSqlSession.flush(DbSqlSession.java:291)
	at org.flowable.common.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:191)
	at org.flowable.common.engine.impl.interceptor.CommandContext.close(CommandContext.java:61)
	at org.flowable.common.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:81)
	at org.flowable.common.spring.SpringTransactionInterceptor.lambda$execute$0(SpringTransactionInterceptor.java:56)
	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140)
	at org.flowable.common.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:56)
	at org.flowable.common.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:30)
	at org.flowable.common.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:56)
	at org.flowable.common.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:51)
	at org.flowable.engine.impl.RuntimeServiceImpl.trigger(RuntimeServiceImpl.java:422)
	at com.centerprise.flowable6.service.ActivitiWorkflowSupportImpl.signal(ActivitiWorkflowSupportImpl.java:976)

This happens when calling the RuntimeService.trigger(executionId).

We have made no coding changes or process changes. It doesn’t happen with every call to trigger, but consistently is happening for the same activities.

Any help much appreciated.

Thanks,
Rick