Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0040047 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] Y. DBSourceManager | minor | have not tried | 2019-01-28 17:01 | 2019-03-28 14:55 | |||
Reporter | caristu | View Status | public | |||||
Assigned To | caristu | |||||||
Priority | high | Resolution | fixed | Fixed in Version | 3.0PR19Q2 | |||
Status | closed | Fix in branch | Fixed in SCM revision | aaa984886667 | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | alostale | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0040047: Fix database export to avoid manually copying wstx-asl-3.0.2.jar inside Ant folder | |||||||
Description | 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 com.sun.xml.internal.stream.XMLOutputFactoryImpl[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] https://github.com/keerath/openjdk-8-source/blob/master/jaxp/src/com/sun/xml/internal/stream/writers/XMLStreamWriterImpl.java#L1199 [^] [2] https://github.com/FasterXML/woodstox/blob/master/src/main/java/com/ctc/wstx/stax/WstxOutputFactory.java [^] | |||||||
Steps To Reproduce | 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 | |||||||
Proposed Solution | 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 export.sample.data 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] https://code.openbravo.com/erp/devel/dbsm-main/file/tip/src/org/openbravo/ddlutils/task/ExportConfigScript.java#l240 [^] [2] https://code.openbravo.com/erp/devel/dbsm-main/file/tip/src/org/apache/ddlutils/io/DatabaseIO.java#l527 [^] [3] http://wiki.openbravo.com/wiki/Common_Issues_Tips_and_Tricks#After_export.database_all_the_xml_headers_use_double_quotes [^] | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |||||||||||||||||||||||||||||
|
Notes | |
(0109376) hgbot (developer) 2019-02-01 08:32 |
Repository: erp/devel/dbsm-main Changeset: 3dc03f579c070c8b4fb62a9ca059bf632f02f513 Author: Carlos Aristu <carlos.aristu <at> openbravo.com> Date: Fri Feb 01 08:25:34 2019 +0100 URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/3dc03f579c070c8b4fb62a9ca059bf632f02f513 [^] related to bug 40047: dbsm changes required to support forked export tasks --- M src/org/openbravo/ddlutils/task/AlterDatabaseJava.java M src/org/openbravo/ddlutils/task/ExportDatabase.java M src/org/openbravo/ddlutils/task/ExportSampledata.java A src/org/openbravo/ddlutils/task/JavaTaskUtils.java --- |
(0109378) hgbot (developer) 2019-02-01 08:36 |
Repository: erp/devel/pi Changeset: aaa984886667a027a8c99692447febe6e4ca7707 Author: Carlos Aristu <carlos.aristu <at> openbravo.com> Date: Thu Jan 31 19:19:21 2019 +0100 URL: http://code.openbravo.com/erp/devel/pi/rev/aaa984886667a027a8c99692447febe6e4ca7707 [^] Fixes bug 40047: include wstx-asl-3.0.2.jar in the classpath on database export - Execute ant export.database and export.sample.data 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] https://code.openbravo.com/erp/devel/pi/rev/3ed849d672ae34b8bcec1d16aaea800ea68e5c61 [^] --- M src-db/database/build.xml M src-db/database/lib/dbsourcemanager.jar --- |
(0109381) caristu (developer) 2019-02-01 08:44 edited on: 2019-02-20 18:33 |
Wiki sections updated: http://wiki.openbravo.com/wiki/Common_Issues_Tips_and_Tricks#After_export.database_all_the_xml_headers_use_double_quotes [^] http://wiki.openbravo.com/wiki/Installation/Custom/Openbravo_Setup [^] |
(0109417) alostale (manager) 2019-02-01 10:14 |
reviewed + tested |
(0110763) hudsonbot (developer) 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: https://code.openbravo.com/erp/devel/main/rev/b2fbc1588df4 [^] Maturity status: Test |
Issue History | |||
Date Modified | Username | Field | Change |
2019-01-28 17:01 | caristu | New Issue | |
2019-01-28 17:01 | caristu | Assigned To | => caristu |
2019-01-28 17:01 | caristu | Modules | => Core |
2019-01-28 17:01 | caristu | Triggers an Emergency Pack | => No |
2019-01-28 17:02 | caristu | Relationship added | related to 0039056 |
2019-01-28 19:12 | caristu | Description Updated | View Revisions |
2019-01-28 19:12 | caristu | Steps to Reproduce Updated | View Revisions |
2019-01-29 08:49 | caristu | Description Updated | View Revisions |
2019-01-29 09:00 | caristu | Description Updated | View Revisions |
2019-01-29 13:53 | caristu | Proposed Solution updated | |
2019-01-29 16:38 | caristu | Status | new => scheduled |
2019-02-01 08:32 | hgbot | Checkin | |
2019-02-01 08:32 | hgbot | Note Added: 0109376 | |
2019-02-01 08:36 | hgbot | Checkin | |
2019-02-01 08:36 | hgbot | Note Added: 0109378 | |
2019-02-01 08:36 | hgbot | Status | scheduled => resolved |
2019-02-01 08:36 | hgbot | Resolution | open => fixed |
2019-02-01 08:36 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/aaa984886667a027a8c99692447febe6e4ca7707 [^] |
2019-02-01 08:36 | caristu | Review Assigned To | => alostale |
2019-02-01 08:44 | caristu | Note Added: 0109381 | |
2019-02-01 10:14 | alostale | Note Added: 0109417 | |
2019-02-01 10:14 | alostale | Status | resolved => closed |
2019-02-01 10:14 | alostale | Fixed in Version | => 3.0PR19Q2 |
2019-02-05 18:16 | caristu | Relationship added | causes 0040152 |
2019-02-12 19:14 | caristu | Relationship added | causes 0040187 |
2019-02-20 17:03 | caristu | Relationship added | related to 0040246 |
2019-02-20 18:33 | caristu | Note Edited: 0109381 | View Revisions |
2019-03-28 14:55 | hudsonbot | Checkin | |
2019-03-28 14:55 | hudsonbot | Note Added: 0110763 |
Copyright © 2000 - 2009 MantisBT Group |