Getting liquibase changeset xml error while running a migration script

Error in logs is as below :
Caused by: liquibase.exception.ChangeLogParseException: Error parsing line 2 column 35 of classpath:liquibase-changelog.xml:
s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than ‘xs:appinfo’ and 'xs:documentation
'. Saw ‘301 Moved Permanently’.
at liquibase.parser.core.xml.XMLChangeLogSAXParser.parseToNode(XMLChangeLogSAXParser.java:120) ~[liquibase-core-3.10.3.jar!/
:na]
at liquibase.parser.core.xml.AbstractChangeLogParser.parse(AbstractChangeLogParser.java:15) ~[liquibase-core-3.10.3.jar!/:na
]
at liquibase.Liquibase.getDatabaseChangeLog(Liquibase.java:216) ~[liquibase-core-3.10.3.jar!/:na]
at liquibase.Liquibase.update(Liquibase.java:189) ~[liquibase-core-3.10.3.jar!/:na]
at liquibase.Liquibase.update(Liquibase.java:178) ~[liquibase-core-3.10.3.jar!/:na]
at liquibase.integration.spring.SpringLiquibase.performUpdate(SpringLiquibase.java:368) ~[liquibase-core-3.10.3.jar!/:na]
at liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:316) ~[liquibase-core-3.10.3.jar!/:n

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

For me, it was solved by updating the XML definitions (e.g xsi:schemaLocation) in the changelog files to use https:// instead of http:// for all URLs solved it for me.

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

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

Thanks,
Nathan

Thanks nay and nvoxland for me it worked after updating the liquibase version to 4.6.2 and updating the xsd to 3.9

Hi nvoxland, for 4.1 still occurs
Caused by: java.io.IOException: Server returned HTTP response code: 403 for URL: http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.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

1 Like

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

it’s ok now. Thank you

1 Like