Ribeye
Ribeye

Reputation: 2177

Liquibase 3.2 not finding dbchangelog-3.2.xsd

Running version 3.2 I am getting an error

[WARN] liquibase - schema_reference.4: Failed to read schema document 'http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.2.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not .

When I look for http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.2.xsd it is not there, although http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd is.

I came accross this https://liquibase.jira.com/browse/CORE-1840, which I interpret to say you dont need access to the internet to get dbchangelog-3.2.xsd. It doesnt seem to help when the internet is available but the .xsd is not there.

I have reverted back to 3.1 but would like to know the root cause of my 3.2 problem.

Upvotes: 5

Views: 12267

Answers (5)

Tech Academics
Tech Academics

Reputation: 1

Check your changlog.xml file headers having xsd document version. If it doesn't match it will during spring boot:run

Upvotes: 0

nicolimo86
nicolimo86

Reputation: 778

I fixed the issue following what found here.

The solution works only for the one using maven-liquibase-plugin. You have to run liquibase migration with the following option -Dprefer.internal.xsd=true:

mvn -Dprefer.internal.xsd=true liquibase:update

Upvotes: 0

JITHIN_PATHROSE
JITHIN_PATHROSE

Reputation: 1406

Updating the liquibase version to the latest solved my problem

<dependency>
    <groupId>org.liquibase</groupId>
    <artifactId>liquibase-maven-plugin</artifactId>
    <version>3.6.3</version>
</dependency>

Upvotes: 3

Albert Ashrafzyanov
Albert Ashrafzyanov

Reputation: 311

Liquibase does not looking for xsd in Internet. http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.2.xsd will be replaced to path to java recources

More detailed info can be find here

Upvotes: 0

garbelini
garbelini

Reputation: 468

I solved it by distributing the schema with my application and referring to it locally (relative path). In the example below I have the schema file in the same folder as the changelog.

<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 dbchangelog-3.1.xsd">

<!-- all the things -->

</databaseChangeLog>

Upvotes: 1

Related Questions