Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0016935Openbravo ERPY. DBSourceManagerpublic2011-04-29 09:352011-06-02 12:04
iperdomo 
marvintm 
urgentmajoralways
closedfixed 
202.6.36-gentoo-r5
 
3.0MP03.0RC7 
Core
No
0016935: update.database fails when the sourcedata folder contains any non valid xml file
When working with the code repository you might get some conflicts when merging files and you end up with files like filename.xml.orig or filename.xml.rej

If you have one of this files that contains non valid XML code the update.database shows an error

update.database.java:
     [java] Executing database update process without checking changes in local files.
     [java] 0 INFO - Database connection: jdbc:postgresql://localhost:5432/pi. [^] User: tad
     [java] 3302 INFO - Executing full update.database
     [java] 3347 INFO - Reading tables...
     [java] 14156 INFO - Reading views...
     [java] 14772 INFO - Reading sequences...
     [java] 14776 INFO - Reading triggers...
     [java] 15061 INFO - Reading functions...
     [java] 15493 INFO - Sorting foreign keys, indexes and checks...
     [java] 15806 INFO - Starting function and trigger standardization.
     [java] 76248 INFO - Checking datatypes from the model loaded from the database
     [java] 76253 INFO - Original model loaded from database.
     [java] 88368 INFO - Checking datatypes from the model loaded from XML files
     [java] 89138 INFO - Loading data from XML files
     [java] org.xml.sax.SAXParseException: The markup in the document preceding the root element must be well-formed.
     [java] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
     [java] at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
     [java] at org.apache.commons.digester.Digester.parse(Digester.java:1728)
     [java] at org.openbravo.ddlutils.util.DBSMOBUtil.loadDataStructures(DBSMOBUtil.java:880)
     [java] at org.openbravo.ddlutils.task.AlterDatabaseDataAll.doExecute(AlterDatabaseDataAll.java:129)
     [java] at org.openbravo.ddlutils.task.BaseDatabaseTask.execute(BaseDatabaseTask.java:86)
     [java] at org.openbravo.ddlutils.task.AlterDatabaseJava.main(AlterDatabaseJava.java:38)
     [java] 90185 ERROR - Parse Fatal Error at line 1 column 2: The markup in the document preceding the root element must be well-formed.
     [java] org.xml.sax.SAXParseException: The markup in the document preceding the root element must be well-formed.
     [java] at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
     [java] at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
     [java] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
     [java] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
     [java] at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
     [java] at org.apache.xerces.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(Unknown Source)
     [java] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
     [java] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
     [java] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
     [java] at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
     [java] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
     [java] at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
     [java] at org.apache.commons.digester.Digester.parse(Digester.java:1728)
     [java] at org.openbravo.ddlutils.util.DBSMOBUtil.loadDataStructures(DBSMOBUtil.java:880)
     [java] at org.openbravo.ddlutils.task.AlterDatabaseDataAll.doExecute(AlterDatabaseDataAll.java:129)
     [java] at org.openbravo.ddlutils.task.BaseDatabaseTask.execute(BaseDatabaseTask.java:86)
     [java] at org.openbravo.ddlutils.task.AlterDatabaseJava.main(AlterDatabaseJava.java:38)
     [java] 96868 INFO - Loading and applying configuration scripts
Copy the attached file into your sourcedata folder e.g.
src-db/database/sourcedata/AD_MODULE.xml.orig
DBSM should read only .xml files
No tags attached.
? AD_MODULE.xml.orig (1,701) 2011-04-29 09:35
https://issues.openbravo.com/file_download.php?file_id=3913&type=bug
Issue History
2011-04-29 09:35iperdomoNew Issue
2011-04-29 09:35iperdomoAssigned To => marvintm
2011-04-29 09:35iperdomoFile Added: AD_MODULE.xml.orig
2011-04-29 09:35iperdomoModules => Core
2011-04-29 09:35iperdomoDescription Updatedbug_revision_view_page.php?rev_id=1904#r1904
2011-05-02 10:48alostaleStatusnew => scheduled
2011-05-02 10:48alostalefix_in_branch => pi
2011-05-05 17:43dmitry_mezentsevNote Added: 0036411
2011-05-05 17:43dmitry_mezentsevTarget Version3.0RC7 => 3.0MP0
2011-05-05 17:43dmitry_mezentsevfix_in_branchpi =>
2011-05-05 17:51hgbotCheckin
2011-05-05 17:51hgbotNote Added: 0036421
2011-05-05 17:51hgbotStatusscheduled => resolved
2011-05-05 17:51hgbotResolutionopen => fixed
2011-05-05 17:51hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/672521a0fa19147b6ed22f0961d65680b55606c7 [^]
2011-05-12 13:30hudsonbotCheckin
2011-05-12 13:30hudsonbotNote Added: 0036829
2011-05-12 13:50alostaleStatusresolved => closed
2011-05-12 13:50alostaleFixed in Version => 3.0RC7
2011-06-01 12:33hgbotCheckin
2011-06-01 12:33hgbotNote Added: 0037880
2011-06-01 12:33hgbotStatusclosed => resolved
2011-06-01 12:33hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/672521a0fa19147b6ed22f0961d65680b55606c7 [^] => http://code.openbravo.com/erp/devel/dbsm-main/rev/c78852f20fb17556cc85a9079358c23ce222ccf0 [^]
2011-06-02 12:04iperdomoNote Added: 0037915
2011-06-02 12:04iperdomoStatusresolved => closed

Notes
(0036411)
dmitry_mezentsev   
2011-05-05 17:43   
Does not fit RC7.
(0036421)
hgbot   
2011-05-05 17:51   
Repository: erp/devel/pi
Changeset: 672521a0fa19147b6ed22f0961d65680b55606c7
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu May 05 12:18:18 2011 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/672521a0fa19147b6ed22f0961d65680b55606c7 [^]

Fixed issue 16935. Sourcedata files not ending in .xml will not be loaded

---
M src-db/database/lib/dbsourcemanager.jar
---
(0036829)
hudsonbot   
2011-05-12 13:30   
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/c40e579fcd38 [^]

Maturity status: Test
(0037880)
hgbot   
2011-06-01 12:33   
Repository: erp/devel/dbsm-main
Changeset: c78852f20fb17556cc85a9079358c23ce222ccf0
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Thu May 05 12:17:44 2011 +0200
URL: http://code.openbravo.com/erp/devel/dbsm-main/rev/c78852f20fb17556cc85a9079358c23ce222ccf0 [^]

Fixed issue 16935. Sourcedata files not ending in .xml will not be loaded

---
M src/org/openbravo/ddlutils/task/AlterDatabaseDataMod.java
M src/org/openbravo/ddlutils/util/DBSMOBUtil.java
---
(0037915)
iperdomo   
2011-06-02 12:04   
Tested in pi @ rev edb6c469aba9