Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0037702 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
design defect | [Openbravo ERP] A. Platform | minor | have not tried | 2018-01-22 20:22 | 2021-10-14 09:34 | |||
Reporter | shuehner | View Status | public | |||||
Assigned To | cberner | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | PR20Q4 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 4ce8dfed86f9 | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Oracle | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | cberner | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0037702: Hibernate update/insert to tables containing CLOB sometimes fail on Oracle (HHH-4635) | |||||||
Description | Oracle 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. NOTE: 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: https://hibernate.atlassian.net/browse/HHH-4635 [^] This 2nd link also has an description of the issue and manual solution (rename columns) to change order: https://bugs.eclipse.org/bugs/show_bug.cgi?id=486883 [^] | |||||||
Steps To Reproduce | Run following java-snippet against 16q2 retail (or similar table) with oracle: StringBuilder test = new StringBuilder(); for (int i = 0; i < 66000; i++) { test.append("a"); } String json = "test: " + test; StringBuilder test2 = new StringBuilder(); for (int i = 0; i < 1950; i++) { test2.append("a"); } logClient.setMsg("Some Msg Value: " + test2); logClient.setJson(json); OBDal.getInstance().save(logClient); OBDal.getInstance().flush(); | |||||||
Proposed Solution | Moved to design defect because fix requires to create a non trivial patch in Hibernate. Ideally would wait for library update. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |||||||||||||||||
|
Notes | |
(0106290) hgbot (developer) 2018-08-10 15:22 |
Repository: erp/mods/org.openbravo.platform.ci Changeset: a9f468967bd85fa6ccf11c7b241a190ad1a90694 Author: Carlos Aristu <carlos.aristu <at> openbravo.com> Date: Fri Aug 10 15:22:19 2018 +0200 URL: http://code.openbravo.com/erp/mods/org.openbravo.platform.ci/rev/a9f468967bd85fa6ccf11c7b241a190ad1a90694 [^] 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/InsertCLOB.java --- |
(0106291) 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. |
(0132198) cberner (developer) 2021-10-06 13:35 |
This issue is still reproducible after https://issues.openbravo.com/view.php?id=45968 [^] It seems however to only being reproducible with Oracle v12 and older, with Oracle v19 the test we have here https://gitlab.com/openbravo/ci/modules/org.openbravo.platform.ci/-/blob/master/src-test/org/openbravo/platform/ci/InsertCLOB.java [^] passes correctly. It may have been fixed by Oracle in between version 12 and 19. |
(0132336) cberner (developer) 2021-10-14 09:34 |
This is no longer reproducible with our supported and recommended Oracle version 19. It is only reproducible with older versions, 11 and 12. As such, because from PR20Q4 we don't support this version, the issue may be closed. |
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 | |
2021-10-06 13:35 | cberner | Note Added: 0132198 | |
2021-10-14 09:30 | cberner | Assigned To | platform => cberner |
2021-10-14 09:30 | cberner | Status | acknowledged => scheduled |
2021-10-14 09:34 | cberner | Note Added: 0132336 | |
2021-10-14 09:34 | cberner | Status | scheduled => resolved |
2021-10-14 09:34 | cberner | Fixed in Version | => PR20Q4 |
2021-10-14 09:34 | cberner | Fixed in SCM revision | => 4ce8dfed86f96817045d31e462d5cbc9eb4a3c27 |
2021-10-14 09:34 | cberner | Resolution | open => fixed |
2021-10-14 09:34 | cberner | Review Assigned To | => cberner |
2021-10-14 09:34 | cberner | Status | resolved => closed |
Copyright © 2000 - 2009 MantisBT Group |