Hi there,
I am calling Liquibase using IKVM (following the instructions from Nelson). My target DB is an MS SQL Server.
The script I use attempts to add a column to a table. Name, type are given as well as a constraint that states that the column should be defined as nullable.
I am getting a parsing exception.
Following is the ChangeLog file I am using
- <?xml version="1.0" encoding="utf-8"?>
The Command I use to call Liquibase is
- ikvm -jar %jar% --logLevel=SEVERE --classpath=%classpath% --driver=%driver% --url=%url% --changeLogFile=ChangeLog.xml update
Following are the values for the arguments
- set jar=..\..\..\liquibase\liquibase-2.0.2-bin\liquibase.jar
- set classpath=..\..\..\MSSQLSERVERJDBC\sqljdbc4.jar
- set driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
- set url=jdbc:sqlserver://localhost;databasename=database;user=dbuser;password=**************;
The Exception I receive is
- SEVERE 10/26/11 4:15 PM:liquibase: cvc-complex-type.2.4.a: Invalid content was found starting with element 'constraints'. One of '{"http://www.liquibase.org/xml/ns/dbchangelog":column}' is expected.
- Liquibase Update Failed: cvc-complex-type.2.4.a: Invalid content was found starting with element 'constraints'. One of '{"http://www.liquibase.org/xml/ns/dbchangelog":column}' is expected.
- SEVERE 10/26/11 4:15 PM:liquibase: cvc-complex-type.2.4.a: Invalid content was found starting with element 'constraints'. One of '{"http://www.liquibase.org/xml/ns/dbchangelog":column}' is expected.
- liquibase.exception.ChangeLogParseException: Error parsing line 9 column 38 of ChangeLog.xml: cvc-complex-type.2.4.a: Invalid content was found starting with element 'constraints'. One of '{"http://www.liquibase.org/xml/ns/dbchangelog":column}' is expected.
- at liquibase.parser.core.xml.XMLChangeLogSAXParser.parse(XMLChangeLogSAXParser.java:106)
- at liquibase.Liquibase.update(Liquibase.java:106)
- at liquibase.integration.commandline.Main.doMigration(Main.java:835)
- at liquibase.integration.commandline.Main.main(Main.java:132)
- Caused by: org.xml.sax.SAXParseException; lineNumber: 9; columnNumber: 38; cvc-complex-type.2.4.a: Invalid content was found starting with element 'constraints'
- . One of '{"http://www.liquibase.org/xml/ns/dbchangelog":column}' is expected.
- at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198)
- at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:134)
- at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:388)
- at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:321)
- at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:422)
- at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3186)
- at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1813)
- at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.emptyElement(XMLSchemaValidator.java:729)
- at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:353)
- at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2732)
- at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:625)
- at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116)
- at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:488)
- at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:819)
- at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:748)
- at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
- at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1208)
- at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:525)
- at liquibase.parser.core.xml.XMLChangeLogSAXParser.parse(XMLChangeLogSAXParser.java:97)
Thank you very much for your help on this issue!
Best regards
Nasser