# cvc-complex-type.2.3: Element 'createTable' cannot have character \[children\]

**URL:** <https://forum.liquibase.org/t/cvc-complex-type-2-3-element-createtable-cannot-have-character-children/3464>\
**Category:** General Discussion\
**Created:** [January 25, 2017, 8:56am UTC](https://forum.liquibase.org/t/cvc-complex-type-2-3-element-createtable-cannot-have-character-children/3464 "2017-01-25T08:56:00Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![un1382561729492r88id](https://avatars.discourse-cdn.com/v4/letter/u/c4cdca/32.png) [@un1382561729492r88id](https://forum.liquibase.org/u/un1382561729492r88id)\
**Post date:** [January 25, 2017, 8:56am UTC](https://forum.liquibase.org/t/cvc-complex-type-2-3-element-createtable-cannot-have-character-children/3464/1 "2017-01-25T08:56:00Z")

</div>

I took a look and didn’t see any obvious errors. I have seen this sort of error when the file is not saved with UTF-8 encoding, but the file I extracted did seem to have UTF-8 encoding. You might be able to get more information by running your command and adding “–logLevel=DEBUG” to get a better idea where in the changelog it is having problems.&nbsp;

Basically, the error message is saying that liquibase can’t even parse the XML from the changelog. The XML parsing is done with a well-known XML parsing library, so the most likely cause is malformed or mal-encoded XML.

Steve Donie  
Principal Software Engineer  
Datical, Inc. [http://www.datical.com/](http://www.datical.com/)

---

<div class="post-metadata">

**Author:** ![Ramki](https://avatars.discourse-cdn.com/v4/letter/r/e495f1/32.png) [@Ramki](https://forum.liquibase.org/u/Ramki)\
**Post date:** [January 25, 2017, 8:56am UTC](https://forum.liquibase.org/t/cvc-complex-type-2-3-element-createtable-cannot-have-character-children/3464/2 "2017-01-25T08:56:00Z")

</div>

Hi, I am trying to get started with liquibase and generated a change log from an existing database and tried to apply this changelog into an empty schema. but it fails with this error.

Not sure where to start, didn’t find any solution for this issue…

appreciate any help.

./liquibase --driver=com.mysql.jdbc.Driver --classpath=/deploy/back/deploy/current/lib/mysql-connector-java-5.1.13.jar --changeLogFile=/home/local/CAREZEN/rreddy/liquibase/careuat14.changelog.xml --url=“jdbc:mysql://10.192.100.21/test” --username=test --password=test update

Unexpected error running Liquibase: cvc-complex-type.2.3: Element ‘createTable’ cannot have character [children], because the type’s content type is element-only.

Thanks,

Ramki

---

<div class="post-metadata">

**Author:** ![un1382561729492r88id](https://avatars.discourse-cdn.com/v4/letter/u/c4cdca/32.png) [@un1382561729492r88id](https://forum.liquibase.org/u/un1382561729492r88id)\
**Post date:** [January 25, 2017, 8:56am UTC](https://forum.liquibase.org/t/cvc-complex-type-2-3-element-createtable-cannot-have-character-children/3464/3 "2017-01-25T08:56:00Z")

</div>

Can you attach the changelog ()&nbsp;you are working with?

Steve Donie  
Principal Software Engineer  
Datical, Inc. [http://www.datical.com/](http://www.datical.com/)

---

<div class="post-metadata">

**Author:** ![un1485305326767r4id](https://avatars.discourse-cdn.com/v4/letter/u/4af34b/32.png) [@un1485305326767r4id](https://forum.liquibase.org/u/un1485305326767r4id)\
**Post date:** [January 25, 2017, 8:56am UTC](https://forum.liquibase.org/t/cvc-complex-type-2-3-element-createtable-cannot-have-character-children/3464/4 "2017-01-25T08:56:00Z")

</div>

Hi Steve, Attaching the changelog here…

---

<div class="post-metadata">

**Author:** ![un1485305326767r4id](https://avatars.discourse-cdn.com/v4/letter/u/4af34b/32.png) [@un1485305326767r4id](https://forum.liquibase.org/u/un1485305326767r4id)\
**Post date:** [January 25, 2017, 8:56am UTC](https://forum.liquibase.org/t/cvc-complex-type-2-3-element-createtable-cannot-have-character-children/3464/5 "2017-01-25T08:56:00Z")

</div>

Thanks Steve, I see more information when running with DEBUG option…

Unexpected error running Liquibase: cvc-complex-type.2.3: Element ‘createTable’ cannot have character [children], because the type’s content type is element-only.

SEVERE 1/25/17 8:31 PM: liquibase: cvc-complex-type.2.3: Element ‘createTable’ cannot have character [children], because the type’s content type is element-only.

liquibase.exception.ChangeLogParseException: Error parsing line 2300 column 23 of /home/local/CAREZEN/rreddy/liquibase/careuat14.changelog.xml: cvc-complex-type.2.3: Element ‘createTable’ cannot have character [children], because the type’s content type is element-only.

&nbsp; &nbsp; &nbsp; &nbsp; at liquibase.parser.core.xml.XMLChangeLogSAXParser.parseToNode(XMLChangeLogSAXParser.java:114)

&nbsp; &nbsp; &nbsp; &nbsp; at liquibase.parser.core.xml.AbstractChangeLogParser.parse(AbstractChangeLogParser.java:17)

&nbsp; &nbsp; &nbsp; &nbsp; at liquibase.Liquibase.getDatabaseChangeLog(Liquibase.java:229)

&nbsp; &nbsp; &nbsp; &nbsp; at liquibase.Liquibase.update(Liquibase.java:202)

&nbsp; &nbsp; &nbsp; &nbsp; at liquibase.Liquibase.update(Liquibase.java:192)

&nbsp; &nbsp; &nbsp; &nbsp; at liquibase.integration.commandline.Main.doMigration(Main.java:1130)

&nbsp; &nbsp; &nbsp; &nbsp; at liquibase.integration.commandline.Main.run(Main.java:188)

&nbsp; &nbsp; &nbsp; &nbsp; at liquibase.integration.commandline.Main.main(Main.java:103)

Caused by: org.xml.sax.SAXParseException; lineNumber: 2300; columnNumber: 23; cvc-complex-type.2.3: Element ‘createTable’ cannot have character [children], because the type’s content type is element-only.

&nbsp; &nbsp; &nbsp; &nbsp; at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198)

&nbsp; &nbsp; &nbsp; &nbsp; at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:134)

&nbsp; &nbsp; &nbsp; &nbsp; at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:437)

&nbsp; &nbsp; &nbsp; &nbsp; at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:368)

&nbsp; &nbsp; &nbsp; &nbsp; at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:325)

&nbsp; &nbsp; &nbsp; &nbsp; at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:458)

&nbsp; &nbsp; &nbsp; &nbsp; at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3237)

&nbsp; &nbsp; &nbsp; &nbsp; at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.elementLocallyValidComplexType(XMLSchemaValidator.java:3200)

&nbsp; &nbsp; &nbsp; &nbsp; at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.elementLocallyValidType(XMLSchemaValidator.java:3160)

&nbsp; &nbsp; &nbsp; &nbsp; at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.processElementContent(XMLSchemaValidator.java:3062)

&nbsp; &nbsp; &nbsp; &nbsp; at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleEndElement(XMLSchemaValidator.java:2140)

&nbsp; &nbsp; &nbsp; &nbsp; at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.endElement(XMLSchemaValidator.java:859)

&nbsp; &nbsp; &nbsp; &nbsp; at com.sun.org.apache.xerces.internal.impl.XML11NSDocumentScannerImpl.scanEndElement(XML11NSDocumentScannerImpl.java:814)

&nbsp; &nbsp; &nbsp; &nbsp; at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2957)

&nbsp; &nbsp; &nbsp; &nbsp; at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)

&nbsp; &nbsp; &nbsp; &nbsp; at com.sun.org.apache.xerces.internal.impl.XML11NSDocumentScannerImpl.next(XML11NSDocumentScannerImpl.java:857)

&nbsp; &nbsp; &nbsp; &nbsp; at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)

&nbsp; &nbsp; &nbsp; &nbsp; at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)

&nbsp; &nbsp; &nbsp; &nbsp; at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)

