# Value too large for column "CAMUNDA\_PROD"."ACT\_HI\_VARINST"."TEXT\_"

**URL:** <https://forum.camunda.io/t/value-too-large-for-column-camunda-prod-act-hi-varinst-text/63131>\
**Category:** Camunda 7 Topics\
**Tags:** process-engine\
**Created:** [July 8, 2025, 2:04pm UTC](https://forum.camunda.io/t/value-too-large-for-column-camunda-prod-act-hi-varinst-text/63131 "2025-07-08T14:04:05Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rlehnert](https://forum.camunda.io/letter_avatar_proxy/v4/letter/r/9fc29f/32.png) [@rlehnert](https://forum.camunda.io/u/rlehnert)\
**Post date:** [July 8, 2025, 2:04pm UTC](https://forum.camunda.io/t/value-too-large-for-column-camunda-prod-act-hi-varinst-text/63131/1 "2025-07-08T14:04:05Z")

</div>

We’re using the Camunda engine 7.9.0 with an Oracle database 19c.  
In the database, the field “ACT\_HI\_VARINST.TEXT\_” is defined as NVARCHAR2(2000).  
Can this field be converted to a CLOB, or does this have any side effects?

---

<div class="post-metadata">

**Author:** ![aravindhrs](https://forum.camunda.io/user_avatar/forum.camunda.io/aravindhrs/32/32503_2.png) [@aravindhrs](https://forum.camunda.io/u/aravindhrs)\
**Post date:** [July 10, 2025, 7:10am UTC](https://forum.camunda.io/t/value-too-large-for-column-camunda-prod-act-hi-varinst-text/63131/2 "2025-07-10T07:10:56Z")

</div>

@rlehnert You’re encountering the **“Value too large for column”** error because Camunda 7.9.0 tries to store a variable’s value (typically a String or serialized object) in the `ACT_HI_VARINST.TEXT_` column, which is **limited to 2000 characters (bytes)** in Oracle due to `NVARCHAR2(2000)`.

### 🔍 Root Cause:

In Camunda 7.9.0:

- If a variable value is short (\<= 2000 characters), it is stored in the `TEXT_` column.
- If it exceeds the size, it **should** be stored in the `BYTEARRAY_` column via the `ACT_GE_BYTEARRAY` table.
- However, Camunda only does this **if the variable is declared as a serializable Java object or a byte array** , not for long strings.

* * *

## Recommended Solutions

### Option 1: **Upgrade Camunda Version**

Camunda **7.15+** has much better handling of long string variables. It automatically stores long strings in the `ACT_GE_BYTEARRAY` table.

- **Advantage** : No DB schema changes required.

- **How** :

### Option 2: **Store Large Variables as Serialized Objects**

If you cannot upgrade, you can explicitly store long values in a way Camunda uses the `BYTEARRAY_` mechanism:

```java
runtimeService.setVariable(processInstanceId,
    "longStringVar",
    Variables.serializedObjectValue(largeString)
        .serializationDataFormat(SerializationDataFormats.JAVA)
        .create());

```

- **Pros** : Bypasses the `TEXT_` column entirely.
- **Cons** : Stored as a serialized object, not plain text.

### Option 3: **Manual Workaround Using CLOB (Not Recommended)**

You **can** alter the table to change the column `TEXT_` from `NVARCHAR2(2000)` to `CLOB`, **but Camunda does not officially support this** , and it **may break assumptions** in:

- Query performance
- Compatibility with Camunda APIs
- Variable deserialization

If you still want to go ahead:

```sql
ALTER TABLE CAMUNDA_PROD.ACT_HI_VARINST MODIFY TEXT_ CLOB;

```

**⚠ Side Effects** :

- `CLOB` access requires different handling in Java JDBC (stream-based).
- It may break Camunda internal SQL queries that expect `TEXT_` to be NVARCHAR2.
- Indexes on this column (if any) will be invalidated.

## Best Practice (Short-Term Fix)

If upgrade isn’t possible yet:

- Avoid setting long strings as process variables directly.

- Instead:

---

<div class="post-metadata">

**Author:** ![angela852black](https://forum.camunda.io/letter_avatar_proxy/v4/letter/a/48db29/32.png) [@angela852black](https://forum.camunda.io/u/angela852black)\
**Post date:** [July 10, 2025, 12:19pm UTC](https://forum.camunda.io/t/value-too-large-for-column-camunda-prod-act-hi-varinst-text/63131/3 "2025-07-10T12:19:00Z")

</div>

Hello,

Are you Upgrade to at least Camunda 7.15 ?

Best Regard,  
Angela

---

<div class="post-metadata">

**Author:** ![rlehnert](https://forum.camunda.io/letter_avatar_proxy/v4/letter/r/9fc29f/32.png) [@rlehnert](https://forum.camunda.io/u/rlehnert)\
**Post date:** [July 10, 2025, 4:31pm UTC](https://forum.camunda.io/t/value-too-large-for-column-camunda-prod-act-hi-varinst-text/63131/4 "2025-07-10T16:31:53Z")

</div>

@aravindhrs,  
thank you for the detailed explanation.  
I will discuss a migration to 7.19 with my colleagues in IT.  
This seems to be the most sensible approach.

Best regards  
Rolf

---

<div class="post-metadata">

**Author:** ![fml2](https://forum.camunda.io/user_avatar/forum.camunda.io/fml2/32/6280_2.png) [@fml2](https://forum.camunda.io/u/fml2)\
**Post date:** [July 13, 2025, 5:21pm UTC](https://forum.camunda.io/t/value-too-large-for-column-camunda-prod-act-hi-varinst-text/63131/5 "2025-07-13T17:21:39Z")

</div>

> [@aravindhrs](#):
>
> Camunda **7.15+** has much better handling of long string variables. It automatically stores long strings in the `ACT_GE_BYTEARRAY` table.

This is not true IMO. Strings are still saved as strings. Hence, if you have a string value that is longer than 2000 characters you should store it in a wrapper object. Objects are always stored as blobs so there is no limitation on the size.

Camanda 7.9 is ancient. Why do you still use this version (asking just out of interest).

---

<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:** [October 11, 2025, 5:22pm UTC](https://forum.camunda.io/t/value-too-large-for-column-camunda-prod-act-hi-varinst-text/63131/6 "2025-10-11T17:22:03Z")

</div>

Closed on October 11, 2025, 5:22pm UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
