Anonymous | Login
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
TypeCategorySeverityReproducibilityDate SubmittedLast Update
design defect[Openbravo ERP] A. Platformminorhave not tried2018-01-22 20:222018-08-10 15:24
ReportershuehnerView Statuspublic 
Assigned Toplatform 
PrioritynormalResolutionopenFixed in Version
StatusacknowledgedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseOracleJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo

0037702: Hibernate update/insert to tables containing CLOB sometimes fail on Oracle (HHH-4635)

DescriptionOracle has a functional restriction meaning on tables mixing varchar & clob column which essentially means that clob column must be referenced last in the column list. Otherwise in case of the parameter values being sufficiently large for the previous varchar data the SQL statement fails with oracle specific error:

ORA-24816: Expanded non LONG bind data supplied after actual LONG or LOB column

Example of this behavior was found in this old issue: 27792

To reproduce an older version of the retail logclient table (from 16Q2) can be used as it had still both
a.) json column of type clob
b.) msg column of type varchar
c.) Alphabetic order on columns has json coming before msg (that is used by unfixed hibernate.

Example reproducer is short following java snippet (see steps to reproduce) which essentially builds a ca. 2k varchar value + a big value for the clob column and does an insert.

The issue was also be seen in the wild happening in a 16Q2 + oracle 11g instance.

Test case above cannot be reproduce in latest pi of retail as issue 30652 removed the dmsg varchar column as it contained duplicate info anyway.

But as the issue is generic -> reported here.

This seems to be fixed in hibernate upstream already but not in the version currently used in Openbravo yet: [^]
This 2nd link also has an description of the issue and manual solution (rename columns) to change order: [^]
Steps To ReproduceRun following java-snippet against 16q2 retail (or similar table) with oracle:

    StringBuilder test = new StringBuilder();
    for (int i = 0; i < 66000; i++) {
    String json = "test: " + test;
    StringBuilder test2 = new StringBuilder();
    for (int i = 0; i < 1950; i++) {
    logClient.setMsg("Some Msg Value: " + test2);

Proposed SolutionMoved to design defect because fix requires to create a non trivial patch in Hibernate. Ideally would wait for library update.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to feature request 0037064 closedcaristu Openbravo ERP upgrade hibernate 
related to defect 0030652 closedranjith_qualiantech_com Retail Modules The JSON column in the Log Client table is redundant, and takes too much space 

-  Notes
hgbot (developer)
2018-08-10 15:22

Repository: erp/mods/
Changeset: a9f468967bd85fa6ccf11c7b241a190ad1a90694
Author: Carlos Aristu <carlos.aristu <at>>
Date: Fri Aug 10 15:22:19 2018 +0200
URL: [^]

related to issue 37702: created test case to reproduce the issue

A src-db/database/model/tables/OBPFCI_LOGCLIENT.xml
A src-db/database/sourcedata/AD_COLUMN.xml
A src-db/database/sourcedata/AD_PACKAGE.xml
A src-db/database/sourcedata/AD_TABLE.xml
A src-test/org/openbravo/platform/ci/
caristu (developer)
2018-08-10 15:24

Issue can be still reproduced after 0037064

Although it seems to be fixed in Hibernate, it seems that to fix this issue it is also required to declare which are the Lob columns in the Hibernate mapping.

- Issue History
Date Modified Username Field Change
2018-01-22 20:22 shuehner New Issue
2018-01-22 20:22 shuehner Assigned To => platform
2018-01-22 20:22 shuehner Modules => Core
2018-01-22 20:22 shuehner Triggers an Emergency Pack => No
2018-01-22 20:22 shuehner Relationship added related to 0037064
2018-01-30 10:35 alostale Status new => acknowledged
2018-01-30 10:38 alostale Type defect => design defect
2018-01-30 10:38 alostale Proposed Solution updated
2018-08-09 08:24 caristu Relationship added related to 0030652
2018-08-10 15:22 hgbot Checkin
2018-08-10 15:22 hgbot Note Added: 0106290
2018-08-10 15:24 caristu Note Added: 0106291

Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker