Hello,
I’m testing liquibase-2.0RC2 and I have this problem whith this xml:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns=“http://www.liquibase.org/xml/ns/dbchangelog/1.9”
xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”
xsi:schemaLocation=“http://www.liquibase.org/xml/ns/dbchangelog/1.9 http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.9.xsd”>
the problem is this:
liquibase.exception.ChangeLogParseException: Error parsing line 6 column 51 of /liquibase/repository/update.xml: cvc-datatype-valid.1.2.1: ‘${CHANGELOGRELATIVE}’ is not a valid value for ‘boolean’.
at liquibase.parser.core.xml.XMLChangeLogSAXParser.parse(XMLChangeLogSAXParser.java:88)
at liquibase.Liquibase.update(Liquibase.java:96)
debugging the application, I’ve seen that the problem originates in method parse(Inputstream is) of the class org.apache.xerces.parsers.SAXParser returned by class org.apache.xerces.jaxp.SAXParserImpl: this method throws the reported SAXParserException:
org.xml.sax.SAXParseException: cvc-datatype-valid.1.2.1: ‘${CHANGELOGRELATIVE}’ is not a valid value for ‘boolean’.
It seems that a validation occurs before liquibase ‘manage’ the ${…} changelog parameter…
Debugging the application I’ve seen this constructor:
public XMLChangeLogSAXParser() {
saxParserFactory = SAXParserFactory.newInstance();
if (System.getProperty(“java.vm.version”).startsWith(“1.4”)) {
saxParserFactory.setValidating(false);
saxParserFactory.setNamespaceAware(false);
} else {
saxParserFactory.setValidating(true);
saxParserFactory.setNamespaceAware(true);
}
}
I’m running the application with java 5: could it be the setValidating(true) and setNamespaceAware(true) invocation part of the problem?
Or there is any way to avoid the validation ?
Or I’m missing something?
regards,
Duccio