5
votes

I'm trying to deploy the Alexa HelloWorld Skill from the samples project here: https://github.com/amzn/alexa-skills-kit-java, on commit b58bfa641c7d58c476b80a4e8dd5ccbe0f9b2c40.

Per the README I run:

mvn assembly:assembly -DdescriptorId=jar-with-dependencies package

and upload the resulting alexa-skills-kit-samples-1.0-jar-with-dependencies.jar to the Lambda console. When I try to test the Lambda (in the web console) I get:

START RequestId: fe219281-be67-11e5-b15e-d79134e05828 Version: $LATEST
Class not found: helloworld.HelloWorldSpeechletRequestStreamHandler: class java.lang.ClassNotFoundException
java.lang.ClassNotFoundException: helloworld.HelloWorldSpeechletRequestStreamHandler
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    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)

END RequestId: fe219281-be67-11e5-b15e-d79134e05828
REPORT RequestId: fe219281-be67-11e5-b15e-d79134e05828  Duration: 0.90 ms   Billed Duration: 100 ms     Memory Size: 512 MB Max Memory Used: 10 MB

What am I missing?

1
Can you verify that the handler class was included in the jar? i.e. unzip -l target/alexa-skills-kit-samples-1.0-jar-with-dependencies.jar should show a file with path helloworld/HelloWorldSpeechletRequestStreamHandler.class.Carlos Macasaet

1 Answers

6
votes

I was also getting the same error.

It seems we need to run the mvn command within the directory"alexa-skills-kit-java-master\samples" and not from "alexa-skills-kit-java-master".

JAR created under "alexa-skills-kit-java-master\samples\target" has the helloworld class and I was able to successfully test the skill.