cancel
Showing results for 
Search instead for 
Did you mean: 

Bug in oracle-DDL's

hbraun
Champ in-the-making
Champ in-the-making
Hi activiti-team,

we had a problem to store string variables with length greater than 2000 chars. An exception  occurs only on oracle databases, with MySQL, H2, etc. it works as expected.
After a while, we found the reason: All DDL define varchars with 4000 chars, only the oracle DDL Scripts create textfields with length 2000.
Most times, it works fine. Only on oracle databases with a string variable with length between 2000 and 4000 you will get an exception. Less than 2000 chars, the string fits in database field, greater then 4000 chars the string is stored as a byte array.

We found the bug in activiti 5.16.1, the DDL in 5.16.3 looks still the same. In our system, we replaced all varchar(2000) with varchar(4000) and it looks fine until now.

Best regards,

Harry Braun
17 REPLIES 17

jbarrez
Star Contributor
Star Contributor
Damn auto-assignment of jira 😉

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi Joram, Harry,
I would say that it is configuration issue. customPreVariableTypes in activiti process engine configuration can override default behavior.


    <util:list id="preVariableTypes">
        <bean class="org.activiti.engine.impl.variable.NullType"/>
        <bean class="org.activiti.engine.impl.variable.StringType">
            <constructor-arg value="2000"/>
        </bean>
        <bean class="org.activiti.engine.impl.variable.LongStringType">
            <constructor-arg value="2001"/>
        </bean>
    </util:list>

Regards
Martin

hbraun
Champ in-the-making
Champ in-the-making
Hi Martin,

after adding customPreVariableTypes,  acitiviti adds the standard types with String(4000) and LongString(4001), see posting #4. AddType override the type in the hashtable, but add a second one to the list. So you can't override a standard type safely.

Best regards,

Harry

Hi Harry,

yes, but custom types are applied first so default types are not used for the Strings.

Regards
Martin

fandji
Champ in-the-making
Champ in-the-making
Hi

I did comment on the Issue: http://jira.codehaus.org/i#browse/ACT-2129 and https://github.com/Activiti/Activiti/pull/401.

Hopefully there will be a good solution found for this problem.

Best regards,

Philippe

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi Philippe,

I put my comment there already too.
https://github.com/Activiti/Activiti/pull/401

Regards
Martin

denisgmarques
Champ in-the-making
Champ in-the-making
Hi,

We still use Activiti 5.17. Can I modify the Oracle datatype to VARCHAR(4000)? because I have a customer that can't change NATIONAL CHARACTER SET. So the max value to NVARCHAR type in this instance is 2000.

jbarrez
Star Contributor
Star Contributor
Sure, that won't be a probem.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.