Error testing Resource Provider - java.lang.ClassNotFoundException: software.amazon.cloudformation.<projectName>.HandlerWrapper
@chuchocd85 ci sta già lavorando.
Dal 22/9/2020.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
I'm following this tutorial here [1], and creating a Resource Provider using the cfn CLI.
When I run "sam local invoke TestEntrypoint --event sam-tests/create.json" I get error below.
Invoking software.amazon.cloudformation.command.HandlerWrapper::testEntrypoint (java8)
Fetching lambci/lambda:java8 Docker container image......
Mounting /Users/shantgup/Documents/CloudFormation-Command-Project/target/aws-cloudformation-command-handler-1.0-SNAPSHOT.jar as /var/task:ro,delegated inside runtime container
START RequestId: 4d2dbf5e-b8c6-159e-9687-8b59ce7d918a Version: $LATEST
java.lang.ClassNotFoundException: software.amazon.cloudformation.command.HandlerWrapper
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
Exception in thread "main" java.lang.Error: java.lang.RuntimeException: java.lang.RuntimeException: Unexpected status code from invocation/response: 299
at lambdainternal.AWSLambda.<clinit>(AWSLambda.java:65)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at lambdainternal.LambdaRTEntry.main(LambdaRTEntry.java:119)
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: Unexpected status code from invocation/response: 299
at lambdainternal.LambdaRuntime.reportDone(LambdaRuntime.java:227)
at lambdainternal.AWSLambda.startRuntime(AWSLambda.java:366)
at lambdainternal.AWSLambda.<clinit>(AWSLambda.java:63)
... 3 more
Caused by: java.lang.RuntimeException: Unexpected status code from invocation/response: 299
at lambdainternal.LambdaRuntime.reportDone(LambdaRuntime.java:224)
... 5 more
Now the file does not exist in my "src/main/java/software/amazon/cloudformation/<project_name>/"
But I see 3 of them in /target/classes/software/amazon/cloudformation/<project_name>. There's HandlerWrapper.class, HandlerWrapper$1.class, HandlerWrapper$2.class, HandlerWrapper$3.class.
Also, my build steps have been as follows:
1. cfn generate
2. Build project in IntelliJ Idea
3. sam local invoke TestEntrypoint --event sam-tests/create.json
Any help to troubleshoot / fix this would be greatly appreciated.
[1] - https://docs.aws.amazon.com/cloudformation-cli/latest/userguide/resource-type-walkthrough.html
- Lingua principale
- Java
- Stelle
- 30
- Fork
- 48
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di aws-cloudformation/cloudformation-cli-java-plugin
-
Runtime compatibility issue Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
aws-cloudformation/cloudformation-cli-java-plugin#415 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 20/100
-
injectCredentialsAndInvokeV2 method in proxy class doesn't support API's like PutObject from S3. Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
Tutte le issue di aws-cloudformation/cloudformation-cli-java-plugin
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
checkstyle/test-configs#263 ·
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
apache/cloudstack#14222 ·
-
[BUG]茶杯方块在取茶时会引发崩溃 Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
Cannot differ own consent and managed consents in My Consents view and detailed consent view. Aperta1.0.0-alpha2 Type/Improvement
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
wso2/dpdp-accelerator#272 ·