-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
ClassNotFoundException when running hello app #1092
Comments
a) This is throwing this error because I didn't run The problem here is that maybe sam-cli needs to do a better job at sensing an incorrect configuration and throw a more helpful error? It seems like a ClassNotFoundException is a pretty wide blanket for a number of things that could go wrong (No access to mount under docker, the CodeUri target does not exist at all, the actual class being targeted cannot be found on the classpath). Are all of the above acceptable scenarios or not possible to validate when running sam local? |
These seem to be good suggestions around overall validation before we invoke, do you want to create a separate issue that is across runtimes and not just java? |
Are you able to repro this still this with latest version of SAM CLI, we can open a separate issue for this in terms of better error messages, But i'm closing this particular issue as the underlying question is answered. |
Description
Getting ClassNotFoundException when running both hello world app, and my own app that was previously working.
Steps to reproduce
Observed result
An exception after sending a GET request to the endpoint:
curl request:
Lambda output:
Expected result
I'd expect the Lambda to be able to find the class on the classpath and run the handler function.
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
sam --version
:Docker shared directories (I eventually added
/var/folders
to try and resolve the issue):I'm not sure what else to try, do you have any suggestions? This used to work, I can't think of what could have changed... maybe a Docker auto-update?
The text was updated successfully, but these errors were encountered: