Bug in oracle-DDL's

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-06-2014 04:58 AM
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
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
Labels:
- Labels:
-
Archive
17 REPLIES 17
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-20-2014 04:44 AM
Damn auto-assignment of jira 😉
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-21-2014 03:08 AM
Hi Joram, Harry,
I would say that it is configuration issue.
Regards
Martin
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

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-21-2014 03:51 AM
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
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
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-14-2015 06:04 AM
Hi Harry,
yes, but custom types are applied first so default types are not used for the Strings.
Regards
Martin
yes, but custom types are applied first so default types are not used for the Strings.
Regards
Martin
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-14-2015 05:31 AM
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
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
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-14-2015 06:06 AM
Hi Philippe,
I put my comment there already too.
https://github.com/Activiti/Activiti/pull/401
Regards
Martin
I put my comment there already too.
https://github.com/Activiti/Activiti/pull/401
Regards
Martin

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2016 03:30 PM
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.
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.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2016 06:24 AM
Sure, that won't be a probem.