&nbsp; &nbsp; &nbsp; &nbsp; at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)

&nbsp; &nbsp; &nbsp; &nbsp; at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)

&nbsp; &nbsp; &nbsp; &nbsp; at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:648)

&nbsp; &nbsp; &nbsp; &nbsp; at liquibase.parser.core.xml.XMLChangeLogSAXParser.parseToNode(XMLChangeLogSAXParser.java:106)

&nbsp; &nbsp; &nbsp; &nbsp; … 7 more

&nbsp;possible values:

so it didn’t like the new line characters in the comments…after removing those…it’s complaining of something else…

SEVERE 1/25/17 8:45 PM: liquibase: cvc-complex-type.2.3: Element ‘createTable’ cannot have character [children], because the type’s content type is element-only.

liquibase.exception.ChangeLogParseException: Error parsing line 1440 column 23 of /home/local/CAREZEN/rreddy/liquibase/careuat14.changelog.xml: cvc-complex-type.2.3: Element ‘createTable’ cannot have character [children], because the type’s content type is element-only.

&nbsp; &nbsp; &nbsp; &nbsp; at liquibase.parser.core.xml.XMLChangeLogSAXParser.parseToNode(XMLChangeLogSAXParser.java:114)

&nbsp; &nbsp; &nbsp; &nbsp; at liquibase.parser.core.xml.AbstractChangeLogParser.parse(AbstractChangeLogParser.java:17)

