question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Samples of changelog.xml in documenation have wrong path to xsd files

See original GitHub issue

Environment

Liquibase Version: 4.9.1

Liquibase Integration & Version: spring boot

Liquibase Extension(s) & Version: none

Database Vendor & Version: Oracle 19

Operating System Type & Version: Linux Mint 20.3

Description

I believe these snippets of changelog.xml in documentation are wrong: https://docs.liquibase.com/concepts/changelogs/working-with-changelogs.html https://docs.liquibase.com/tools-integrations/springboot/springboot.html

String http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.9.0.xsd should actually be: http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.9.xsd (without trailing .0)

Such files (without .0) can be found in liquibase-core.jar and can be accessed via http.

Steps To Reproduce

Make empty springboot application with empty changelog.xml taken from documentation and try to run it.

Actual Behavior

Exception during application startup:

Caused by: liquibase.exception.ChangeLogParseException: liquibase.parser.core.xml.XSDLookUpException: Unable to resolve xml entity http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.9.0.xsd locally: liquibase.secureParsing is set to 'true' which does not allow remote lookups. Set it to 'false' to allow remote lookups of xsd files.
	at liquibase.parser.core.xml.XMLChangeLogSAXParser.parseToNode(XMLChangeLogSAXParser.java:137) ~[liquibase-core-4.9.1.jar:na]
	at liquibase.parser.core.xml.AbstractChangeLogParser.parse(AbstractChangeLogParser.java:15) ~[liquibase-core-4.9.1.jar:na]
	at liquibase.Liquibase.getDatabaseChangeLog(Liquibase.java:369) ~[liquibase-core-4.9.1.jar:na]
	at liquibase.Liquibase.lambda$update$1(Liquibase.java:224) ~[liquibase-core-4.9.1.jar:na]
	at liquibase.Scope.lambda$child$0(Scope.java:180) ~[liquibase-core-4.9.1.jar:na]
	at liquibase.Scope.child(Scope.java:189) ~[liquibase-core-4.9.1.jar:na]
	at liquibase.Scope.child(Scope.java:179) ~[liquibase-core-4.9.1.jar:na]
	at liquibase.Scope.child(Scope.java:158) ~[liquibase-core-4.9.1.jar:na]
	at liquibase.Liquibase.runInScope(Liquibase.java:2405) ~[liquibase-core-4.9.1.jar:na]
	at liquibase.Liquibase.update(Liquibase.java:211) ~[liquibase-core-4.9.1.jar:na]
	at liquibase.Liquibase.update(Liquibase.java:197) ~[liquibase-core-4.9.1.jar:na]
	at liquibase.integration.spring.SpringLiquibase.performUpdate(SpringLiquibase.java:314) ~[liquibase-core-4.9.1.jar:na]
	at liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:269) ~[liquibase-core-4.9.1.jar:na]
	at org.springframework.boot.autoconfigure.liquibase.DataSourceClosingSpringLiquibase.afterPropertiesSet(DataSourceClosingSpringLiquibase.java:46) ~[spring-boot-autoconfigure-2.6.5.jar:2.6.5]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1863) ~[spring-beans-5.3.17.jar:5.3.17]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1800) ~[spring-beans-5.3.17.jar:5.3.17]
	... 18 common frames omitted
Caused by: liquibase.parser.core.xml.XSDLookUpException: Unable to resolve xml entity http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.9.0.xsd locally: liquibase.secureParsing is set to 'true' which does not allow remote lookups. Set it to 'false' to allow remote lookups of xsd files.
	at liquibase.parser.core.xml.LiquibaseEntityResolver.resolveEntity(LiquibaseEntityResolver.java:49) ~[liquibase-core-4.9.1.jar:na]
	at java.xml/com.sun.org.apache.xerces.internal.util.EntityResolver2Wrapper.resolveEntity(EntityResolver2Wrapper.java:178) ~[na:na]
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLEntityManager.resolveEntity(XMLEntityManager.java:1134) ~[na:na]
	at java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.resolveDocument(XMLSchemaLoader.java:663) ~[na:na]
	at java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.findSchemaGrammar(XMLSchemaValidator.java:2695) ~[na:na]
	at java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:2070) ~[na:na]
	at java.xml/com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:830) ~[na:na]
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:374) ~[na:na]
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(XMLNSDocumentScannerImpl.java:613) ~[na:na]
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3079) ~[na:na]
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:836) ~[na:na]
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:605) ~[na:na]
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112) ~[na:na]
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:542) ~[na:na]
	at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:889) ~[na:na]
	at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:825) ~[na:na]
	at java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141) ~[na:na]
	at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1224) ~[na:na]
	at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:637) ~[na:na]
	at liquibase.parser.core.xml.XMLChangeLogSAXParser.parseToNode(XMLChangeLogSAXParser.java:105) ~[liquibase-core-4.9.1.jar:na]

Expected/Desired Behavior

Taking empty changelog.xml from documentation should be correct out of the box.

Screenshots (if appropriate)

obraz obraz

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:4
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
myegonicommented, Jul 28, 2022

Hi @kataggart, I’ve submitted the problem in this issue: #3120 Thanks!

0reactions
kataggartcommented, Jul 26, 2022

@myegoni that would be great if you could create a new issue. Thanks! Definitely don’t want your issue getting lost.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Example Changelogs: XML Format | Liquibase Docs
Reference information for XML changelogs. Liquibase supports XML as a format for storing your changelog files.
Read more >
Liquibase 3.2 not finding dbchangelog-3.2.xsd - Stack Overflow
I solved it by distributing the schema with my application and referring to it locally (relative path). In the example below I have...
Read more >
CXF resolving the wrong XSD file when XSD filenames are ...
Issue. When we deploy our WAR with JAX-WS webservices to JBoss EAP, in certain cases when requesting the WSDL/XSD from the running ...
Read more >
Getting Started | Liquibase Best Practices
Here are examples of the different changelog formats for the db.changelog-1.0 file: SQL; XML; JSON; YAML.
Read more >
17 XML Schema Storage and Query: Basic
XML Schema is a standard for describing the content and structure of XML documents. You can register, update, and delete an XML schema...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found