Hi Everett,

Thanks for the quick response. I've tried updating to 1.6.2-incubating but 
still seem to receive the same error.

From inside the compiled jar I tried calling:

(clojure.pprint/pprint (.getURLs (java.lang.ClassLoader/getSystemClassLoader))).

This was the result:

[#<URL 
file:/Users/max/Documents/projects/my-app/target/my-app-0.1.0-SNAPSHOT-standalone.jar>]

I'm wondering if this could have something to do with AOT complication given 
that it works fine from the repl?

Thanks,


Max

On Sep 7, 2013, at 7:28 PM, Everett Toews <everett.to...@rackspace.com> wrote:

> It means that the cloudfiles-us JAR isn't contained on your classpath. 
> Although [org.jclouds/jclouds-allblobstore "1.6.0"] should contain it. Can 
> you list your classpath from within your app or see what leiningen is using 
> for the classpath?
> 
> You might also want to try [org.apache.jclouds/jclouds-allblobstore 
> "1.6.2-incubating"] as that's our most recent release.
> 
> HTH,
> Everett
> 
> 
> On Sep 7, 2013, at 9:12 PM, Max Countryman wrote:
> 
>> Hi all,
>> 
>> I am attempting to compile a jar via leiningen's uberjar command that uses 
>> JCloud's org.jclouds.blobstore2.
>> 
>> The trouble I'm running into is that it seems the providers list isn't 
>> populated. Interestingly this works fine from the repl, but the compiled jar 
>> throws this error:
>> 
>> Exception in thread "main" java.util.NoSuchElementException: key 
>> [cloudfiles-us] not in the list of providers or apis: 
>> {providers=[hpcloud-objectstorage], apis=[atmos]}
>>      at org.jclouds.ContextBuilder.newBuilder(ContextBuilder.java:178)
>>      at org.jclouds.blobstore2$blobstore.doInvoke(blobstore2.clj:103)
>>      at clojure.lang.RestFn.invoke(RestFn.java:445)
>>      at stint_uploader.core$_main.invoke(core.clj:40)
>>      at clojure.lang.AFn.applyToHelper(AFn.java:159)
>>      at clojure.lang.AFn.applyTo(AFn.java:151)
>>      at stint_uploader.core.main(Unknown Source)
>> 
>> Here's a simple example:
>> 
>> (ns my-app.core
>> (:require [org.jclouds.blobstore2 :refer :all])
>> (:gen-class))
>> 
>> (defn -main []
>> (blobstore "cloudfiles-us" "foo" "bar"))
>> 
>> And the project.clj would look something like:
>> 
>> (defproject my-app "0.1.0-SNAPSHOT"
>> :description "FIXME: write description"
>> :url "http://example.com/FIXME";
>> :license {:name "Eclipse Public License"
>>           :url "http://www.eclipse.org/legal/epl-v10.html"}
>> :dependencies [[org.clojure/clojure "1.4.0"]
>>                [org.clojure/tools.logging "0.2.3"]
>>                [org.clojure/core.incubator "0.1.0"]
>>                [org.jclouds/jclouds-allblobstore "1.6.0"]]
>> :main my-app.core)
>> 
>> Any advice is greatly appreciated,
>> 
>> Thanks,
>> 
>> 
>> Max
> 

Reply via email to