-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Guide for AWS Lambda HTTP yields: io.quarkus.amazon.lambda.runtime.QuarkusStreamHandler ClassNotFoundException in SAM #6701
Comments
this looks like an issue with SAM use of DockerMachine permission on sharing/copying files to the container for execution/mounting. I reproduced it with the SAM HelloWorld app. You can see it mentioned here: Temporary workaround: Or perhaps test this on docker-desktop instead of docker-toolbox (I have no choice because I'm on OSX El Capitan) |
I'll see if I can reproduce. I didn't have a problem on my setup on Fedora. Should we just link this in docs? |
Reproduced on Windows with stock archetype generated project, found this issue as result. |
I have been following "QUARKUS - AMAZON LAMBDA" guide and I got the same error for the native package. I repeated all steps but manually creating the lambda in the AWS console. and I had exactly the same issue when running the code on AWS:
When I uploaded non-native code (JAR) the lambda worked just fine.
My development machine is macOS (Catalina).
|
As per the pervious link I believe this is a sam docker issue wrt storage where the class path ends up being broken due to failed mounting or scp. aws/aws-sam-cli#1092 |
I have been at a conference this week but I will try to take a look when I'm back in the office next week. |
I was experiencing this issue for the JVM version (native worked fine!), and I have now updated to the latest version of SAM 0.43, and the problem is resolved - JVM version working and no class not found exception. |
Quarkus 1.2.1 Final - the native lambda worked - both: Java 8 and Java 11 native build. I don't use local SAM, I only have GraalVM and I created Lambda manually, uploaded |
I should add, I presume 'native' will work due to a being a different runtime classloader mechanism. It was only on sam-local and seems like an issue with docker-toolkit and not docker desktop. |
Oops seems the answer on my side was as simple as by default Amazon Lambda only builds a thin jar, which is why it works for native image as it brings in all classes used.
It would be nice if the Amazon Lambda extension by default forced this. |
I have the same problem like @kolorobot |
Working fine for me now on 1.4.2
|
Describe the bug
When following the guide:
mvn clean install
sam local start-api --template sam.jvm.yaml
http://127.0.0.1:3000/hello
Expected behavior
Should return the result of the get request to the browser (as shown in the guide)
Actual behavior
browser returns error message:
{"message":"Internal server error"}
To Reproduce
Steps to reproduce the behavior:
http://127.0.0.1:3000/hello
Configuration
# Add your application.properties here, if applicable.
Screenshots
(If applicable, add screenshots to help explain your problem.)
Environment (please complete the following information):
uname -a
orver
:java -version
:Additional context
Java version "1.8.0_231"
Java(TM) SE Runtime Environment (build 1.8.0_231-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.231-b11, mixed mode)
The text was updated successfully, but these errors were encountered: