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

Hi nvoxland
This happens again right now
s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than ‘xs:appinfo’ and ‘xs:documentation’. Saw ‘301 Moved Permanently’.

1 Like

Hi,
We are using liquibase and suddenly our building process stopped working.
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.0.xsd :
Error parsing line 2 column 35 …s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than ‘xs:appinfo’ and ‘xs:documentation’. Saw ‘301 Moved Permanently’.

1 Like

Hi Team,

Same exception here as well, Caused by: org.xml.sax.SAXParseException: s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw '301 Moved Permanently

We have been blocked on this from doing our deployment from yesterday night. Any updates on this is really helpful to plan further.

Thanks

1 Like

Hi,
yes, we’re still experiencing the same issue. When it is going to be fixed?

1 Like

Standing in the same line again. This is the second or third time we are facing similar issues in recent times…

Please provide a permanent fix for this! We are facing a lot of downtime due to this issue

Unexpected error running Liquibase: Error parsing line 2 column 35 of migration/schema_v1auth-schema-v1.changelog-master.xml: s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than 'xs:appinfo' and 'xs:documentation'. Saw '301 Moved Permanently'.

Hi @ganesha.sanpoly Thanks for joining the community. We have fixed the issue and have a ticket open to figure out why this happened again.

Hi @asamiyev @moh1975 Thanks for joining the community. We have fixed the issue and have a ticket open to research why this happened. Can you share the versions of Liquibase that you are using? Would it be possible to upgrade to a newer version that looks for these files locally instead?

Hi Mike,
Sorry, forgot to answer. We were using version 3.6.2. Now, we moved to newer version 4.6.2 and provided local xsd file. Of course, we had to make changes (db: PostgreSQL. particularly to TIMESTAMP data types) in our old migration files to make migration work with the new version of the library. After all of these, migration works properly )
Thanks

1 Like