On Sunday, 10 January 2016 04:09:45 UTC+5:30, Laws wrote:
>
> Damn. I tried localrepo, just like I have in the past: 
>
> lein localrepo install alexa-skills-kit-1.1.jar alexa-sdk 1.1
>
> and then in project.clj: 
>
>   :dependencies [[org.clojure/clojure "1.6.0"]
>                  [alexa-sdk "1.1"]
>
> but I still ran into configuration issues:
>
> Compiling salesvoice.core
> Exception in thread "main" java.lang.NoClassDefFoundError: 
> org/slf4j/LoggerFactory, compiling:(query.clj:1:1)
>
> Have others dealt with this issue, when using an SDK that uses slf4j? Is 
> there an obvious way to configure this? 
>

Logback natively implements the SLF4j API. I guess including Logback in 
your dependencies and putting in a resources/logback.xml file for 
configuration would do the trick. For example, 
https://github.com/kumarshantanu/logback-bundle (just stick to core-bundle 
for a start) includes several related logback artifacts to make it all work 
together.

Shantanu
 

>
>
>
> On Saturday, January 9, 2016 at 5:17:00 PM UTC-5, Laws wrote:
>>
>> Nevermind. I just noticed they offer a Jar:
>>
>>
>> https://github.com/amzn/alexa-skills-kit-java/tree/master/repo/alexa-skills-kit/alexa-skills-kit/1.1
>>
>> I'll just use that.
>>
>> Ignore this post. 
>>
>>
>> On Saturday, January 9, 2016 at 5:14:51 PM UTC-5, Laws wrote:
>>>
>>> I'm not sure if this is a Clojure question, but I'm not sure where else 
>>> to ask. I've been working on an app for the Amazon Echo. I'm trying to deal 
>>> with this requirement, which I must deal with if I am to get the app into 
>>> the Amazon app store: 
>>>
>>> Check the request signature to verify the authenticity of the request. 
>>> Alexa signs all HTTPS requests.
>>>    
>>>    - The Java library does this verification in the SpeechletServlet class. 
>>>    If you do not use the Java library, you must do this verification 
>>> yourself.
>>>    - If you use the Java library without using the SpeechletServlet class, 
>>>    you can use theSpeechletRequestSignatureVerifier class to do this.
>>>
>>>
>>> For some bizarre reason, Amazon does not make its SDK available via the 
>>> main Maven repository. Many developers have asked Amazon to change this, 
>>> but for now, we have to: 
>>>
>>> git clone g...@github.com:amzn/alexa-skills-kit-java.git
>>>
>>> I thought I could then: 
>>>
>>> cp -r ../../alexa-skills-kit-java/src/* src/java/
>>>
>>> In my project.clj file I have: 
>>>
>>>   :source-paths      ["src/clojure"]
>>>   :java-source-paths ["src/java"]
>>>   :main salesslick.core
>>>   :aot :all
>>>
>>> So all of alexa-skills-kit-java/src is now in my src/java directory. 
>>>
>>> I still end up with these kinds of dependency issues: 
>>>
>>> Compiling 47 source files to 
>>> /Users/lkrubner/projects/salesvoiceapp/salescricket/target/classes
>>> /Users/lkrubner/projects/salesvoiceapp/salescricket/src/java/com/amazon/speech/speechlet/Session.java:16:
>>>  
>>> error: package org.apache.commons.lang3 does not exist
>>> import org.apache.commons.lang3.Validate;
>>> ^
>>> /Users/lkrubner/projects/salesvoiceapp/salescricket/src/java/com/amazon/speech/slu/Intent.java:17:
>>>  
>>> error: package org.apache.commons.lang3 does not exist
>>> import org.apache.commons.lang3.Validate;
>>> ^
>>> /Users/lkrubner/projects/salesvoiceapp/salescricket/src/java/com/amazon/speech/slu/Slot.java:13:
>>>  
>>> error: package org.apache.commons.lang3 does not exist
>>> import org.apache.commons.lang3.Validate;
>>> ^
>>> /Users/lkrubner/projects/salesvoiceapp/salescricket/src/java/com/amazon/speech/speechlet/authentication/ApplicationIdVerifier.java:17:
>>>  
>>> error: package org.slf4j does not exist
>>> import org.slf4j.Logger;
>>> ^
>>> /Users/lkrubner/projects/salesvoiceapp/salescricket/src/java/com/amazon/speech/speechlet/authentication/ApplicationIdVerifier.java:18:
>>>  
>>> error: package org.slf4j does not exist
>>> import org.slf4j.LoggerFactory;
>>> ^
>>> /Users/lkrubner/projects/salesvoiceapp/salescricket/src/java/com/amazon/speech/speechlet/authentication/ApplicationIdVerifier.java:29:
>>>  
>>> error: cannot find symbol
>>> private static final Logger log = 
>>> LoggerFactory.getLogger(ApplicationIdVerifier.class);
>>> ^
>>> symbol: class Logger
>>> location: class ApplicationIdVerifier
>>> /Users/lkrubner/projects/salesvoiceapp/salescricket/src/java/com/amazon/speech/speechlet/IntentRequest.java:15:
>>>  
>>> error: package org.apache.commons.lang3 does not exist
>>> import org.apache.commons.lang3.Validate;
>>> ^
>>>
>>> [shortened to avoid boredom]
>>>
>>>
>>> What would I have to do to get a line such as this to resolve: 
>>>
>>> import org.apache.commons.lang3.Validate;
>>>
>>> ??? 
>>>
>>> I know there are many Clojure developers who also do a great deal of 
>>> Java development, but I am not one of them. I love Clojure/Leinengen 
>>> because most of the time it protects me from this craziness. 
>>>
>>> However, if I knew of an easy way to compile the Amazon SDK on its own, 
>>> then I would be happy to compile it and include it as a Jar. I have 
>>> included Jars before, so I am fairly comfortable with that process. 
>>>
>>> Any suggestions? 
>>>
>>>
>>>
>>>
>>>
>>>
>>>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to