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

**URL:** <https://forum.flowable.org/t/java-sql-sqlsyntaxerrorexception-ora-00933-sql-command-not-properly-ended/8157>\
**Category:** Uncategorized\
**Created:** [July 19, 2021, 8:07pm UTC](https://forum.flowable.org/t/java-sql-sqlsyntaxerrorexception-ora-00933-sql-command-not-properly-ended/8157 "2021-07-19T20:07:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rquinn](https://avatars.discourse-cdn.com/v4/letter/r/3da27b/32.png) [@rquinn](https://forum.flowable.org/u/rquinn)\
**Post date:** [July 19, 2021, 8:07pm UTC](https://forum.flowable.org/t/java-sql-sqlsyntaxerrorexception-ora-00933-sql-command-not-properly-ended/8157/1 "2021-07-19T20:07:26Z")

</div>

We are getting the following exception:

```auto
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

---

<div class="post-metadata">

**Author:** ![joram](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/joram/32/26_2.png) [@joram](https://forum.flowable.org/u/joram)\
**Post date:** [August 2, 2021, 7:57am UTC](https://forum.flowable.org/t/java-sql-sqlsyntaxerrorexception-ora-00933-sql-command-not-properly-ended/8157/2 "2021-08-02T07:57:01Z")

</div>

That’s strange: the SQL in the exception is a non-Oracle sql. It should never have been executed (there’s a dedicated bulk insert for Oracle).

How have you configured your process engine? How are you configuring the database?
