This repository was archived by the owner on Jul 28, 2023. It is now read-only.
This repository was archived by the owner on Jul 28, 2023. It is now read-only.
Not able to launch AWS SAM LOCAL in MAC because of NPE #163
Open
Description
Copy from: aws/aws-sam-cli#1419
Description
Unable to launch AWS SAM LOCAL on MAC with eclipse due to a NPE.
- Create the Hello World App in Eclipse, with out any modification.
- Follow the steps to install SAM Local
- Re launched Eclipse
- Right click on the java file and select "Run as" -> "AWS SAM Local"
- waited for a bit and then I get a NPE.
Steps to reproduce
Provide steps to replicate.
Observed result
I noticed that I can correctly invoke the app by launching it from the SAM cmd line as such:
sam local start-lambda -t serverless.template
aws lambda invoke --function-name "HelloWorld" --endpoint-url "http://127.0.0.1:3001" --no-verify-ssl out.txt
- Output is:
{ "StatusCode": 200 }
Details of software:
- OS: 10.14.5 (18F132)
- sam --version: AM CLI, version 0.22.0
- DOCKER-desktop: 2.1.0.3
Eclipse LOG
eclipse.buildId=4.12.0.I20190605-1800
java.version=12.0.2
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_CA
Framework arguments: -product org.eclipse.epp.package.jee.product -keyring /Users/Angel/.eclipse_keyring
Command-line arguments: -os macosx -ws cocoa -arch x86_64 -product org.eclipse.epp.package.jee.product -keyring /Users/Angel/.eclipse_keyring
com.amazonaws.eclipse.lambda
Error
Wed Sep 18 22:43:27 EDT 2019
Failed to launch SAM Local.
com.amazonaws.eclipse.core.exceptions.AwsActionException
at com.amazonaws.eclipse.lambda.launching.SamLocalDelegate.launch(SamLocalDelegate.java:159)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:862)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:720)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1020)
at org.eclipse.debug.internal.ui.DebugUIPlugin$2.run(DebugUIPlugin.java:1234)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: java.lang.NullPointerException
at com.amazonaws.eclipse.lambda.launching.SamLocalDelegate.buildSamLocalCommandLine(SamLocalDelegate.java:243)
at com.amazonaws.eclipse.lambda.launching.SamLocalDelegate.launch(SamLocalDelegate.java:105)
... 5 more