You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AWSLambdaUtils throw NullPointerException when function return type is com.amazonaws.services.lambda.runtime.events
Any function on AWS returning an object of S3Event/ScheduledEvent (from package: com.amazonaws.services.lambda.runtime.events) is giving null pointer exception
java.lang.NullPointerException: Cannot invoke "org.springframework.messaging.Message.getPayload()" because "msg" is null
at org.springframework.cloud.function.adapter.aws.AWSLambdaUtils.extractPayload(AWSLambdaUtils.java:152)
at org.springframework.cloud.function.adapter.aws.AWSLambdaUtils.generateOutput(AWSLambdaUtils.java:216)
at org.springframework.cloud.function.adapter.aws.AWSLambdaUtils.generateOutputFromObject(AWSLambdaUtils.java:208)
at org.springframework.cloud.function.adapter.aws.FunctionInvoker.handleRequest(FunctionInvoker.java:95)
The text was updated successfully, but these errors were encountered:
AnshulRustogi
changed the title
AWSLambdaUtils throw NullPointerException when
AWSLambdaUtils throw NullPointerException when objects from com.amazonaws.services.lambda.runtime.events is returned from Function
Nov 28, 2024
AnshulRustogi
changed the title
AWSLambdaUtils throw NullPointerException when objects from com.amazonaws.services.lambda.runtime.events is returned from Function
AWSLambdaUtils throw NullPointerException when function return type is com.amazonaws.services.lambda.runtime.events
Nov 28, 2024
@olegz I believe the current added solution works for S3Event, would it be possible to have a more generic solution to work for all AWS events (eg: lambda events) to not give nullPointerException
AWSLambdaUtils throw NullPointerException when function return type is com.amazonaws.services.lambda.runtime.events
Any function on AWS returning an object of S3Event/ScheduledEvent (from package: com.amazonaws.services.lambda.runtime.events) is giving null pointer exceptionTest Case for recreate the issue
FunctionInvokerTests.class
Below function can be added in S3Configuration subclass in test class
The text was updated successfully, but these errors were encountered: