Skip to content

Unable to upgrade with newer Jackson - conflicting com.fasterxml.jackson.annotation.JsonFormatΒ #448

Closed
@aleskiewicz

Description

@aleskiewicz

Since release 1.1.3 , there is a risk of conflict with jackson-annotations jar. PR #445 has changed shading rules for selected list of Jackson annotations and now, some are exposed under original package name (see attached image).

In our case, after upgrade to version 1.1.3 the app fails to start, because of missing com.fasterxml.jackson.annotation.JsonFormat.Feature.READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE. This feature switch is available since Jackson 2.15 . We are using Jackson 2.15.2. Workaround for this issue is to include jackson-annotations before the aws-lambda-java-serialization dependency, so classloader first loads updated Jackson classes, but that's not the ideal way

        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
        </dependency>
        <dependency>
            <groupId>com.amazonaws</groupId>
            <artifactId>aws-lambda-java-serialization</artifactId>
            <version>1.1.3</version>
        </dependency>

image

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions