Clojure API not working

1 view
Skip to first unread message

Mike Travers

unread,
Aug 21, 2014, 9:35:32 PM8/21/14
to sta...@clarkparsia.com
I thought I would try to use the Clojure described here: http://docs.stardog.com/clojure/

But it didn't work, there were many unresolved jar dependencies. 

I saw that there was a later version in Clojars than the one described on the web page (0.5), but it had the same problem

I'm guessing you need to set up a pointer to a Stardog maven repository or something?

Oh OK, I solved this myself, you need to run the mavenInstall script. The page should mention that, and update the version.

Unfortunately now it gets a stack overflow error on startup.

Al Baker

unread,
Aug 21, 2014, 10:20:53 PM8/21/14
to Stardog
Hi Mike,

We'll update the docs to note the Stardog client library installation on startup.  All of the core Stardog java libraries are closed source, and distributed in the zip file. 

Can you describe what you're trying to do that generates the error?  What version of Clojure, lein - and if you're running a lein repl or some other configuration?

I would recommend trying a program such as:

    (use 'stardog.core)
(def c (connect {:db "my-database" :server "snarl://localhost"})) (def results (query c "select ?n { .... }"))


Cheers,
Al





--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
stardog+u...@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en

Al Baker

unread,
Aug 22, 2014, 12:09:55 AM8/22/14
to Stardog
Hi Mike,

I setup a clean development environment and root caused the issue, and it looks like some dependency information causes Leiningen to stack trace error.

To work around this, please use http to connect, and remove the following dependencies:

e.g.:

                 [stardog-clj "0.5" :exclusions [
                        [com.complexible.stardog.protocols.snarl/client]
                        [com.complexible.stardog.reasoning.snarl/client]
                        [com.complexible.stardog.search.snarl/client]
                        [com.complexible.stardog.search.http/client]
                        [com.complexible.stardog.icv.snarl/client]]]


I'll push a 0.6 version of stardog-clj that removes these dependencies for now, and we'll release a 0.7 when they're fixed.

Thanks for reporting this.

Al


Reply all
Reply to author
Forward
0 new messages