serverless-java-container icon indicating copy to clipboard operation
serverless-java-container copied to clipboard

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

Open anandv1770 opened this issue 3 years ago • 4 comments

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.

anandv1770 avatar Feb 21 '21 04:02 anandv1770

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.

sapessi avatar Feb 22 '21 17:02 sapessi

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 avatar Feb 22 '21 18:02 anandv1770

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 :(

anandv1770 avatar Feb 23 '21 06:02 anandv1770

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

deki avatar Jul 23 '21 11:07 deki

No further feedback, closing...

deki avatar Jan 12 '24 16:01 deki