Failed to read schema document 'http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd'

Looks like it might have been something transient - I am able to see the xsd file fine from here. Try opening that link in a browser - you should see a valid xsd file (which is also an xml file).

Steve Donie
Principal Software Engineer
Datical, Inc. http://www.datical.com/

hi 

 we are getting the " Failed to read schema document ‘<a href=‘http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd’,’ target=’_blank’ rel=‘noreferrer’>http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd’, because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not xsd:schema." error  while running the application.

not able to create database schema.

previously it was working, suddenly it start giving error.

i have attach the change log file.

please suggest some solution to sort out this issue

thanks  

Hi,

I also have same issue today.
The XSD is using over 1 year but today suddenly failed.
Does have any changes on the XSD today?

LiquibaseAutoConfiguration$LiquibaseConfiguration.class]: Invocation of init method failed; nested exception is liquibase.exception.ChangeLogParseException: Error parsing line 5 column 70 of classpath:/db/changelog/changelog_original.xml: schema_reference.4: Failed to read schema document ‘http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.8.xsd’,

Seems like liquibase now redirects all traffic from https with a 301 redirect, and thus fails to start.

By updating the XML definitions (e.g xsi:schemaLocation) in the changelog files to use https:// instead of http:// solved it for me.

 xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.4.xsd

Sorry for the problems.

The is is that a “require https” setting somehow got enabled for those 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’re actively working with them to resolve the problem.

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.

Upgrading to the current 4.6.2 version will address it from whatever versions have the “download the xsd” bug. Switching the XSD URL in your file to https instead of http will work too. Otherwise, we should hopefully have the redirecting issue fixed on our our side soon.

Nathan

1 Like

The server config should be fixed up now. Let us know if you’re still seeing problems.

Thanks,
Nathan

Now I’m getting the following:

Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd

It looks like there’s a separate issue with it blocking user-agent=java requests now too…

The fun of infrastructure changes. We’re working on getting it resolved.

Nathan

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.

Nathan

1 Like

Hello,

https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd → failed

It seems that today we have the problem in the other side. I changed all the http to https and it fixed the issue.
Note that the issue was not present yesterday (18-08-2022).
No it does not work anymore with https but it is ok with http.
It is an urgent issue for us because we cannot start our application.
Thanks in advance
Regards

1 Like

Hi all,

We’re current facing this issue with our applications that use liquibase,
The problem is impacting all of our deployments.

Unexpected error running Liquibase: schema_reference.4: Failed to read schema document 'http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.6.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.

1 Like

Hi, all!
We´re the same problem!
Caused by: org.xml.sax.SAXParseException; lineNumber: 7; columnNumber: 139; schema_reference.4: Failed to read schema document ‘http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd’, because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not xsd:schema.

our deployment can´t start.

Hi Gabriel,

We tried to upgraded to 4.15 and our changesets were not compatible.
Updating the liquibase to 3.10.2 worked for us, at least as a work around for the moment.

Hello,
As it has been mentioned by @OptionWay , this can be solved by

  1. moving https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd to http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd .

  2. Using xsd version which is present in the liquibase-core jar liquibase.parser.core.xml package.
    Example:
    In case your liquibase-core version is 3.5.5 make sure to use xsd of 3.5 version. Using xsd of higher then 3.5 will cause this issue as it is not available in the jar.

Hope it helps…

Cheers!!

2 Likes

Hi,
Unfortunately we were using http URL when the issue occurred and moved to https to the same result as that was the previous fix in January. We tested with the files locally also but received Non-whitespace characters are not allowed in schema elements other than ‘xs:appinfo’ and ‘xs:documentation’.

Updating the liquibase to 3.10.2 was the only solution to get the new deployments working for the moment but all old deployments will still be affected.

Actually it is a huge impact for all our applications on production. If we have to restart, it will fail if we do not change https to http.
Is it possible to have an urgent fix to have https working again?
If it is not possible, how can I be sure that http will still work in the future? Last January I had to change to https.
Thanks in advance

In case you liquibase-core version is 3.5.5 make sure to use xsd of 3.5 version

:arrow_up: This was the important bit for us, because then liquibase could use the schema bundled with the dependency.

Our schema was incorrectly declared as http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.8.xsd, but neither the http or https schema location would work.

Possibly, there’s some other issue that has come up (again?), like:

separate issue with it blocking user-agent=java requests

We got a very simallar error that suddenly happened on our build server today, and not yesterday.

Caused by: org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
... 
Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd

Our dependencies are a bit old unfortunately with Spring 4.3.5, Spring Boot 1.5.22 and liquibase-core 3.10.3. Tried switching from http to https in the xsd urls that the log mentioned, but the in the end the solution was to was other have mentioned to reference a xsd version that matches one of the files included in the jar file of liquibase-core.

Are folks running these older versions of the software okay now with the XSD? We highly recommend upgrading as newer versions of the software a.) have security fixes and b.) will find the XSD locally.