&nbsp; &nbsp; &nbsp; &nbsp; at liquibase.Liquibase.getDatabaseChangeLog(Liquibase.java:229)

&nbsp; &nbsp; &nbsp; &nbsp; at liquibase.Liquibase.update(Liquibase.java:202)

&nbsp; &nbsp; &nbsp; &nbsp; at liquibase.Liquibase.update(Liquibase.java:192)

&nbsp; &nbsp; &nbsp; &nbsp; at liquibase.integration.commandline.Main.doMigration(Main.java:1130)

&nbsp; &nbsp; &nbsp; &nbsp; at liquibase.integration.commandline.Main.run(Main.java:188)

&nbsp; &nbsp; &nbsp; &nbsp; at liquibase.integration.commandline.Main.main(Main.java:103)

Caused by: org.xml.sax.SAXParseException; lineNumber: 1440; columnNumber: 23; cvc-complex-type.2.3: Element ‘createTable’ cannot have character [children], because the type’s content type is element-only.

will keep looking…

but yeah DEBUG is somewhat helpful.

Thanks

Ramki

---

<div class="post-metadata">

**Author:** ![un1485305326767r4id](https://avatars.discourse-cdn.com/v4/letter/u/4af34b/32.png) [@un1485305326767r4id](https://forum.liquibase.org/u/un1485305326767r4id)\
**Post date:** [January 25, 2017, 8:56am UTC](https://forum.liquibase.org/t/cvc-complex-type-2-3-element-createtable-cannot-have-character-children/3464/6 "2017-01-25T08:56:00Z")

</div>

Steve, I am stuck trying to figure out what could be wrong with this line, actually that line doesn’t correspond to the exact line number within the file…

-Ramki

---

<div class="post-metadata">

**Author:** ![un1485305326767r4id](https://avatars.discourse-cdn.com/v4/letter/u/4af34b/32.png) [@un1485305326767r4id](https://forum.liquibase.org/u/un1485305326767r4id)\
**Post date:** [January 25, 2017, 8:56am UTC](https://forum.liquibase.org/t/cvc-complex-type-2-3-element-createtable-cannot-have-character-children/3464/7 "2017-01-25T08:56:00Z")

</div>

That worked Mark, changing the version from “1.1” To “1.0” helped to parse the XML without any errors.

I don’t know why it’s trying to convert default value of “CURRENT\_TIMESTAMP” &nbsp;for a TIMESTAMP column to a NOW() and failing…

the original definition for this table has TLM column defined as following:

`TLM` timestamp NOT NULL DEFAULT CURRENT\_TIMESTAMP ON UPDATE CURRENT\_TIMESTAMP,

liquibase is trying to transform it as follows and fails:

&nbsp;`TLM` timestamp NOT NULL DEFAULT CURRENT\_TIMESTAMP

— error–

SEVERE 1/30/17 12:36 PM: liquibase: /home/local/CAREZEN/rreddy/liquibase/db.changelog.xml::1484939656104-1::root (generated): Invalid default value for ‘TLM’ [Failed SQL: CREATE TABLE test.ACCOUNT\_PHONE\_NUMBER (ID INT UNSIGNED AUTO\_INCREMENT NOT NULL, PHONE\_NUMBER VARCHAR(12) NOT NULL COMMENT ‘The phone number allocated to the account’, COMMUNICATION\_ACCOUNT\_ID INT UNSIGNED NOT NULL COMMENT ‘The communication account to which this phone number belongs to’, SMS\_CAPABLE BIT(1) DEFAULT 0 NOT NULL COMMENT ‘This flag tells whether twilio number supports sms or not’, MMS\_CAPABLE BIT(1) DEFAULT 0 NOT NULL COMMENT ‘This flag tells whether twilio number supports mms or not’, VOICE\_CAPABLE BIT(1) DEFAULT 0 NOT NULL COMMENT ‘This flag tells whether twilio number supports voice or not’, STATUS ENUM(‘ACTIVE’, ‘INACTIVE’) DEFAULT ‘ACTIVE’ NOT NULL COMMENT ‘The status of the communication request’, STATUS\_TLM datetime(6) NOT NULL COMMENT ‘The time the status got updated’, WHEN\_CREATED datetime(6) NOT NULL COMMENT ‘The time this account is created’, TLM TIMESTAMP(19) DEFAULT NOW() NOT NULL, CONSTRAINT PK\_ACCOUNT\_PHONE\_NUMBER PRIMARY KEY (ID))]

liquibase.exception.MigrationFailedException: Migration failed for change set /home/local/CAREZEN/rreddy/liquibase/db.changelog.xml::1484939656104-1::root (generated):

&nbsp; &nbsp; &nbsp;Reason: liquibase.exception.DatabaseException: Invalid default value for ‘TLM’ [Failed SQL: CREATE TABLE test.ACCOUNT\_PHONE\_NUMBER (ID INT UNSIGNED AUTO\_INCREMENT NOT NULL, PHONE\_NUMBER VARCHAR(12) NOT NULL COMMENT ‘The phone number allocated to the account’, COMMUNICATION\_ACCOUNT\_ID INT UNSIGNED NOT NULL COMMENT ‘The communication account to which this phone number belongs to’, SMS\_CAPABLE BIT(1) DEFAULT 0 NOT NULL COMMENT ‘This flag tells whether twilio number supports sms or not’, MMS\_CAPABLE BIT(1) DEFAULT 0 NOT NULL COMMENT ‘This flag tells whether twilio number supports mms or not’, VOICE\_CAPABLE BIT(1) DEFAULT 0 NOT NULL COMMENT ‘This flag tells whether twilio number supports voice or not’, STATUS ENUM(‘ACTIVE’, ‘INACTIVE’) DEFAULT ‘ACTIVE’ NOT NULL COMMENT ‘The status of the communication request’, STATUS\_TLM datetime(6) NOT NULL COMMENT ‘The time the status got updated’, WHEN\_CREATED datetime(6) NOT NULL COMMENT ‘The time this account is created’, TLM TIMESTAMP(19) DEFAULT NOW() NOT NULL, CONSTRAINT PK\_ACCOUNT\_PHONE\_NUMBER PRIMARY KEY (ID))]

&nbsp; &nbsp; &nbsp; &nbsp; at liquibase.changelog.ChangeSet.execute(ChangeSet.java:619)

&nbsp; &nbsp; &nbsp; &nbsp; at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:51)

&nbsp; &nbsp; &nbsp; &nbsp; at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:79)

&nbsp; &nbsp; &nbsp; &nbsp; at liquibase.Liquibase.update(Liquibase.java:214)

&nbsp; &nbsp; &nbsp; &nbsp; at liquibase.Liquibase.update(Liquibase.java:192)

&nbsp; &nbsp; &nbsp; &nbsp; at liquibase.integration.commandline.Main.doMigration(Main.java:1130)

&nbsp; &nbsp; &nbsp; &nbsp; at liquibase.integration.commandline.Main.run(Main.java:188)

&nbsp; &nbsp; &nbsp; &nbsp; at liquibase.integration.commandline.Main.main(Main.java:103)

---

<div class="post-metadata">

**Author:** ![un1485305326767r4id](https://avatars.discourse-cdn.com/v4/letter/u/4af34b/32.png) [@un1485305326767r4id](https://forum.liquibase.org/u/un1485305326767r4id)\
**Post date:** [January 25, 2017, 8:56am UTC](https://forum.liquibase.org/t/cvc-complex-type-2-3-element-createtable-cannot-have-character-children/3464/8 "2017-01-25T08:56:00Z")

</div>

Here is the changeset xml for that table:

&nbsp;

&nbsp; &nbsp; &nbsp; &nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;

&nbsp; &nbsp; &nbsp; &nbsp;

---

<div class="post-metadata">

**Author:** ![un1485530413114r52id](https://avatars.discourse-cdn.com/v4/letter/u/e56c9b/32.png) [@un1485530413114r52id](https://forum.liquibase.org/u/un1485530413114r52id)\
**Post date:** [January 25, 2017, 8:56am UTC](https://forum.liquibase.org/t/cvc-complex-type-2-3-element-createtable-cannot-have-character-children/3464/9 "2017-01-25T08:56:00Z")

</div>

Good morning, I was experiencing this issue also with the dbchangelog-3.5.xsd using generated xml from liquibase.&nbsp; I downloaded the xsd and validated it against the file (visual studio&nbsp; adding ti to the xml schema set) and the error produced was that it was expecting xml version=“1.0”&nbsp; I had xml version=“1.1”.&nbsp; After the change, I no longer receive the error.&nbsp;
