http-lambda sample app errors out on SAM local invoke Β #37250
Description
Describe the bug
I generated sample greeting app using quarkus-amazon-lambda-http and I build it using (mvn clean install
/quarkus build
both) and trying to invoke with SAM using (sam local invoke --template target/sam.jvm.yaml --debug
). I am using docker through colima.
Expected behavior
SAM local invoke should run successfully and http://127.0.0.1:3000/vertx/hello
should return "hello vertx" with 200 status code.
Actual behavior
Throws files does not have permission Information and QuarkusStreamHandler classnotfound error.
java.lang.ClassNotFoundException: io.quarkus.amazon.lambda.runtime.QuarkusStreamHandler. Current classpath: file:/var/task/
END RequestId: c029f8b0-ed7f-40e9-aef1-01facce6b472
REPORT RequestId: c029f8b0-ed7f-40e9-aef1-01facce6b472 Init Duration: 2.02 ms Duration: 529.76 ms Billed Duration: 530 ms Memory Size: 512 MB Max Memory Used: 512 MB
{"errorMessage": "Class not found: io.quarkus.amazon.lambda.runtime.QuarkusStreamHandler", "errorType": "java.lang.ClassNotFoundException"}```
### How to Reproduce?
1. ```
mvn archetype:generate \
-DarchetypeGroupId=io.quarkus \
-DarchetypeArtifactId=quarkus-amazon-lambda-http-archetype \
- build the project using
mvn clean install
/quarkus build
sam local invoke --template target/sam.jvm.yaml --debug
Output of uname -a
or ver
Darwin MC02CXHVRML7H 22.6.0 Darwin Kernel Version 22.6.0: Wed Oct 4 21:25:26 PDT 2023; root:xnu-8796.141.3.701.17~4/RELEASE_X86_64 x86_64
Output of java -version
openjdk version "17.0.7" 2023-04-18 OpenJDK Runtime Environment Temurin-17.0.7+7 (build 17.0.7+7) OpenJDK 64-Bit Server VM Temurin-17.0.7+7 (build 17.0.7+7, mixed mode, sharing)
Quarkus version or git rev
3.1.0.Final
Build tool (ie. output of mvnw --version
or gradlew --version
)
Apache Maven 3.9.5 Maven home: /usr/local/Cellar/maven/3.9.5/libexec Java version: 17.0.7, vendor: Eclipse Adoptium, runtime: /Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home Default locale: en_CA, platform encoding: UTF-8 OS name: "mac os x", version: "13.6.1", arch: "x86_64", family: "mac"
Additional information
Docker version 24.0.2
colima version 0.6.2
Activity