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

View Issue DetailsJump to Notes ] Issue History ] Print ]
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] Y. DBSourceManagerminorhave not tried2021-01-13 17:522021-06-11 10:18
ReportershuehnerView Statuspublic 
Assigned Toshuehner 
PrioritynormalResolutionfixedFixed in VersionPR21Q3
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget VersionPR21Q3
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

0045729: export.database fails with some views on oracle with: An invalid XML character (Unicode: 0x0) was found in the CDATA section.

DescriptionProblem was found in one specific environment for 3 specific views.

Running export.database with the module in development containing those views fails with:
     [java] Caused by: org.apache.ddlutils.DdlUtilsException: An invalid XML character (Unicode: 0x0) was found in the CDATA section. : /srv/ci/workspace/mod-simple-ci34.18102/modules/org.openbravo.cashposition/src-db/database/model/views/OBCP_ACTUALS_V.xml
     [java] at
     [java] at org.openbravo.ddlutils.task.DatabaseUtils.readDatabaseNoChecks(
     [java] at org.openbravo.ddlutils.task.DatabaseUtils.readDatabaseNoChecks(
     [java] at org.openbravo.ddlutils.task.DatabaseUtils.readDatabaseNoChecks(
     [java] at org.openbravo.ddlutils.task.DatabaseUtils.getMergedDatabaseAndInitialize(
     [java] at org.openbravo.ddlutils.task.DatabaseUtils.readDatabase(
     [java] at org.openbravo.ddlutils.task.DatabaseUtils.readDatabaseModel(
     [java] at org.openbravo.ddlutils.task.ExportDatabase.execute(

Technically errors comes from code inside export.database re-reading the just exported xml definition files and failing the the export did write wrong data into them.

Comparing diff of the wrong view to earlier state shows that 1 or 3 0x0 byte '0' are added just after the view definition itself inside the CDATA section.

The attached diff shows the wrong data.

Trigger for when this error is happening + cause of adding 1 or 3 of those bytes is currently unclear.
Problem can be reproduced 100% reliably in one environment.

This code-snapshot file and revision can reproduce the problem: [^]
Steps To ReproduceClone above code-snapshot
run install.source on oracle
run all modules with type <>'T' into development
run export.database

Probably just exporting this specific module: "org.openbravo.cashposition" is enough to reproduce the problem
TagsNo tags attached.
Attached Filesdiff file icon oracle-export.database-problem.diff [^] (1,480 bytes) 2021-01-13 17:52 [Show Content]
xml file icon OBCP_ACTUALS_V.xml [^] (10,722 bytes) 2021-01-13 17:53
xml file icon OBCP_CASHPOSDETAIL_INT_V.xml [^] (1,408 bytes) 2021-01-13 17:53
xml file icon OBCP_CASHPOSDETAIL_V.xml [^] (1,748 bytes) 2021-01-13 17:53

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
shuehner (administrator)
2021-01-13 17:54

The 3 xml files attached are the 3 views triggering the problem (just for easy access. They are contained in the code-snapshot referenced above)
hgbot (developer)
2021-06-09 13:54

Merge Request created: [^]
hgbot (developer)
2021-06-10 07:05

Repository: [^]
Changeset: fd92818322bcf48dda05237cfbc28f3ca327ab45
Author: Stefan Huehner <>
Date: 2021-06-09T13:44:46+02:00
URL: [^]

ISSUE-45729: Workaround reading some views on oracle (extra 0x0 bytes)

Some specific views when having their definition read from the database
fail as they have 1-3 0x0 bytes just after their view body.

That works around strange Oracle behavior (probably caused by
USER_VIEWS.TEXT column we read here having 'LONG' data type and that
datatype has some quirks and is marked 'do not use me' (but used in that
internal ORACLE view).

Apply trim() to the String value read which will strip out any
whitespace (including 0x0) before post-processing it.

We already strip out \n (newlines) from view bodies and even .trim() the
result of the PG translation.

M src/org/apache/ddlutils/platform/
hgbot (developer)
2021-06-10 07:05

Merge request merged: [^]
hgbot (developer)
2021-06-11 10:18

Directly closing issue as related merge request is already approved.

Repository: [^]
Changeset: 5c9721a21dc89e884c13b3bfb31df376e727ffdb
Author: Stefan Huehner <>
Date: 2021-06-11T10:17:06+02:00
URL: [^]

fixes ISSUE-47036; fixes ISSUE-45729; fixes ISSUE-47047; fixes ISSUE-28703

dbsm including the fixes for:

ISSUE-47036: Remove lots of obsolete support code for obsolete
    (update.database.mod, ezattributes module, dbmanager.jar references)
ISSUE-45729: export.database fails with some views on oracle with:
    An invalid XML character (Unicode: 0x0) was found in the CDATA section.
ISSUE-47047: Reading tables part of PostgreSQL modelloader could be simplified and speed up
ISSUE-28703: dbmanager.jar & src-db/src removal

M src-db/database/lib/dbsourcemanager.jar

- Issue History
Date Modified Username Field Change
2021-01-13 17:52 shuehner New Issue
2021-01-13 17:52 shuehner Assigned To => platform
2021-01-13 17:52 shuehner File Added: oracle-export.database-problem.diff
2021-01-13 17:52 shuehner Modules => Core
2021-01-13 17:52 shuehner Triggers an Emergency Pack => No
2021-01-13 17:53 shuehner File Added: OBCP_ACTUALS_V.xml
2021-01-13 17:53 shuehner File Added: OBCP_CASHPOSDETAIL_INT_V.xml
2021-01-13 17:53 shuehner File Added: OBCP_CASHPOSDETAIL_V.xml
2021-01-13 17:54 shuehner Note Added: 0125436
2021-06-09 13:54 hgbot Note Added: 0129264
2021-06-09 20:02 shuehner Target Version => PR21Q3
2021-06-09 20:02 shuehner Assigned To platform => shuehner
2021-06-10 07:05 hgbot Note Added: 0129295
2021-06-10 07:05 hgbot Note Added: 0129296
2021-06-11 10:18 hgbot Resolution open => fixed
2021-06-11 10:18 hgbot Status new => closed
2021-06-11 10:18 hgbot Fixed in Version => PR21Q3
2021-06-11 10:18 hgbot Note Added: 0129394

Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker