Samples of changelog.xml in documenation have wrong path to xsd files
See original GitHub issueEnvironment
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)
Issue Analytics
- State:
- Created a year ago
- Reactions:4
- Comments:5 (3 by maintainers)
Top GitHub Comments
Hi @kataggart, I’ve submitted the problem in this issue: #3120 Thanks!
@myegoni that would be great if you could create a new issue. Thanks! Definitely don’t want your issue getting lost.