Closed yekkan closed 5 years ago
I was able to do this successfully:
sam init --runtime java8 --dependency-manager gradle --name java-gradle-experiment
cd java-gradle-experiment
# Perfomed the changes you described above
cd HelloWorldFunction
./gradlew buildZip
sam local invoke --no-event HelloWorldFunction
Can you upgrade to the latest version of the AWS SAM CLI and try again? I'm going to close for now as this appears to work, but if you continue to see issues feel free to reopen.
Description
[java8] sam local invoke throws java.lang.ClassNotFoundException when CodeUri points to a zip
Steps to reproduce
Init an example application:
Make following changes in HelloWorldFunction/build.gradle and template.yaml:
Build zip:
Observed result
The zip itself is found:
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
sam --version
: SAM CLI, version 0.16.1python --version
Python 2.7.15rc1docker --version
Docker version 18.06.1-ce, build e68fc7a