Skip to content
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

ERROR: java.util.LinkedHashMap cannot be cast to APIGatewayProxyRequestEvent #77

Open
1 task done
fuzzy28 opened this issue Oct 28, 2021 · 1 comment
Open
1 task done

Comments

@fuzzy28
Copy link

fuzzy28 commented Oct 28, 2021

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Unfortunately, the issue exists in the current docker build

localstack.services.awslambda.lambda_executors.InvocationException: Lambda process returned error status code: 1. Result: . Output:
Exception in thread "main" java.lang.ClassCastException: class java.util.LinkedHashMap cannot be cast to class com.amazonaws.services.lambda.runtime.events.APIGatewayProxyRequestEvent (java.util.LinkedHashMap is in module java.base of loader 'bootstrap'; com.amazonaws.services.lambda.runtime.events.APIGatewayProxyRequestEvent is in unnamed module of loader 'app')
        at com.fitness.society.users.handlers.UserRegistrationAPIGatewayHandler.handleRequest(UserRegistrationAPIGatewayHandler.java:26)
        at cloud.localstack.LambdaExecutor.main(LambdaExecutor.java:119)

Expected Behavior

Should work with the below dependency as it was closed and verified in the original ticket localstack/localstack#1634

   <dependency>
        <groupId>com.amazonaws</groupId>
        <artifactId>aws-lambda-java-events</artifactId>
        <version>2.0.2</version>
    </dependency>

How are you starting LocalStack?

With a docker run command

Steps To Reproduce

How are you starting localstack (e.g., bin/localstack command, arguments, or docker-compose.yml)

docker run localstack/localstack

Client commands (e.g., AWS SDK code snippet, or sequence of "awslocal" commands)

curl -X POST http://192.168.1.1:4566/restapis/mvy1yew0wa/prod/_user_request_/users

Environment

- OS: Amazon Linux2
- LocalStack: localstack/localstack   latest    087de49bf85a

Anything else?

No response

@lakkeger
Copy link

Hi! We just wanted to follow up to see whether your issue has been resolved. Were you able to get it working with the latest version of LocalStack? We would appreciate your feedback!

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

No branches or pull requests

2 participants