Change logs in json format not processed by liquibase - parsing errors

Description

We are able to generate change logs in json format but when running (i.e. with update) them get the following error:

Unexpected error running Liquibase: while parsing a block mapping; expected <block end>, but found FlowMappingStart; in 'reader', line 83, column 3:
{

I have tried several versions of liquibase and several versions of the snakeyaml lib to no avail.

Using liquibase from the cmd line, jdbc driver 41 and the snakeyaml lib that comes with liquibase (v.1.13)

Environment

Mac OS, Linux, Windows

Activity

Show:

Nathan Voxland December 4, 2014 at 4:51 PM

You can test it from https://liquibase.jira.com/builds/browse/CORE-LB4 prior to the release if you would would like.

Nathan Voxland December 4, 2014 at 4:50 PM

Just in the latest snapshot. Trying to get 3.3.1 out as soon as I can, hopefully today or tomorrow.

Nedda December 4, 2014 at 4:49 PM

Nathan, is 3.3.1 out officially or is the fix in the latest snapshot?

Nathan Voxland December 3, 2014 at 7:00 PM

Fixed for 3.3.1

Nedda November 26, 2014 at 6:35 PM

Here is the debug output:

SEVERE 11/26/14 3:57 PM: liquibase: while parsing a block mapping; expected <block end>, but found FlowMappingStart; in 'reader', line 83, column 3:
{
^
liquibase.exception.ChangeLogParseException: Syntax error in json: while parsing a block mapping; expected <block end>, but found FlowMappingStart; in 'reader', line 83, column 3:
{
^
at liquibase.parser.core.yaml.YamlChangeLogParser.parse(YamlChangeLogParser.java:56)
at liquibase.Liquibase.getDatabaseChangeLog(Liquibase.java:215)
at liquibase.Liquibase.update(Liquibase.java:192)
at liquibase.integration.commandline.Main.doMigration(Main.java:1032)
at liquibase.integration.commandline.Main.run(Main.java:177)
at liquibase.integration.commandline.Main.main(Main.java:96)
Caused by: while parsing a block mapping
in 'reader', line 1, column 1:
databaseChangeLog:
^
expected <block end>, but found FlowMappingStart
in 'reader', line 83, column 3:
{
^

at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(ParserImpl.java:570)
at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:158)
at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:143)
at org.yaml.snakeyaml.composer.Composer.composeMappingNode(Composer.java:226)
at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:155)
at org.yaml.snakeyaml.composer.Composer.composeDocument(Composer.java:122)
at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:105)
at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:120)
at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:481)
at org.yaml.snakeyaml.Yaml.loadAs(Yaml.java:475)
at liquibase.parser.core.yaml.YamlChangeLogParser.parse(YamlChangeLogParser.java:54)
... 5 more

Fixed

Details

Reporter

Components

Fix versions

Affects versions

Priority

Created November 26, 2014 at 2:01 PM
Updated December 4, 2014 at 4:51 PM
Resolved December 3, 2014 at 7:00 PM