-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XSDs are not resolved from the jar when referenced via HTTPS #1153
Comments
We are seeing a similar issue but with http as opposed to https when running form Maven. Failed to read schema document 'http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.3.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. What is strange is we can open the XSDs in the browser. I have seen this in the past and the issue resolve itself so I guess it is network related. |
Same for us. Temporarily fixed by manually downloading those and storing it in s3. |
Same issue here (or some variation of it, not related to https in our case). I traced it down to www.liquibase.org returning HTTP 403 if it doesn't like the user agent specified in headers.
|
We are also facing the same issue in multiple Java projects. Error setting up or running Liquibase: liquibase.exception.SetupException: Error parsing line 7 column 139 of config/liquibase/changelog/20180606073206_added_entity_Brand.xml: schema_reference.4: Failed to read schema document 'http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd', because
|
We are facing the same problem for our Java 8 systems today. Yesterday everything worked... |
i tried add to bat-launcher parameter -Dhttp.agent="wtf" (probably any except java/1.8*) and it helped :) |
Hi @philwebb , @biswell @gnumilanix @fo-fo @teamperfomatix @bjsee @tolix . Thanks for reporting this. We migrated our website yesterday US CT and are working to fix this issues as quickly as we can to match the old site. |
Liquibase uses internal caching mechanism with all xsds up to it's version. If use use version 3.4 and you try to use version 3.5 of xsd, it will blow up because of the issue with agent described above. A quick fix is to download dbchangelog-3.5.xsd and put it on your classpath under: |
Hi @philwebb , @biswell @gnumilanix @fo-fo @teamperfomatix @bjsee @tolix @jkiljanski . This issue should be resolved now. Thanks for the comments and workarounds! |
Note: the issue that showed up yesterday with the http version related to the site hosting switch is unrelated to this issue with https URLs not being served from the local jar. Liquibase has logic to use a copy of the xsd that is bundled with Liquibase, but that logic doesn't currently check for https urls, only http ones. Using http in your xsd references is a workaround for this issue. Separately, there was a bug in a couple earlier versions of liquibase where http URLs were not being pulled from the local cache correctly, but that has been resolved a while ago. The website change would be affecting people using those older versions of liquibase only and that website issue should be resolved now. |
Verified and it's resolved. Thank you |
Verified that this has been resolved |
Can you share how was this resolved? Which version has this fixed? I am seeing similar symptoms with 3.8.9. |
Back in May of last year, we updated our website and moved providers. When that happened, the urls to the xsds were incorrect and quickly fixed. |
The problem is back today. |
Seeing this issue has come back again. |
Issue came back again |
facing issue today |
Seeing the same issue with HTTP: |
Was able to get this working by making sure the liquibase-core pom version and the xsd version match. As someone mentioned, there is a fallback to use the bundled xsd files. In my case, was looking for 3.6 xsd and my pom version was 3.5. 😞 |
I have solved the problem.Ensure that the xsd version in the master.xml and changelog.xml are the same. The liquibase-core version maybe is not the point in pom. |
Folks, Jono from Singapore. My colleagues is experiencing road blocks in resolving the issue. Any kind folks can advise,, please? |
There seems to be a LiquiBase Validation Issue when deploying to Production. Any ideas? |
We use v3.6 and updating the URL to the XSD file to point to the corresponding version of the schema does not help. Tried both HTTP and HTTPS. |
Same for v3.3.5 not working. Updating to 3.5.1 helped. |
Hate to bother you @molivasdat, could it be related to some sort of a hosting issue as before? |
after updating file versions we are getting validation failures from liquibase. Anyone got validation failures..? |
Please be very careful when changing liquibase-core version. Changing it from 3.5.5 to 3.6.1 solved the problem for 3.6 xsd, however, WHEN THE LIQUIBASE WAS RUN FOR THE FIRST TIME AFTER VERSION CHANGE IT DID NOT SEE PREVIOUS CHANGESETS! It ran as if dbchangelog was empty. Luckily our first changeset tried to create an already existing table, thus process failed and on second rerun it saw dbchangelog normally. But if you have drop statements in your first changeset, you may lose data. Edit: if you can't change version for this reason, then you can try
|
The same issue I started to get today but the folowing code solved my problem Before:
After:
|
Hi @SirWojtek There was a website change last night. We are looking into it. |
Hi team. The issue should be resolved now. |
Hi team. The issue should be resolved now. |
@molivasdat Still seeing the issue:
(but works just fine if not using that user agent) |
@molivasdat I'm seeing the 403 using the latest OpenJdk Java 8 1.8.0_312-b07 build as well Using the workaround of adding |
Hi @gzalo Thanks for the update. We will look at it. |
We are still seeing this issue for this url 'https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.9.xsd'. While we are able to workaround by updating the xsd version or changing to http protocol it still is a blocker in certain scenarios where the liquibase xmls are packaged into previously built jar files. below is the output for curl command when user-agent is Java. any other random value works
|
We're working on the java user agent setting. You can follow along at #2342 |
@gzalo @bschlosser @setu9760, we have now fixed the issue. |
ISSUE RESOLVED: During a regular website maintenance, a change was introduced that incorrectly forced https for the xsd files we host for some Liquibase users, causing some users to experience 301 and 403 errors. This issue has been resolved and we apologize for any inconvenience. |
Hi folks, the error re-appeared again. Today, the call SAX Parsers in Keycloak for example are not able to get them. Could you please re-enable the unsafe http access? Thanks, Simon |
The original issue is still reproducible. Java 11. Liquibase Version: Liquibase Integration & Version: <Pick one: CLI, maven, gradle, spring boot, servlet, etc.> Database Vendor & Version: Operating System Type & Version: When I start my service offline I have the behaviour below
|
Problem is still there with 4.2.0, both http and https and [ERROR] Error setting up or running Liquibase:[ERROR] Error parsing line 7 column 103 of src/main/resources/changelog.xml: schema_reference.4: Failed to read schema document 'http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.4.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. |
Environment
Java 8.
Liquibase Version:
3.8
Liquibase Integration & Version: <Pick one: CLI, maven, gradle, spring boot, servlet, etc.>
Spring Boot
Database Vendor & Version:
N/A
Operating System Type & Version:
MacOS
Description
If a migration XML file refers to the liqubase XSD using https, the local jar packaged version is not used. That can cause issues if liquibase.org is down.
Steps To Reproduce
Use a liquibase XML with the following header without a network connection:
Actual Behavior
XSD resolution fails because https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.8.xsd cannot be read.
Expected/Desired Behavior
The locally packaged XSD is used.
Additional Context
The
StandardNamespaceDetails
class could be updated to includehttps
as well ashttp
URLs.The text was updated successfully, but these errors were encountered: