Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0040047Openbravo ERPY. DBSourceManagerpublic2019-01-28 17:012019-03-28 14:55
highminorhave not tried
0040047: Fix database export to avoid manually copying wstx-asl-3.0.2.jar inside Ant folder
Currently if the wstx-asl-3.0.2.jar library is not present inside the lib folder of the base Ant folder, then after exporting the database the xml headers of the database model files are exported with double quotes.

This is because the[1] class is used instead of the com.ctc.wstx.stax.WstxOutputFactory[2].

Besides, note that apart of exporting the xml header with single quotes, it is faster to use the class provided by the wstx-asl-3.0.2.jar library

[1] [^]
[2] [^]
1) Ensure that the wstx-asl-3.0.2.jar is not present inside the lib folder of the base Ant folder.
2) Run ant export.database
3) Note that XML headers have been exported with double quotes
Use a forked ant task to include the wstx-asl-3.0.2.jar in the classpath when executing these export tasks:

- ant export.database
- ant

Note that this change is not needed for the export.config.script because it is using a different mechanism to export the template definition into the XML files. See[1], [2].

Also note that after fixing this issue it will not be necessary to include that library inside the Ant folder as explained here[3].

[1] [^]
[2] [^]
[3] [^]
No tags attached.
related to design defect 0039056 closed caristu Hibernate pool is being used by some ant tasks 
related to defect 0040246 closed caristu It is not needed to include the woodstox library in the runtime classpath 
causes defect 0040152 closed caristu export.database is slower after defining it as a forked task 
causes defect 0040187 closed caristu export.database gets stuck using old pool 
Issue History
2019-01-28 17:01caristuNew Issue
2019-01-28 17:01caristuAssigned To => caristu
2019-01-28 17:01caristuModules => Core
2019-01-28 17:01caristuTriggers an Emergency Pack => No
2019-01-28 17:02caristuRelationship addedrelated to 0039056
2019-01-28 19:12caristuDescription Updatedbug_revision_view_page.php?rev_id=18205#r18205
2019-01-28 19:12caristuSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=18207#r18207
2019-01-29 08:49caristuDescription Updatedbug_revision_view_page.php?rev_id=18212#r18212
2019-01-29 09:00caristuDescription Updatedbug_revision_view_page.php?rev_id=18213#r18213
2019-01-29 13:53caristuProposed Solution updated
2019-01-29 16:38caristuStatusnew => scheduled
2019-02-01 08:32hgbotCheckin
2019-02-01 08:32hgbotNote Added: 0109376
2019-02-01 08:36hgbotCheckin
2019-02-01 08:36hgbotNote Added: 0109378
2019-02-01 08:36hgbotStatusscheduled => resolved
2019-02-01 08:36hgbotResolutionopen => fixed
2019-02-01 08:36hgbotFixed in SCM revision => [^]
2019-02-01 08:36caristuReview Assigned To => alostale
2019-02-01 08:44caristuNote Added: 0109381
2019-02-01 10:14alostaleNote Added: 0109417
2019-02-01 10:14alostaleStatusresolved => closed
2019-02-01 10:14alostaleFixed in Version => 3.0PR19Q2
2019-02-05 18:16caristuRelationship addedcauses 0040152
2019-02-12 19:14caristuRelationship addedcauses 0040187
2019-02-20 17:03caristuRelationship addedrelated to 0040246
2019-02-20 18:33caristuNote Edited: 0109381bug_revision_view_page.php?bugnote_id=0109381#r18353
2019-03-28 14:55hudsonbotCheckin
2019-03-28 14:55hudsonbotNote Added: 0110763

2019-02-01 08:32   
Repository: erp/devel/dbsm-main
Changeset: 3dc03f579c070c8b4fb62a9ca059bf632f02f513
Author: Carlos Aristu <carlos.aristu <at>>
Date: Fri Feb 01 08:25:34 2019 +0100
URL: [^]

related to bug 40047: dbsm changes required to support forked export tasks

M src/org/openbravo/ddlutils/task/
M src/org/openbravo/ddlutils/task/
M src/org/openbravo/ddlutils/task/
A src/org/openbravo/ddlutils/task/
2019-02-01 08:36   
Repository: erp/devel/pi
Changeset: aaa984886667a027a8c99692447febe6e4ca7707
Author: Carlos Aristu <carlos.aristu <at>>
Date: Thu Jan 31 19:19:21 2019 +0100
URL: [^]

Fixes bug 40047: include wstx-asl-3.0.2.jar in the classpath on database export

  - Execute ant export.database and as forked tasks in order to define the classpath of those tasks with the required libraries. This way, it will be no longer needed to manually copying wstx-asl-3.0.2.jar inside Ant folder to get the xml headers of the database model files with single quotes.

  - Besides, the runtime-classpath now includes the Tomcat pool libraries. Therefore these tasks now use it to retrieve the DB connections. Otherwise, the default Hibernate pool would be used, forcing to explicitly close it within the tasks as we do here[1].

  - Updated dbsourcemanager.jar with the changes in DBSourceManager.

[1] [^]

M src-db/database/build.xml
M src-db/database/lib/dbsourcemanager.jar
2019-02-01 08:44   
(edited on: 2019-02-20 18:33)
Wiki sections updated: [^] [^]

2019-02-01 10:14   
reviewed + tested
2019-03-28 14:55   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: [^]
Maturity status: Test