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

hello i try to develope a alexa skill using this example but i get this error #56

Closed
Pemboura opened this issue Jul 19, 2017 · 4 comments

Comments

@Pemboura
Copy link

org/slf4j/LoggerFactory: java.lang.NoClassDefFoundError
java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
at mensathm.MensaThmSpeechlet.(MensaThmSpeechlet.java:25)
at mensathm.MensaThmSpeechletRequestStreamHandler.(MensaThmSpeechletRequestStreamHandler.java:28)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 6 more

@Vest
Copy link

Vest commented Jul 19, 2017

It might happen that your project doesn't have the library slf4j in the build and/or class path. If you use Maven, please be sure that you have this library in pom.xml. E.g.

	<dependency>
		<groupId>org.slf4j</groupId>
		<artifactId>slf4j-api</artifactId>
		<version>[1.7,)</version>
		<scope>provided</scope>
	</dependency>

If you tell few words about your project and the way how you run it, somebody will give you a better answer.
p.s. please rename the issue and put more info into the description text. It doesn't look nice.

@Pemboura
Copy link
Author

Pemboura commented Aug 4, 2017

thx for it is Work!
now i try to write a sample Methode that alexa can ask me to choice one city. i just definit 2 cities in Slot types, but i get this failure ich i work it.
" the response is invalid" and alexa app tell that the response can not be null.
i need some help
thx

@Vest
Copy link

Vest commented Aug 4, 2017

I appreciate your feedback. It means that the current issue is not an issue anymore, and you would better close it to avoid any possible confusion for everyone.

With your question, please ask it in the corresponding forums. E.g. here. I do not think that using the "issues" tab as a forum is a good idea. Sorry.

Regarding your second question: I suggest you to check that you send a response object rather than null. Try to start from the simple example: one intent, one response, no processing and then increase the complexity of the code. E.g.

@Override
public SpeechletResponse onIntent(IntentRequest request, Session session) throws SpeechletException {
    String speechText = "Hello Vest! I like your reply.";
    SimpleCard card = new SimpleCard();
    card.setTitle("Hello World");
    card.setContent(speechText);

    PlainTextOutputSpeech speech = new PlainTextOutputSpeech();
    speech.setText(speechText);

    return SpeechletResponse.newTellResponse(speech, card);
}

That's all.

@ghost
Copy link

ghost commented Mar 1, 2018

Closing due to inactivity but please feel free to reopen if this issue persists!

@ghost ghost closed this as completed Mar 1, 2018
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants