# Camunda 7.6.0 failed on database created by 7.5.0

**URL:** <https://forum.camunda.io/t/camunda-7-6-0-failed-on-database-created-by-7-5-0/2145>\
**Category:** Discussion & Questions\
**Tags:** process-engine\
**Created:** [November 30, 2016, 10:33am UTC](https://forum.camunda.io/t/camunda-7-6-0-failed-on-database-created-by-7-5-0/2145 "2016-11-30T10:33:36Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![GhostFox](https://forum.camunda.io/letter_avatar_proxy/v4/letter/g/4af34b/32.png) [@GhostFox](https://forum.camunda.io/u/GhostFox)\
**Post date:** [November 30, 2016, 10:33am UTC](https://forum.camunda.io/t/camunda-7-6-0-failed-on-database-created-by-7-5-0/2145/1 "2016-11-30T10:33:36Z")

</div>

First of all, thanks a lot for the great workflow engine and the upgrade.

I am using the Camunda 7.5.0 with MySQL and it works great. Today the 7.6.0 has been released and I can’t wait to try. When I finished the upgrade and tested, the below error occurred when I tried to start a process.

Class  
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException  
Message  
Unknown column ‘STATE\_’ in ‘field list’

The same code works well with 7.5.0 and we like to keep the current Camunda database. Is there any upgrade steps I just missed?

Any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![JoHeinem](https://forum.camunda.io/user_avatar/forum.camunda.io/joheinem/32/746_2.png) [@JoHeinem](https://forum.camunda.io/u/JoHeinem)\
**Post date:** [November 30, 2016, 10:42am UTC](https://forum.camunda.io/t/camunda-7-6-0-failed-on-database-created-by-7-5-0/2145/2 "2016-11-30T10:42:41Z")

</div>

Hi @GhostFox,

I advice you to read through the [update guide](https://docs.camunda.org/manual/develop/update/minor/75-to-76/) before migrating to 7.6.0. There you can also find how to update your database so it works with camunda 7.6.0 as well.

Hope that helps 🙂

Best,  
Johannes

---

<div class="post-metadata">

**Author:** ![hawky4s](https://forum.camunda.io/user_avatar/forum.camunda.io/hawky4s/32/25_2.png) [@hawky4s](https://forum.camunda.io/u/hawky4s)\
**Post date:** [November 30, 2016, 10:47am UTC](https://forum.camunda.io/t/camunda-7-6-0-failed-on-database-created-by-7-5-0/2145/3 "2016-11-30T10:47:02Z")

</div>

Hi @GhostFox,

Could you please attach the whole stacktrace and describe the steps you did during the upgrade to 7.6.0.

Cheers,  
Christian

---

<div class="post-metadata">

**Author:** ![GhostFox](https://forum.camunda.io/letter_avatar_proxy/v4/letter/g/4af34b/32.png) [@GhostFox](https://forum.camunda.io/u/GhostFox)\
**Post date:** [November 30, 2016, 1:04pm UTC](https://forum.camunda.io/t/camunda-7-6-0-failed-on-database-created-by-7-5-0/2145/4 "2016-11-30T13:04:41Z")

</div>

Thanks for all of your responses.

I am using the Camunda grails plugin and just changed the version in the BuildConfig.groovy file, grails upgraded all the jar files for me.

Looks like I have the database patch missed. I followed the url and just found the database script ended with ‘engine\_7.4\_patch\_7.4.5\_to\_7.4.6.sql’. There’s no one I can use on 7.5 to 7.6.

A small part of the whole stacktrace goes below.

2016-11-30 18:34:14,705 [http-bio-8080-exec-5] ERROR engine.context - ENGINE-16004 Exception while closing command context: ENGINE-03004 Exception while executing Database Operation ‘INSERT HistoricProcessInstanceEventEntity[617]’ with message ’

### Error updating database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column ‘STATE\_’ in ‘field list’

### The error may involve org.camunda.bpm.engine.impl.persistence.entity.HistoricProcessInstanceEntity.insertHistoricProcessInstanceEvent-Inline

### The error occurred while setting parameters

### SQL: insert into ACT\_HI\_PROCINST ( ID\_, PROC\_INST\_ID\_, BUSINESS\_KEY\_, PROC\_DEF\_KEY\_, PROC\_DEF\_ID\_, START\_TIME\_, END\_TIME\_, DURATION\_, START\_USER\_ID\_, START\_ACT\_ID\_, END\_ACT\_ID\_, SUPER\_PROCESS\_INSTANCE\_ID\_, SUPER\_CASE\_INSTANCE\_ID\_, CASE\_INST\_ID\_, DELETE\_REASON\_, TENANT\_ID\_, STATE\_ ) values ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )

### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column ‘STATE\_’ in ‘field list’’. Flush summary:

[  
INSERT HistoricVariableInstanceEntity[618]  
INSERT HistoricVariableInstanceEntity[619]  
INSERT HistoricVariableInstanceEntity[620]  
INSERT HistoricTaskInstanceEventEntity[624]  
INSERT HistoricProcessInstanceEventEntity[617]  
INSERT HistoricActivityInstanceEventEntity[StartEvent\_Prosecute\_Label:621]  
INSERT HistoricActivityInstanceEventEntity[Task\_OnlineAccept:622]  
INSERT HistoricActivityInstanceEventEntity[UserTask\_InfoInput:623]  
INSERT ExecutionEntity[617]  
INSERT TaskEntity[624]  
INSERT VariableInstanceEntity[618]  
INSERT VariableInstanceEntity[619]  
INSERT VariableInstanceEntity[620]  
]

---

<div class="post-metadata">

**Author:** ![hawky4s](https://forum.camunda.io/user_avatar/forum.camunda.io/hawky4s/32/25_2.png) [@hawky4s](https://forum.camunda.io/u/hawky4s)\
**Post date:** [November 30, 2016, 4:12pm UTC](https://forum.camunda.io/t/camunda-7-6-0-failed-on-database-created-by-7-5-0/2145/5 "2016-11-30T16:12:31Z")

</div>

Hi,

> [@GhostFox](#):
>
> Looks like I have the database patch missed. I followed the url and just found the database script ended with ‘engine\_7.4\_patch\_7.4.5\_to\_7.4.6.sql’. There’s no one I can use on 7.5 to 7.6.

Please download the full distribution of Camunda BPM from [here](https://camunda.org/download/). Any server will do. Then unarchive the file and look for the sql folder. You should find a file with following pattern `$DATABASENAME_engine_7.5_to_7.6.sql` in it. Execute the script using your favorite database tool to upgrade from 7.5 to 7.6 schema. Be sure to make a backup before etc.  
The file can also be found on [GitHub](https://github.com/camunda/camunda-bpm-platform/tree/master/distro/sql-script/upgrade).  
Because Camunda isn’t automatically upgrading your database, you have to do it manually.

Cheers,  
Christian

---

<div class="post-metadata">

**Author:** ![GhostFox](https://forum.camunda.io/letter_avatar_proxy/v4/letter/g/4af34b/32.png) [@GhostFox](https://forum.camunda.io/u/GhostFox)\
**Post date:** [December 1, 2016, 1:48am UTC](https://forum.camunda.io/t/camunda-7-6-0-failed-on-database-created-by-7-5-0/2145/6 "2016-12-01T01:48:00Z")

</div>

Hi Christian,  
Thanks for the tip. I just found mysql\_engine\_7.5\_to\_7.6.sql script under camunda-bpm-tomcat-7.6.0.zip\sql\upgrade.

When I ran this script on my local for testing, my local My SQL version is 5.7.16.0, the error occurred:

SQL Error [1060] [42S21]: Duplicate column name ‘DEC\_REQ\_KEY\_’

SQL Error [1064] [42000]: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ALTER TABLE ACT\_RE\_DECISION\_DEF  
ADD DEC\_REQ\_ID\_ varchar(64);

ALTER TABLE ACT\_’ at line 11  
java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ALTER TABLE ACT\_RE\_DECISION\_DEF  
ADD DEC\_REQ\_ID\_ varchar(64);

ALTER TABLE ACT\_’ at line 11

Any advice?

---

<div class="post-metadata">

**Author:** ![GhostFox](https://forum.camunda.io/letter_avatar_proxy/v4/letter/g/4af34b/32.png) [@GhostFox](https://forum.camunda.io/u/GhostFox)\
**Post date:** [December 1, 2016, 8:30am UTC](https://forum.camunda.io/t/camunda-7-6-0-failed-on-database-created-by-7-5-0/2145/7 "2016-12-01T08:30:42Z")

</div>

Latest Update:

1. I ran the SQL Script with DBeaver 3.8.0, errors occurred, just like the detail in my last reply.
2. I tried the sql statement one by one with DBeaver 3.8.0, no errors.
3. I ran the SQL Script with MySQL Workbench 6.3.8, no errors at all.

Current progress: After running the sql upgrade script, everything works great.

BTW, there is another code update, new property called executionEntity introduced in the runtimeService.startProcessInstanceByKey() result. That’s the one I found.

Thanks all for your time and replies.

---

<div class="post-metadata">

**Author:** ![hawky4s](https://forum.camunda.io/user_avatar/forum.camunda.io/hawky4s/32/25_2.png) [@hawky4s](https://forum.camunda.io/u/hawky4s)\
**Post date:** [December 1, 2016, 12:44pm UTC](https://forum.camunda.io/t/camunda-7-6-0-failed-on-database-created-by-7-5-0/2145/8 "2016-12-01T12:44:57Z")

</div>

Interesting, we are also using DBeaver and haven’t been hit by this issue.  
You shouldn’t use the property `executionEntity` as it doesn’t belong to the public API of Camunda.  
Always use the returned interface methods of the results.

Cheers,  
Christian

---

<div class="post-metadata">

**Author:** ![GhostFox](https://forum.camunda.io/letter_avatar_proxy/v4/letter/g/4af34b/32.png) [@GhostFox](https://forum.camunda.io/u/GhostFox)\
**Post date:** [December 1, 2016, 1:03pm UTC](https://forum.camunda.io/t/camunda-7-6-0-failed-on-database-created-by-7-5-0/2145/9 "2016-12-01T13:03:02Z")

</div>

The RuntimeService.startProcessInstanceByKey method returns an instance of ProcessInstance. It contains four methods:

1. getProcessDefinitionId
2. getBusinessKey
3. getCaseInstanceId
4. isSuspended

Which would be the suggested way to get the process instance / execution id instead? Thanks.

---

<div class="post-metadata">

**Author:** ![hawky4s](https://forum.camunda.io/user_avatar/forum.camunda.io/hawky4s/32/25_2.png) [@hawky4s](https://forum.camunda.io/u/hawky4s)\
**Post date:** [December 1, 2016, 1:36pm UTC](https://forum.camunda.io/t/camunda-7-6-0-failed-on-database-created-by-7-5-0/2145/10 "2016-12-01T13:36:35Z")

</div>

The [`ProcessInstance`](https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/runtime/ProcessInstance.java) interface extends the [`Execution`](https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/runtime/Execution.java) interface by itself so it also has the methods `getProcessInstanceId` and the `getId` (which is the specific execution id).

Cheers

---

<div class="post-metadata">

**Author:** ![GhostFox](https://forum.camunda.io/letter_avatar_proxy/v4/letter/g/4af34b/32.png) [@GhostFox](https://forum.camunda.io/u/GhostFox)\
**Post date:** [December 2, 2016, 2:12am UTC](https://forum.camunda.io/t/camunda-7-6-0-failed-on-database-created-by-7-5-0/2145/11 "2016-12-02T02:12:07Z")

</div>

Update for the DBeaver:  
Only Execute Script (ALT+X) works without errors. The others don’t. I am not sure why.

---

<div class="post-metadata">

**Author:** ![Sid](https://forum.camunda.io/letter_avatar_proxy/v4/letter/s/5f9b8f/32.png) [@Sid](https://forum.camunda.io/u/Sid)\
**Post date:** [April 26, 2017, 12:22pm UTC](https://forum.camunda.io/t/camunda-7-6-0-failed-on-database-created-by-7-5-0/2145/12 "2017-04-26T12:22:12Z")

</div>

Hi

I am getting a similar error.I have been using 7.4.0 and I have’nt changed any thing with respect to camunda.  
Can anyone help me out here,as I think this issue is not something which is related to camunda version upgrade.

Error:- Exception: org.camunda.bpm.engine.ProcessEngineException  
org.camunda.bpm.engine.ProcessEngineException: ENGINE-03004 Exception while executing Database Operation ‘INSERT HistoricVariableInstanceEntity[78877]’ with message ’

### Error updating database. Cause: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column ‘NAME\_’ at row 1

### 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\_, 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: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column ‘NAME\_’ at row 1’. Flush summary:

[  
INSERT HistoricVariableInstanceEntity[78802]

---

<div class="post-metadata">

**Author:** ![hawky4s](https://forum.camunda.io/user_avatar/forum.camunda.io/hawky4s/32/25_2.png) [@hawky4s](https://forum.camunda.io/u/hawky4s)\
**Post date:** [April 26, 2017, 1:38pm UTC](https://forum.camunda.io/t/camunda-7-6-0-failed-on-database-created-by-7-5-0/2145/13 "2017-04-26T13:38:54Z")

</div>

> [@Naveed\_Siddiqui](#):
>
> Error updating database. Cause: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column ‘NAME\_’ at row 1

This points to the engine trying to persist a variable into the history, which name exceeds the field length of the NAME\_ column. By default this is [255](https://github.com/camunda/camunda-bpm-platform/blob/7.4.0/engine/src/main/resources/org/camunda/bpm/engine/db/create/activiti.mysql.create.history.sql#L82) chars.  
Are you using a long variable name in your process?

---

<div class="post-metadata">

**Author:** ![Sid](https://forum.camunda.io/letter_avatar_proxy/v4/letter/s/5f9b8f/32.png) [@Sid](https://forum.camunda.io/u/Sid)\
**Post date:** [April 26, 2017, 2:08pm UTC](https://forum.camunda.io/t/camunda-7-6-0-failed-on-database-created-by-7-5-0/2145/14 "2017-04-26T14:08:45Z")

</div>

Even I thought the same but, I am no where using a variable whose name length crosses 255 chars.Actually there was no such issue when I ran it some time back and I am 100 % sure that I havent changed anything for the next run.  
If the variable ‘NAME\_’ length can be the issue,where can I check this internally as I have cross checked all my variable names am using ? any pointers on this ?

---

<div class="post-metadata">

**Author:** ![system](https://forum.camunda.io/uploads/default/original/3X/5/8/58d50142eacca605d35cb1ef9e6b86ae85f49436.png) [@system](https://forum.camunda.io/u/system)\
**Post date:** [January 30, 2024, 10:43am UTC](https://forum.camunda.io/t/camunda-7-6-0-failed-on-database-created-by-7-5-0/2145/15 "2024-01-30T10:43:58Z")

</div>

Closed on January 30, 2024, 10:43am UTC


