Skip to content

1.0.1 lambda-java-serialization release #379

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 22, 2022

Conversation

smirnoal
Copy link
Contributor

Description of changes:
Update Jackson dependencies, junit version, owasp plugin version

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link
Collaborator

@msailes msailes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LTGM

@smirnoal smirnoal merged commit 62ea40e into aws:master Nov 22, 2022
@smirnoal smirnoal deleted the serialization_release branch November 22, 2022 10:35
@jeromevdl
Copy link
Contributor

With this update, I have the following error :

java.io.UncheckedIOException: 
com.amazonaws.lambda.thirdparty.com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Joda date/time type `org.joda.time.DateTime` not supported by default: add Module "com.amazonaws.lambda.thirdparty.com.fasterxml.jackson.datatype:jackson-datatype-joda" to enable handling
 at [Source: (BufferedInputStream); line: 13, column: 22] (through reference chain: com.amazonaws.services.lambda.runtime.events.SNSEvent["Records"]->java.util.ArrayList[0]->com.amazonaws.services.lambda.runtime.events.SNSEvent$SNSRecord["Sns"]->com.amazonaws.services.lambda.runtime.events.SNSEvent$SNS["Timestamp"])

When adding the following dependency:

        <dependency>
            <groupId>com.fasterxml.jackson.datatype</groupId>
            <artifactId>jackson-datatype-joda</artifactId>
            <version>2.14.0</version>
        </dependency>

and adding the JodaModule in com.amazonaws.services.lambda.runtime.serialization.events.LambdaEventSerializers:

factory.getMapper().registerModules(new DateModule(), new DateTimeModule(classLoader), new JodaModule());

I have the following one:

java.io.UncheckedIOException: 
com.amazonaws.lambda.thirdparty.com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot construct instance of `org.joda.time.DateTime` (although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value ('2020-10-08T16:06:14.656Z')
 at [Source: (BufferedInputStream); line: 13, column: 22] (through reference chain: com.amazonaws.services.lambda.runtime.events.SNSEvent["Records"]->java.util.ArrayList[0]->com.amazonaws.services.lambda.runtime.events.SNSEvent$SNSRecord["Sns"]->com.amazonaws.services.lambda.runtime.events.SNSEvent$SNS["Timestamp"])

Am I missing something?

@smirnoal
Copy link
Contributor Author

thanks for reporting that, do you mind sharing a unit test for this?

@jeromevdl
Copy link
Contributor

if you update aws-lambda-java-tests with this new version and run tests, you'll get it.

@andclt
Copy link
Contributor

andclt commented May 4, 2023

Hi @Watlas, could you please try updating to the latest version (1.1.2) of aws-lambda-java-serialization. Ref: #410

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants