-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
java.lang.ClassNotFoundException: com.example.StreamLambdaHandler #462
Comments
+1 I'm also running into a similar issue and have a ticket open on the aws-serverless-java-container project here too: aws/serverless-java-container#153 But I also encounter the same error when I do a deploy of the package to aws lambda via cloudFormation. |
@sisiguo thanks for mentioning your ticket aswell. What operating system are you running it in? |
I'm working off Ubuntu in a VMware box w/ this set-up:
|
+1 here too on: Linux Mint 18.1 Cinnamon 64-bit This is really slowing down our Java development! Seems to work okay for JavaScript though |
+1 setup: Ubuntu: 16.0.4 It works for JS and fails for Java. Rolling back onto Sam 0.2.11 works for Java. |
I've created a pull request. Travis CI tests passed. Review needed. :) |
@jfuss not really. The permissions for files inside the temp dir are preserved, but the dir itself is 700 which prevents docker from accessing the files inside. Setting the permissions to 755 or something similar eg. xx[4,5,6,7] works fine. |
@jfuss please note that this is not recursive chmod-ing, just the temp dir (tmpXXXXXX). Cheers! |
Problem is in the tempfile.mkdtemp() function where the dir is created with permissions 700, check this out, it's in the python2.7 source:
So what I did was just a workaround. This bug is not reproducible on Windows because the ntfs driver exposes all files with permissions 777 when accesed from linux host. |
@fl3x1324 Looks like my PR won't solve this problem. Giving 755 permissions to the temp directory doesn't harm and probably helps with read/writability of the folder from within the Docker. Reviewing your PR |
Description:
When executing the spring-boot example:
And running the project (via. sam local start-api --template sam.yaml --debug) results in the following error:
This seems to be an issue specifically with Ubuntu sam/docker (Possibly also with ubuntu version 18.04 specifically). Running the same sam-cli 0.3.0 and docker 18.03.1-ce on OSX works correctly and a response is returned as expected.
The text was updated successfully, but these errors were encountered: