aws / serverless-java-container

A Java wrapper to run Spring, Spring Boot, Jersey, and other apps inside AWS Lambda.
https://aws.amazon.com/serverless/
Apache License 2.0
1.5k stars 560 forks source link

: Could not initialize class com.amazonaws.serverless.proxy.spring.SpringBootLambdaContainerHandler #405

Closed anandv1770 closed 10 months ago

anandv1770 commented 3 years ago

Hi Stefano, Thanks for the great presentation. I followed the instructions as per Readme.txt(sample/springboot2/native-pet-store) and I'm able to deploy as Lambda but when I invoke the URL I get Internal server error and could see following error in Cloud watch logs: Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class com.amazonaws.serverless.proxy.spring.SpringBootLambdaContainerHandler, Request you to kindly help me to fix this issue ASAP.

sapessi commented 3 years ago

Looks like the class you need is not getting packaged in the deployment or something is not trying to load the right class. The native project should depend on the com.amazonaws.serverless.proxy.springboot2 package.

anandv1770 commented 3 years ago

Looks like the class you need is not getting packaged in the deployment or something is not trying to load the right class. The native project should depend on the com.amazonaws.serverless.proxy.springboot2 package.

Thanks for the quick response I did not make any changes , just followed the steps mentioned in README under sample/springboot2/native-pet-store :(. Please suggest. Should I make any changes in configuration or its ok to use as is?

anandv1770 commented 3 years ago

I request you to kindly help us on this ASAP. Stuck with cold start spring boot cloud function even for a simple hello world and company has decided to go ahead with aws lambda for all rest calls :(

deki commented 3 years ago

@anandv1770 are you still stuck? happy to help...

deki commented 10 months ago

No further feedback, closing...