Parse Issue with constraints

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


  1. <?xml version="1.0" encoding="utf-8"?>
  2.  
  3.    
  4.      
  5.        
  6.      
  7.    
  8.  


The Command I use to call Liquibase is


  1. ikvm -jar %jar% --logLevel=SEVERE --classpath=%classpath% --driver=%driver% --url=%url% --changeLogFile=ChangeLog.xml update

Following are the values for the arguments


  1. set jar=..\..\..\liquibase\liquibase-2.0.2-bin\liquibase.jar
  2. set classpath=..\..\..\MSSQLSERVERJDBC\sqljdbc4.jar
  3. set driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
  4. set url=jdbc:sqlserver://localhost;databasename=database;user=dbuser;password=**************;


The Exception I receive is


  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5.         at liquibase.parser.core.xml.XMLChangeLogSAXParser.parse(XMLChangeLogSAXParser.java:106)
  6.         at liquibase.Liquibase.update(Liquibase.java:106)
  7.         at liquibase.integration.commandline.Main.doMigration(Main.java:835)
  8.         at liquibase.integration.commandline.Main.main(Main.java:132)
  9. Caused by: org.xml.sax.SAXParseException; lineNumber: 9; columnNumber: 38; cvc-complex-type.2.4.a: Invalid content was found starting with element 'constraints'
  10. . One of '{"http://www.liquibase.org/xml/ns/dbchangelog":column}' is expected.
  11.         at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198)
  12.         at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:134)
  13.         at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:388)
  14.         at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:321)
  15.         at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:422)
  16.         at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3186)
  17.         at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1813)
  18.         at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.emptyElement(XMLSchemaValidator.java:729)
  19.         at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:353)
  20.         at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2732)
  21.         at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:625)
  22.         at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116)
  23.         at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:488)
  24.         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:819)
  25.         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:748)
  26.         at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
  27.         at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1208)
  28.         at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:525)
  29.         at liquibase.parser.core.xml.XMLChangeLogSAXParser.parse(XMLChangeLogSAXParser.java:97)


Thank you very much for your help on this issue!


Best regards


Nasser