Skip to content
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
@jfuss

Description

@jfuss

Copy from: aws/aws-sam-cli#1419

Description

Unable to launch AWS SAM LOCAL on MAC with eclipse due to a NPE.

  1. Create the Hello World App in Eclipse, with out any modification.
  2. Follow the steps to install SAM Local
  3. Re launched Eclipse
  4. Right click on the java file and select "Run as" -> "AWS SAM Local"
  5. 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:

  1. sam local start-lambda -t serverless.template
  2. aws lambda invoke --function-name "HelloWorld" --endpoint-url "http://127.0.0.1:3001" --no-verify-ssl out.txt
  3. Output is:
    {
        "StatusCode": 200
    }
    

Details of software:

  1. OS: 10.14.5 (18F132)
  2. sam --version: AM CLI, version 0.22.0
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugWe can reproduce the issue and confirmed it is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions