-
Notifications
You must be signed in to change notification settings - Fork 561
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
ServerletContext is null springboot2 lambda #330
Comments
I'm pushing a fix to springboot2 support to the
|
I found a work around but I will test it out |
What was the workaround or the fix you applied LukeShay? As I am facing the same error like yours. |
@mohit224 have you tried with version 1.5 of the framework? |
@sapessi let me try with that version as I was using version 1.4 of aws-serverless-java-container-springboot2. |
@sapessi After upgrading to version 1.5 I am getting following error from the filter which is invoked from the handler class:
|
I'm going to try and replicate this week. |
I can't seem to replicate. The only thing I can think of is that the authorization strategy should be configured as |
That's correct. After configuring the policy to stateless it works. You can close the ticket. |
Scenario
All requests to the lambda are getting an IllegalArgumentException because the ServletContext is not being passed through.
Expected behavior
The ServletContext to be passed through
Actual behavior
See scenario
Steps to reproduce
If you want to fully reproduce, my code is here: https://github.com/LukeShay/route-rating-rest-api/tree/switch-to-lambda. Invoking locally through sam throws datasource errors so you cannot do that.
Full log output
Here is the stack trace from CloudWatch
Here is some code to make it easier:
Lambda handler:
And here is where the exception is being thrown
Any help would be appreciated.
The text was updated successfully, but these errors were encountered: