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.

XML Schema defintion no longer provided via HTTP, only HTTPS

See original GitHub issue

I define the liquibase XML schema definition the the databaseChangeLog element of my liquibase change sets like this, but I get an error, that the file cannot be parsed.

<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog/ http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">

Checking the URL via curl on the terminal returns that the page was moved permanently.

% curl -i http://www.liquibase.org/xml/ns/dbchangelog/
HTTP/1.1 301 Moved Permanently
Location: https://www.liquibase.org/xml/ns/dbchangelog/

% curl -i http://www.liquibase.org/xml/ns/dbchangelog 
HTTP/1.1 301 Moved Permanently
Location: https://www.liquibase.org/xml/ns/dbchangelog

% curl -i https://www.liquibase.org/xml/ns/dbchangelog
HTTP/2 301
location: http://www.liquibase.org/xml/ns/dbchangelog/

% curl -i https://www.liquibase.org/xml/ns/dbchangelog/
HTTP/2 200
Expected body contained.

Is this expected behaviour, the the schema definition is no longer served via HTTP?

Also when I update my file to use HTTPS like this:

<databaseChangeLog
xmlns="https://www.liquibase.org/xml/ns/dbchangelog/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://www.liquibase.org/xml/ns/dbchangelog/ https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">

I get the following Exception:

java.lang.RuntimeException: liquibase.exception.ChangeLogParseException:
Error parsing line 5 column 44 of my_file_name.xml:
TargetNamespace.1: Expecting namespace 'https://www.liquibase.org/xml/ns/dbchangelog/',
  but the target namespace of the schema document is 'http://www.liquibase.org/xml/ns/dbchangelog'.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:14 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
nvoxlandcommented, Jan 7, 2022

There is is that a “require https” setting somehow got enabled for the XSD urls. We’re shifting our website hosting provider and despite the fact that we explicitly tested for this requirement on staging, something seems different in their new production settings. We’ve gotten the settings fixed up so this should no longer be a problem. Both http and https URLs should return content without any redirects.

In general, Liquibase should read the xsd files bundled in the jar rather than try to download them but there have been a few versions over the years which had a bug that caused them to pull them from the network. If you were seeing this problem, it means you had one of those URLs and upgrading will make liquibase run a bit faster as it won’t be making unnessisary network calls. But, if you don’t upgrade, it should be working as before again.

3reactions
nvoxlandcommented, Jan 7, 2022

The user-agent block has been resolved now as well, so everything should be fixed up now.

Let me know if you still have issues related to the XSD file downloading. The user agent one was a java 8 vs 11/17 thing so hard to know what other permutations may cause unexpected problems.

Read more comments on GitHub >

github_iconTop Results From Across the Web

W3C XML Schema Definition Language (XSD) 1.1 Part 1
Abstract. This document specifies the XML Schema Definition Language, which offers facilities for describing the structure and constraining ...
Read more >
XML Schema: Understanding Namespaces - Oracle
Moving to XML Schema? This introduction to namespaces will help you understand one of its more important elements.
Read more >
What is XML Schema Definition (XSD)? - TechTarget
to describe and validate the structure and content of an XML document. It is primarily used to define the elements, attributes and data...
Read more >
The XML Files: A Quick Guide to XML Schema - Microsoft Learn
XML Schema and Namespaces​​ The definitions placed within the xsd:schema element are automatically associated with the namespace specified in the ...
Read more >
40. XML Schema-based configuration - Spring
The objects defined in a Spring XML configuration file are not all generic, vanilla beans. Usually, each bean requires some degree of specific...
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