Skip to content

Large files throw YAML exceptions #23617

Closed
@bencalegari

Description

@bencalegari

Spring Boot Version: 2.3.4

Issue:

As referenced in #23096, trying to load our app (which uses quite a lot of big yaml files) still causes the following stack trace:

Caused by: org.yaml.snakeyaml.error.YAMLException: Number of aliases for non-scalar nodes exceeds the specified max=50
	at org.yaml.snakeyaml.composer.Composer.composeNode(Composer.java:147)

Downgrading the version of snakeyaml to 1.25 as suggested in the old issue fails as well since these functions in OriginTrackedYamlLoader no longer exist:

java.lang.NoSuchMethodError: 'void org.yaml.snakeyaml.LoaderOptions.setMaxAliasesForCollections(int)'
	at org.springframework.boot.env.OriginTrackedYamlLoader.createYaml(OriginTrackedYamlLoader.java:67)

The branch of our app with this version is here.
For an example of how we use yaml, see this test (which is failing on 2.3.4), the class that's using the yaml, and the yaml the test is using.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: invalidAn issue that we don't feel is valid

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions