liquibase.exception.ChangeLogParseException: Error parsing line 205 column 100 of sql/Release-Migration/Release-Delta.xml: src-resolve: Cannot resolve the name 'MaterializedViewRefreshType' to a(n) 'type definition' component.

JIRA | Dmitriy Korobskiy | 8 months ago
  1. 0

    The documentation (http://www.liquibase.org/documentation/xml_format.html) says: {quote} Liquibase Extension XSDs If you use a Liquibase extension that includes additional change tags, check the extension documentation to find out if they provide a XSD. If they do not, you can use the xsd at http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd which allows any nested tag and attribute.{quote} Custom XSDs are very handy in order to use auto-complete in XML editors. However, when I actually try to use one for Oracle Extensions (https://raw.githubusercontent.com/liquibase/liquibase-oracle/master/src/main/java/liquibase/ext/ora/xml/dbchangelog-ext.xsd), Liquibase fails: DEBUG 4/14/16 10:49 AM: liquibase: Local path for https://raw.githubusercontent.com/liquibase/liquibase-oracle/master/src/main/java/liquibase/ext/ora/xml/dbchangelog-ext.xsd is null DEBUG 4/14/16 10:49 AM: liquibase: Attempting to load https://raw.githubusercontent.com/liquibase/liquibase-oracle/master/src/main/java/liquibase/ext/ora/xml/dbchangelog-ext.xsd from resourceAccessor as sql/Release-Migration/https:/raw.githubusercontent.com/liquibase/liquibase-oracle/master/src/main/java/liquibase/ext/ora/xml/dbchangelog-ext.xsd DEBUG 4/14/16 10:49 AM: liquibase: Could not load https://raw.githubusercontent.com/liquibase/liquibase-oracle/master/src/main/java/liquibase/ext/ora/xml/dbchangelog-ext.xsd from resourceAccessor as sql/Release-Migration/https:/raw.githubusercontent.com/liquibase/liquibase-oracle/master/src/main/java/liquibase/ext/ora/xml/dbchangelog-ext.xsd DEBUG 4/14/16 10:49 AM: liquibase: Unable to resolve XML entity locally. Will load from network. SEVERE 4/14/16 10:49 AM: liquibase: src-resolve: Cannot resolve the name 'MaterializedViewRefreshType' to a(n) 'type definition' component. DEBUG 4/14/16 10:49 AM: liquibase: Release Database Lock DEBUG 4/14/16 10:49 AM: liquibase: Executing UPDATE database command: UPDATE LINK_OD_IREPORT.DATABASECHANGELOGLOCK SET LOCKED = 0, LOCKEDBY = NULL, LOCKGRANTED = NULL WHERE ID = 1 INFO 4/14/16 10:49 AM: liquibase: Successfully released change log lock Unexpected error running Liquibase: src-resolve: Cannot resolve the name 'MaterializedViewRefreshType' to a(n) 'type definition' component. SEVERE 4/14/16 10:49 AM: liquibase: src-resolve: Cannot resolve the name 'MaterializedViewRefreshType' to a(n) 'type definition' component. liquibase.exception.ChangeLogParseException: Error parsing line 205 column 100 of sql/Release-Migration/Release-Delta.xml: src-resolve: Cannot resolve the name 'MaterializedViewRefreshType' to a(n) 'type definition' component. at liquibase.parser.core.xml.XMLChangeLogSAXParser.parseToNode(XMLChangeLogSAXParser.java:114) at liquibase.parser.core.xml.AbstractChangeLogParser.parse(AbstractChangeLogParser.java:17) at liquibase.Liquibase.getDatabaseChangeLog(Liquibase.java:227)}} I'm attaching the extracted test case.

    JIRA | 8 months ago | Dmitriy Korobskiy
    liquibase.exception.ChangeLogParseException: Error parsing line 205 column 100 of sql/Release-Migration/Release-Delta.xml: src-resolve: Cannot resolve the name 'MaterializedViewRefreshType' to a(n) 'type definition' component.
  2. 0

    The documentation (http://www.liquibase.org/documentation/xml_format.html) says: {quote} Liquibase Extension XSDs If you use a Liquibase extension that includes additional change tags, check the extension documentation to find out if they provide a XSD. If they do not, you can use the xsd at http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd which allows any nested tag and attribute.{quote} Custom XSDs are very handy in order to use auto-complete in XML editors. However, when I actually try to use one for Oracle Extensions (https://raw.githubusercontent.com/liquibase/liquibase-oracle/master/src/main/java/liquibase/ext/ora/xml/dbchangelog-ext.xsd), Liquibase fails: DEBUG 4/14/16 10:49 AM: liquibase: Local path for https://raw.githubusercontent.com/liquibase/liquibase-oracle/master/src/main/java/liquibase/ext/ora/xml/dbchangelog-ext.xsd is null DEBUG 4/14/16 10:49 AM: liquibase: Attempting to load https://raw.githubusercontent.com/liquibase/liquibase-oracle/master/src/main/java/liquibase/ext/ora/xml/dbchangelog-ext.xsd from resourceAccessor as sql/Release-Migration/https:/raw.githubusercontent.com/liquibase/liquibase-oracle/master/src/main/java/liquibase/ext/ora/xml/dbchangelog-ext.xsd DEBUG 4/14/16 10:49 AM: liquibase: Could not load https://raw.githubusercontent.com/liquibase/liquibase-oracle/master/src/main/java/liquibase/ext/ora/xml/dbchangelog-ext.xsd from resourceAccessor as sql/Release-Migration/https:/raw.githubusercontent.com/liquibase/liquibase-oracle/master/src/main/java/liquibase/ext/ora/xml/dbchangelog-ext.xsd DEBUG 4/14/16 10:49 AM: liquibase: Unable to resolve XML entity locally. Will load from network. SEVERE 4/14/16 10:49 AM: liquibase: src-resolve: Cannot resolve the name 'MaterializedViewRefreshType' to a(n) 'type definition' component. DEBUG 4/14/16 10:49 AM: liquibase: Release Database Lock DEBUG 4/14/16 10:49 AM: liquibase: Executing UPDATE database command: UPDATE LINK_OD_IREPORT.DATABASECHANGELOGLOCK SET LOCKED = 0, LOCKEDBY = NULL, LOCKGRANTED = NULL WHERE ID = 1 INFO 4/14/16 10:49 AM: liquibase: Successfully released change log lock Unexpected error running Liquibase: src-resolve: Cannot resolve the name 'MaterializedViewRefreshType' to a(n) 'type definition' component. SEVERE 4/14/16 10:49 AM: liquibase: src-resolve: Cannot resolve the name 'MaterializedViewRefreshType' to a(n) 'type definition' component. liquibase.exception.ChangeLogParseException: Error parsing line 205 column 100 of sql/Release-Migration/Release-Delta.xml: src-resolve: Cannot resolve the name 'MaterializedViewRefreshType' to a(n) 'type definition' component. at liquibase.parser.core.xml.XMLChangeLogSAXParser.parseToNode(XMLChangeLogSAXParser.java:114) at liquibase.parser.core.xml.AbstractChangeLogParser.parse(AbstractChangeLogParser.java:17) at liquibase.Liquibase.getDatabaseChangeLog(Liquibase.java:227)}} I'm attaching the extracted test case.

    JIRA | 8 months ago | Dmitriy Korobskiy
    liquibase.exception.ChangeLogParseException: Error parsing line 205 column 100 of sql/Release-Migration/Release-Delta.xml: src-resolve: Cannot resolve the name 'MaterializedViewRefreshType' to a(n) 'type definition' component.
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    I'm currently trying to migrate from LB 2.0.5 to 3.0.3 (I'll try ASAP with lastest release) On 2.0.5, it works fine. h3. Changelogs {code:xml|title=DATA_QUALITY-release.xml} <?xml version="1.0" encoding="UTF-8" standalone="no"?> <databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.0.xsd http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd"> <include file="d:/data/tmpReleaseHub/ddl/release/DATA_QUALITY/release.xml" relativeToChangelogFile="false" /> <include file="d:/data/tmpReleaseHub/sql/DATA_QUALITY/master.xml" relativeToChangelogFile="false" /> <include file="d:/data/tmpReleaseHub/ddl/post-release/DATA_QUALITY/release.xml" relativeToChangelogFile="false" /> </databaseChangeLog> {code} {code:xml|title=d:/data/tmpReleaseHub/ddl/release/DATA_QUALITY/release.xml} <?xml version="1.0" encoding="UTF-8" standalone="no"?> <databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.0.xsd http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd"> <include file="dummy.sql" relativeToChangelogFile="true"/> </databaseChangeLog> {code} {code:title=dummy.sql} --liquibase formatted sql --changeset dummy:1 runOnChange:false failOnError:true splitStatements:false stripComments:false select 1 from dual; {code} h3. Error when calling ant task updateDatabase {code:xml} <updateDatabase outputFile="deploy-script.sql" changeLogFile="DATA_QUALITY-release.xml" driver="${db.driver}" url="${db.url}" username="${db.user}" password="${db.password}" dropFirst="false" classpathref="liquibase.classpath" defaultSchemaName="DATA_QUALITY" /> {code} {code:title=error log} BUILD FAILED D:\data\workspaces\hub\hub-deployer\build.xml:108: The following error occurred while executing this line: D:\data\workspaces\hub\hub-deployer\build.xml:117: liquibase.exception.ChangeLogParseException: Invalid Migration File: Unknown Reason at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:551) at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:401) at net.sf.antcontrib.logic.ForDelegate.doSequentialIteration(ForDelegate.java:228) at net.sf.antcontrib.logic.ForDelegate.doTheTasks(ForDelegate.java:253) at net.sf.antcontrib.logic.ForDelegate.execute(ForDelegate.java:213) at net.sf.antcontrib.logic.For.execute(For.java:166) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:390) at org.apache.tools.ant.Target.performTasks(Target.java:411) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) at org.apache.tools.ant.Project.executeTarget(Project.java:1368) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.eclipse.ant.internal.launching.remote.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32) at org.apache.tools.ant.Project.executeTargets(Project.java:1251) at org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(InternalAntRunner.java:424) at org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(InternalAntRunner.java:138) Caused by: D:\data\workspaces\hub\hub-deployer\build.xml:117: liquibase.exception.ChangeLogParseException: Invalid Migration File: Unknown Reason at liquibase.integration.ant.DatabaseUpdateTask.executeWithLiquibaseClassloader(DatabaseUpdateTask.java:56) at liquibase.integration.ant.BaseLiquibaseTask.execute(BaseLiquibaseTask.java:70) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:398) ... 19 more Caused by: liquibase.exception.ChangeLogParseException: Invalid Migration File: Unknown Reason at liquibase.parser.core.xml.XMLChangeLogSAXParser.parse(XMLChangeLogSAXParser.java:133) at liquibase.parser.core.xml.XMLChangeLogSAXHandler.handleIncludedChangeLog(XMLChangeLogSAXHandler.java:532) at liquibase.parser.core.xml.XMLChangeLogSAXHandler.startElement(XMLChangeLogSAXHandler.java:142) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.emptyElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at liquibase.parser.core.xml.XMLChangeLogSAXParser.parse(XMLChangeLogSAXParser.java:99) at liquibase.Liquibase.update(Liquibase.java:128) at liquibase.Liquibase.update(Liquibase.java:168) at liquibase.integration.ant.DatabaseUpdateTask.executeWithLiquibaseClassloader(DatabaseUpdateTask.java:50) ... 34 more Caused by: org.xml.sax.SAXException java.lang.NullPointerException at liquibase.parser.core.xml.XMLChangeLogSAXHandler.startElement(XMLChangeLogSAXHandler.java:495) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.emptyElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at liquibase.parser.core.xml.XMLChangeLogSAXParser.parse(XMLChangeLogSAXParser.java:99) ... 53 more Caused by: java.lang.NullPointerException at java.io.Reader.<init>(Unknown Source) at java.io.InputStreamReader.<init>(Unknown Source) at liquibase.parser.core.formattedsql.FormattedSqlChangeLogParser.supports(FormattedSqlChangeLogParser.java:26) at liquibase.parser.ChangeLogParserFactory.getParser(ChangeLogParserFactory.java:57) at liquibase.parser.core.xml.XMLChangeLogSAXHandler.handleIncludedChangeLog(XMLChangeLogSAXHandler.java:517) at liquibase.parser.core.xml.XMLChangeLogSAXHandler.startElement(XMLChangeLogSAXHandler.java:142) ... 67 more {code}

    JIRA | 3 years ago | Thomas Senay
    liquibase.exception.ChangeLogParseException: Invalid Migration File: Unknown Reason

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. liquibase.exception.ChangeLogParseException

      Error parsing line 205 column 100 of sql/Release-Migration/Release-Delta.xml: src-resolve: Cannot resolve the name 'MaterializedViewRefreshType' to a(n) 'type definition' component.

      at liquibase.parser.core.xml.XMLChangeLogSAXParser.parseToNode()
    2. Liquibase Core
      Liquibase.getDatabaseChangeLog
      1. liquibase.parser.core.xml.XMLChangeLogSAXParser.parseToNode(XMLChangeLogSAXParser.java:114)
      2. liquibase.parser.core.xml.AbstractChangeLogParser.parse(AbstractChangeLogParser.java:17)
      3. liquibase.Liquibase.getDatabaseChangeLog(Liquibase.java:227)
      3 frames