Clojure, Stardog and stardog-clj

Using this repo, I’m getting the REPL output below (error at the bottom). I tried following the directions:

Usage

To use stardog-clj, follow these simple steps:

  1. Download Stardog, and unzip it
  2. In the Stardog distribution’s bin folder, run the mavenInstall script
  3. In your application, add the stardog-clj dependency to your project.clj file, or equivalent build tool. For example, [stardog-clj "4.2.1"]
  4. Note that stardog-clj uses the HTTP binding by default, so make a datasource using an HTTP URL for the database. (create-db-spec "inventory" "http://localhost:5820/" "admin" "admin" "none")
  5. If you want to switch from HTTP to the SNARL protocol, add the SNARL depenendeices. See the Maven documentation for the different dependency options.
  6. Note that the reasoning dependency is already available, so feel free to change the reasoning level in your datasource configuration, e.g. (create-db-spec "inventory" "http://localhost:5820/" "admin" "admin" "SL") will create a database spec with the Stardog Level of reasoning.

Out of the box, Stardog provides a Java API, SNARL, for communicating with the Stardog database. SNARL is a connection oriented API, with both a connection and connection pool available, similar to JDBC. Queries can be made using the SPARQL query language, or by using various SNARL APIs for navigating the structure of the data. Stardog-clj provides APIs to do all of these functions using idiomatic clojure style of programming. The API builds upon itself, being able to wrap usage with connection pools, create connections directly, etc.

but could not figure out step #2. Here is my project file (from the repo):

  (defproject stardog-clojure "0.1.0-SNAPSHOT"
  :description "TODO"
  :url "TODO"
  :license {:name "TODO: Choose a license"
            :url  "http://choosealicense.com/"}
  :dependencies [[org.clojure/clojure "1.8.0"]
                 [stardog-clj "4.2.1"]
                 [com.stuartsierra/component "0.3.2"]]
  :main ^:skip-aot stardog-clojure.core
  :target-path "target/%s"
  :profiles {:dev     {:dependencies [[org.clojure/tools.namespace "0.2.11"]
                                      [com.stuartsierra/component.repl "0.2.0"]]
                       :source-paths ["dev"]}
             :uberjar {:aot :all}})

I see a ton of Stardog stuff with lein classpath. Just for good measure, I tried lein run and got the same results.

--------------------start REPL output---------------------------
Starting nREPL server…
/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/bin/java -Dfile.encoding=UTF-8 -XX:-OmitStackTraceInFastThrow -Dclojure.compile.path=/Users/chipnowacek/IdeaProjects/stardog-clojure/target/base+system+user+dev+repl/classes -Dstardog-clojure.version=0.1.0-SNAPSHOT -Dclojure.debug=false -Didea.launcher.port=7536 “-Didea.launcher.bin.path=/Applications/IntelliJ IDEA CE.app/Contents/bin” -classpath “/Users/chipnowacek/IdeaProjects/stardog-clojure/test:/Users/chipnowacek/IdeaProjects/stardog-clojure/dev:/Users/chipnowacek/IdeaProjects/stardog-clojure/src:/Users/chipnowacek/IdeaProjects/stardog-clojure/dev-resources:/Users/chipnowacek/IdeaProjects/stardog-clojure/resources:/Users/chipnowacek/IdeaProjects/stardog-clojure/target/base+system+user+dev+repl/classes:/Users/chipnowacek/.m2/repository/org/apache/commons/commons-compress/1.6/commons-compress-1.6.jar:/Users/chipnowacek/.m2/repository/org/openrdf/sesame/sesame-queryalgebra-model/4.0.0/sesame-queryalgebra-model-4.0.0.jar:/Users/chipnowacek/.m2/repository/org/apache/shiro/shiro-core/1.2.3/shiro-core-1.2.3.jar:/Users/chipnowacek/.m2/repository/org/clojure/clojure/1.8.0/clojure-1.8.0.jar:/Users/chipnowacek/.m2/repository/org/apache/httpcomponents/httpclient/4.4/httpclient-4.4.jar:/Users/chipnowacek/.m2/repository/com/complexible/common/protocols/api/stardog-protocols-api-shared/4.2.1/stardog-protocols-api-shared-4.2.1.jar:/Users/chipnowacek/.m2/repository/com/complexible/stardog/icv/stardog-icv-shared/4.2.1/stardog-icv-shared-4.2.1.jar:/Users/chipnowacek/.m2/repository/org/openrdf/sesame/sesame-rio-datatypes/4.0.0/sesame-rio-datatypes-4.0.0.jar:/Users/chipnowacek/.m2/repository/org/semanticweb/elk/elk-util-common/0.4.2/elk-util-common-0.4.2.jar:/Users/chipnowacek/.m2/repository/org/quartz-scheduler/quartz/2.1.3/quartz-2.1.3.jar:/Users/chipnowacek/.m2/repository/commons-pool/commons-pool/1.6/commons-pool-1.6.jar:/Users/chipnowacek/.m2/repository/org/semanticweb/elk/elk-reasoner/0.4.2/elk-reasoner-0.4.2.jar:/Users/chipnowacek/.m2/repository/org/openrdf/sesame/sesame-queryresultio-binary/4.0.0/sesame-queryresultio-binary-4.0.0.jar:/Users/chipnowacek/.m2/repository/org/openrdf/sesame/sesame-rio-nquads/4.0.0/sesame-rio-nquads-4.0.0.jar:/Users/chipnowacek/.m2/repository/org/semanticweb/elk/elk-util-concurrent/0.4.2/elk-util-concurrent-0.4.2.jar:/Users/chipnowacek/.m2/repository/com/complexible/stardog/protocols/http/stardog-protocols-http-client/4.2.1/stardog-protocols-http-client-4.2.1.jar:/Users/chipnowacek/.m2/repository/com/complexible/common/protocols/api/stardog-protocols-api-server/4.2.1/stardog-protocols-api-server-4.2.1.jar:/Users/chipnowacek/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.6.2/jackson-core-2.6.2.jar:/Users/chipnowacek/.m2/repository/com/google/inject/guice/4.0/guice-4.0.jar:/Users/chipnowacek/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar:/Users/chipnowacek/.m2/repository/org/openrdf/sesame/sesame-rio-trix/4.0.0/sesame-rio-trix-4.0.0.jar:/Users/chipnowacek/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar:/Users/chipnowacek/.m2/repository/com/complexible/stardog/protocols/spec/stardog-protocols-spec-client/4.2.1/stardog-protocols-spec-client-4.2.1.jar:/Users/chipnowacek/.m2/repository/com/complexible/common/protocols/api/stardog-protocols-api-client/4.2.1/stardog-protocols-api-client-4.2.1.jar:/Users/chipnowacek/.m2/repository/com/complexible/stardog/icv/stardog-icv-api_snarl/4.2.1/stardog-icv-api_snarl-4.2.1.jar:/Users/chipnowacek/.m2/repository/org/openrdf/sesame/sesame-queryresultio-text/4.0.0/sesame-queryresultio-text-4.0.0.jar:/Users/chipnowacek/.m2/repository/com/stuartsierra/component/0.3.2/component-0.3.2.jar:/Users/chipnowacek/.m2/repository/org/apache/httpcomponents/httpclient-cache/4.4/httpclient-cache-4.4.jar:/Users/chipnowacek/.m2/repository/org/json/json/20090211/json-20090211.jar:/Users/chipnowacek/.m2/repository/org/apache/logging/log4j/log4j-api/2.4/log4j-api-2.4.jar:/Users/chipnowacek/.m2/repository/org/openrdf/sesame/sesame-queryparser-sparql/4.0.0/sesame-queryparser-sparql-4.0.0.jar:/Users/chipnowacek/.m2/repository/commons-beanutils/commons-beanutils/1.8.3/commons-beanutils-1.8.3.jar:/Users/chipnowacek/.m2/repository/org/clojure/tools.nrepl/0.2.12/tools.nrepl-0.2.12.jar:/Users/chipnowacek/.m2/repository/xerces/xercesImpl/2.11.0/xercesImpl-2.11.0.jar:/Users/chipnowacek/.m2/repository/log4j/log4j/1.2.14/log4j-1.2.14.jar:/Users/chipnowacek/.m2/repository/org/apache/httpcomponents/httpcore/4.4/httpcore-4.4.jar:/Users/chipnowacek/.m2/repository/com/complexible/stardog/watchdog/stardog-watchdog-shared/4.2.1/stardog-watchdog-shared-4.2.1.jar:/Users/chipnowacek/.m2/repository/org/openrdf/sesame/sesame-queryresultio-api/4.0.0/sesame-queryresultio-api-4.0.0.jar:/Users/chipnowacek/.m2/repository/org/openrdf/sesame/sesame-rio-languages/4.0.0/sesame-rio-languages-4.0.0.jar:/Users/chipnowacek/.m2/repository/clojure-complete/clojure-complete/0.2.4/clojure-complete-0.2.4.jar:/Users/chipnowacek/.m2/repository/com/carrotsearch/hppc/0.7.1/hppc-0.7.1.jar:/Users/chipnowacek/.m2/repository/com/complexible/stardog/reasoning/stardog-reasoning-core/4.2.1/stardog-reasoning-core-4.2.1.jar:/Users/chipnowacek/.m2/repository/com/complexible/stardog/reasoning/stardog-reasoning-api/4.2.1/stardog-reasoning-api-4.2.1.jar:/Users/chipnowacek/.m2/repository/com/complexible/stardog/reasoning/stardog-reasoning-shared/4.2.1/stardog-reasoning-shared-4.2.1.jar:/Users/chipnowacek/.m2/repository/com/google/inject/extensions/guice-assistedinject/4.0/guice-assistedinject-4.0.jar:/Users/chipnowacek/.m2/repository/com/complexible/common/cp-openrdf-utils/4.0.1/cp-openrdf-utils-4.0.1.jar:/Users/chipnowacek/.m2/repository/de/schlichtherle/truelicense/truelicense-xml/1.33/truelicense-xml-1.33.jar:/Users/chipnowacek/.m2/repository/com/complexible/bigpacket/stardog-protocols-barc-shared/4.2.1/stardog-protocols-barc-shared-4.2.1.jar:/Users/chipnowacek/.m2/repository/com/complexible/common/cp-common-utils/5.0.3/cp-common-utils-5.0.3.jar:/Users/chipnowacek/.m2/repository/com/complexible/stardog/search/http/stardog-search-protocols-http-client/4.2.1/stardog-search-protocols-http-client-4.2.1.jar:/Users/chipnowacek/.m2/repository/org/tukaani/xz/1.4/xz-1.4.jar:/Users/chipnowacek/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.jar:/Users/chipnowacek/.m2/repository/xml-apis/xml-apis/1.4.01/xml-apis-1.4.01.jar:/Users/chipnowacek/.m2/repository/org/openrdf/sesame/sesame-rio-n3/4.0.0/sesame-rio-n3-4.0.0.jar:/Users/chipnowacek/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.3.3/jackson-databind-2.3.3.jar:/Users/chipnowacek/.m2/repository/com/google/inject/extensions/guice-multibindings/4.0/guice-multibindings-4.0.jar:/Users/chipnowacek/.m2/repository/com/complexible/stardog/icv/stardog-icv-api/4.2.1/stardog-icv-api-4.2.1.jar:/Users/chipnowacek/.m2/repository/com/complexible/stardog/core/stardog/4.2.1/stardog-4.2.1.jar:/Users/chipnowacek/.m2/repository/org/apache/logging/log4j/log4j-iostreams/2.4/log4j-iostreams-2.4.jar:/Users/chipnowacek/.m2/repository/com/complexible/stardog/reasoning/http/stardog-reasoning-protocols-http-client/4.2.1/stardog-reasoning-protocols-http-client-4.2.1.jar:/Users/chipnowacek/.m2/repository/org/openrdf/sesame/sesame-queryresultio-sparqljson/4.0.0/sesame-queryresultio-sparqljson-4.0.0.jar:/Users/chipnowacek/.m2/repository/org/apache/commons/commons-lang3/3.1/commons-lang3-3.1.jar:/Users/chipnowacek/.m2/repository/org/openrdf/sesame/sesame-rio-jsonld/4.0.0/sesame-rio-jsonld-4.0.0.jar:/Users/chipnowacek/.m2/repository/com/complexible/stardog/stardocs/http/stardog-stardocs-protocols-http-client/4.2.1/stardog-stardocs-protocols-http-client-4.2.1.jar:/Users/chipnowacek/.m2/repository/org/semanticweb/elk/elk-util-hashing/0.4.2/elk-util-hashing-0.4.2.jar:/Users/chipnowacek/.m2/repository/org/semanticweb/elk/elk-owl-model/0.4.2/elk-owl-model-0.4.2.jar:/Users/chipnowacek/.m2/repository/com/google/code/gson/gson/2.2.2/gson-2.2.2.jar:/Users/chipnowacek/.m2/repository/org/apache/httpcomponents/fluent-hc/4.4/fluent-hc-4.4.jar:/Users/chipnowacek/.m2/repository/org/semanticweb/elk/elk-util-logging/0.4.2/elk-util-logging-0.4.2.jar:/Users/chipnowacek/.m2/repository/org/openrdf/sesame/sesame-rio-api/4.0.0/sesame-rio-api-4.0.0.jar:/Users/chipnowacek/.m2/repository/com/complexible/stardog/virtual/stardog-virtual-api/4.2.1/stardog-virtual-api-4.2.1.jar:/Users/chipnowacek/.m2/repository/com/complexible/license/license-core/3.0.7/license-core-3.0.7.jar:/Users/chipnowacek/.m2/repository/cider/cider-nrepl/0.15.0-SNAPSHOT/cider-nrepl-0.15.0-SNAPSHOT.jar:/Users/chipnowacek/.m2/repository/org/slf4j/slf4j-api/1.7.12/slf4j-api-1.7.12.jar:/Users/chipnowacek/.m2/repository/org/openrdf/sesame/sesame-util/4.0.0/sesame-util-4.0.0.jar:/Users/chipnowacek/.m2/repository/de/schlichtherle/truelicense/truelicense-core/1.33/truelicense-core-1.33.jar:/Users/chipnowacek/.m2/repository/org/semanticweb/elk/elk-util-collections/0.4.2/elk-util-collections-0.4.2.jar:/Users/chipnowacek/.m2/repository/org/apache/logging/log4j/log4j-core/2.4/log4j-core-2.4.jar:/Users/chipnowacek/.m2/repository/com/complexible/stardog/watchdog/stardog-watchdog-api/4.2.1/stardog-watchdog-api-4.2.1.jar:/Users/chipnowacek/.m2/repository/com/stuartsierra/dependency/0.2.0/dependency-0.2.0.jar:/Users/chipnowacek/.m2/repository/org/semanticweb/elk/elk-util-io/0.4.2/elk-util-io-0.4.2.jar:/Users/chipnowacek/.m2/repository/com/complexible/stardog/stardocs/stardog-stardocs-api/4.2.1/stardog-stardocs-api-4.2.1.jar:/Users/chipnowacek/.m2/repository/javax/inject/javax.inject/1/javax.inject-1.jar:/Users/chipnowacek/.m2/repository/org/openrdf/sesame/sesame-rio-binary/4.0.0/sesame-rio-binary-4.0.0.jar:/Users/chipnowacek/.m2/repository/com/complexible/stardog/search/stardog-search-api/4.2.1/stardog-search-api-4.2.1.jar:/Users/chipnowacek/.m2/repository/com/complexible/stardog/reasoning/protocol/stardog-reasoning-protocols-shared/4.2.1/stardog-reasoning-protocols-shared-4.2.1.jar:/Users/chipnowacek/.m2/repository/org/openrdf/sesame/sesame-rio-turtle/4.0.0/sesame-rio-turtle-4.0.0.jar:/Users/chipnowacek/.m2/repository/org/openrdf/sesame/sesame-queryresultio-sparqlxml/4.0.0/sesame-queryresultio-sparqlxml-4.0.0.jar:/Users/chipnowacek/.m2/repository/org/apache/httpcomponents/httpclient-osgi/4.4/httpclient-osgi-4.4.jar:/Users/chipnowacek/.m2/repository/com/complexible/stardog/icv/http/stardog-icv-protocols-http-client/4.2.1/stardog-icv-protocols-http-client-4.2.1.jar:/Users/chipnowacek/.m2/repository/org/clojure/tools.namespace/0.2.11/tools.namespace-0.2.11.jar:/Users/chipnowacek/.m2/repository/com/complexible/stardog/versioning/stardog-versioning-shared/4.2.1/stardog-versioning-shared-4.2.1.jar:/Users/chipnowacek/.m2/repository/org/openrdf/sesame/sesame-rio-ntriples/4.0.0/sesame-rio-ntriples-4.0.0.jar:/Users/chipnowacek/.m2/repository/com/stuartsierra/component.repl/0.2.0/component.repl-0.2.0.jar:/Users/chipnowacek/.m2/repository/com/complexible/stardog/virtual/http/stardog-virtual-protocols-http-shared/4.2.1/stardog-virtual-protocols-http-shared-4.2.1.jar:/Users/chipnowacek/.m2/repository/org/apache/commons/commons-csv/1.1/commons-csv-1.1.jar:/Users/chipnowacek/.m2/repository/com/complexible/stardog/prov/stardog-prov/4.2.1/stardog-prov-4.2.1.jar:/Users/chipnowacek/.m2/repository/org/semanticweb/elk/elk-owl-implementation/0.4.2/elk-owl-implementation-0.4.2.jar:/Users/chipnowacek/.m2/repository/org/openrdf/sesame/sesame-rio-trig/4.0.0/sesame-rio-trig-4.0.0.jar:/Users/chipnowacek/.m2/repository/org/apache/httpcomponents/httpmime/4.4/httpmime-4.4.jar:/Users/chipnowacek/.m2/repository/org/openrdf/sesame/sesame-rio-rdfjson/4.0.0/sesame-rio-rdfjson-4.0.0.jar:/Users/chipnowacek/.m2/repository/com/complexible/stardog/utils/stardog-utils-rdf/4.2.1/stardog-utils-rdf-4.2.1.jar:/Users/chipnowacek/.m2/repository/org/openrdf/sesame/sesame-query/4.0.0/sesame-query-4.0.0.jar:/Users/chipnowacek/.m2/repository/com/complexible/stardog/protocols/spec/versioning/stardog-versioning-protocols-spec-client/4.2.1/stardog-versioning-protocols-spec-client-4.2.1.jar:/Users/chipnowacek/.m2/repository/com/complexible/common/cp-common-protobuf/1.2/cp-common-protobuf-1.2.jar:/Users/chipnowacek/.m2/repository/javax/activation/activation/1.1/activation-1.1.jar:/Users/chipnowacek/.m2/repository/com/complexible/stardog/versioning/http/stardog-versioning-protocols-http-client/4.2.1/stardog-versioning-protocols-http-client-4.2.1.jar:/Users/chipnowacek/.m2/repository/com/complexible/stardog/watchdog/protocols/stardog-watchdog-protocols-shared/4.2.1/stardog-watchdog-protocols-shared-4.2.1.jar:/Users/chipnowacek/.m2/repository/com/opencsv/opencsv/3.2/opencsv-3.2.jar:/Users/chipnowacek/.m2/repository/javax/mail/mailapi/1.4.3/mailapi-1.4.3.jar:/Users/chipnowacek/.m2/repository/com/github/jsonld-java/jsonld-java/0.7.0/jsonld-java-0.7.0.jar:/Users/chipnowacek/.m2/repository/org/tcrawley/dynapath/0.2.5/dynapath-0.2.5.jar:/Users/chipnowacek/.m2/repository/com/complexible/stardog/stardog-api/4.2.1/stardog-api-4.2.1.jar:/Users/chipnowacek/.m2/repository/com/complexible/stardog/icv/stardog-icv-core/4.2.1/stardog-icv-core-4.2.1.jar:/Users/chipnowacek/.m2/repository/com/complexible/stardog/security/stardog-core-security/4.2.1/stardog-core-security-4.2.1.jar:/Users/chipnowacek/.m2/repository/stardog-clj/stardog-clj/4.2.1/stardog-clj-4.2.1.jar:/Users/chipnowacek/.m2/repository/com/google/inject/extensions/guice-throwingproviders/4.0/guice-throwingproviders-4.0.jar:/Users/chipnowacek/.m2/repository/commons-logging/commons-logging/1.2/commons-logging-1.2.jar:/Users/chipnowacek/.m2/repository/commons-codec/commons-codec/1.9/commons-codec-1.9.jar:/Users/chipnowacek/.m2/repository/com/complexible/stardog/virtual/http/stardog-virtual-protocols-http-client/4.2.1/stardog-virtual-protocols-http-client-4.2.1.jar:/Users/chipnowacek/.m2/repository/com/brsanthu/data-exporter/1.0.4/data-exporter-1.0.4.jar:/Users/chipnowacek/.m2/repository/net/sf/opencsv/opencsv/2.3/opencsv-2.3.jar:/Users/chipnowacek/.m2/repository/com/complexible/stardog/watchdog/http/stardog-watchdog-protocols-http-client/4.2.1/stardog-watchdog-protocols-http-client-4.2.1.jar:/Users/chipnowacek/.m2/repository/org/mindrot/jbcrypt/0.3.1/jbcrypt-0.3.1.jar:/Users/chipnowacek/.m2/repository/org/openrdf/sesame/sesame-model/4.0.0/sesame-model-4.0.0.jar:/Users/chipnowacek/.m2/repository/com/complexible/stardog/versioning/stardog-versioning-api/4.2.1/stardog-versioning-api-4.2.1.jar:/Users/chipnowacek/.m2/repository/commons-math/commons-math/1.2/commons-math-1.2.jar:/Users/chipnowacek/.m2/repository/com/complexible/stardog/protocols/spec/stardog-protocols-spec-shared/4.2.1/stardog-protocols-spec-shared-4.2.1.jar:/Users/chipnowacek/.m2/repository/com/complexible/stardog/protocols/http/stardog-protocols-http-shared/4.2.1/stardog-protocols-http-shared-4.2.1.jar:/Users/chipnowacek/.m2/repository/org/openrdf/sesame/sesame-rio-rdfxml/4.0.0/sesame-rio-rdfxml-4.0.0.jar:/Users/chipnowacek/.m2/repository/com/complexible/stardog/core/stardog-core-shared/4.2.1/stardog-core-shared-4.2.1.jar:/Users/chipnowacek/.m2/repository/org/apache/lucene/lucene-core/5.3.1/lucene-core-5.3.1.jar:/Users/chipnowacek/.m2/repository/com/complexible/stardog/stardocs/stardog-stardocs-shared/4.2.1/stardog-stardocs-shared-4.2.1.jar:/Users/chipnowacek/.m2/repository/org/openrdf/sesame/sesame-queryrender/4.0.0/sesame-queryrender-4.0.0.jar:/Users/chipnowacek/.m2/repository/com/google/guava/guava/18.0/guava-18.0.jar:/Users/chipnowacek/.m2/repository/com/complexible/stardog/virtual/protocols/stardog-virtual-protocols-shared/4.2.1/stardog-virtual-protocols-shared-4.2.1.jar:/Users/chipnowacek/.m2/repository/com/complexible/stardog/utils/stardog-utils-openrdf/4.2.1/stardog-utils-openrdf-4.2.1.jar:/Users/chipnowacek/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.3.0/jackson-annotations-2.3.0.jar:/Users/chipnowacek/.m2/repository/com/complexible/stardog/utils/stardog-utils-common/4.2.1/stardog-utils-common-4.2.1.jar:/Users/chipnowacek/.m2/repository/com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.jar:/Users/chipnowacek/.m2/repository/com/complexible/stardog/stardocs/http/stardog-stardocs-protocols-http-shared/4.2.1/stardog-stardocs-protocols-http-shared-4.2.1.jar:/Users/chipnowacek/.m2/repository/org/openrdf/sesame/sesame-queryparser-api/4.0.0/sesame-queryparser-api-4.0.0.jar:/Users/chipnowacek/.m2/repository/io/netty/netty-all/4.0.32.Final/netty-all-4.0.32.Final.jar:/Applications/IntelliJ IDEA CE.app/Contents/lib/idea_rt.jar” com.intellij.rt.execution.application.AppMain clojure.main -i /private/var/folders/7j/68h0xvds35d6c68zlzvy6ct00000gn/T/form-init4271928085340993986.clj
#error {
:cause Could not locate stardog_clj__init.class or stardog_clj.clj on classpath. Please check that namespaces with dashes use underscores in the Clojure file name.
:via
[{:type clojure.lang.Compiler$CompilerException
:message java.io.FileNotFoundException: Could not locate stardog_clj__init.class or stardog_clj.clj on classpath. Please check that namespaces with dashes use underscores in the Clojure file name., compiling:(stardog_clojure/core.clj:1:1)
:at [clojure.lang.Compiler load Compiler.java 7391]}
{:type java.io.FileNotFoundException
:message Could not locate stardog_clj__init.class or stardog_clj.clj on classpath. Please check that namespaces with dashes use underscores in the Clojure file name.
:at [clojure.lang.RT load RT.java 456]}]
:trace
[[clojure.lang.RT load RT.java 456]
[clojure.lang.RT load RT.java 419]
[clojure.core$load$fn__5677 invoke core.clj 5893]
[clojure.core$load invokeStatic core.clj 5892]
[clojure.core$load doInvoke core.clj 5876]
[clojure.lang.RestFn invoke RestFn.java 408]
[clojure.core$load_one invokeStatic core.clj 5697]
[clojure.core$load_one invoke core.clj 5692]
[clojure.core$load_lib$fn__5626 invoke core.clj 5737]
[clojure.core$load_lib invokeStatic core.clj 5736]
[clojure.core$load_lib doInvoke core.clj 5717]
[clojure.lang.RestFn applyTo RestFn.java 142]
[clojure.core$apply invokeStatic core.clj 648]
[clojure.core$load_libs invokeStatic core.clj 5774]
[clojure.core$load_libs doInvoke core.clj 5758]
[clojure.lang.RestFn applyTo RestFn.java 137]
[clojure.core$apply invokeStatic core.clj 648]
[clojure.core$require invokeStatic core.clj 5796]
[clojure.core$require doInvoke core.clj 5796]
[clojure.lang.RestFn invoke RestFn.java 408]
[stardog_clojure.core$eval44$loading__5569__auto____45 invoke core.clj 1]
[stardog_clojure.core$eval44 invokeStatic core.clj 1]
[stardog_clojure.core$eval44 invoke core.clj 1]
[clojure.lang.Compiler eval Compiler.java 6927]
[clojure.lang.Compiler eval Compiler.java 6916]
[clojure.lang.Compiler load Compiler.java 7379]
[clojure.lang.RT loadResourceScript RT.java 372]
[clojure.lang.RT loadResourceScript RT.java 363]
[clojure.lang.RT load RT.java 453]
[clojure.lang.RT load RT.java 419]
[clojure.core$load$fn__5677 invoke core.clj 5893]
[clojure.core$load invokeStatic core.clj 5892]
[clojure.core$load doInvoke core.clj 5876]
[clojure.lang.RestFn invoke RestFn.java 408]
[clojure.core$load_one invokeStatic core.clj 5697]
[clojure.core$load_one invoke core.clj 5692]
[clojure.core$load_lib$fn__5626 invoke core.clj 5737]
[clojure.core$load_lib invokeStatic core.clj 5736]
[clojure.core$load_lib doInvoke core.clj 5717]
[clojure.lang.RestFn applyTo RestFn.java 142]
[clojure.core$apply invokeStatic core.clj 648]
[clojure.core$load_libs invokeStatic core.clj 5774]
[clojure.core$load_libs doInvoke core.clj 5758]
[clojure.lang.RestFn applyTo RestFn.java 137]
[clojure.core$apply invokeStatic core.clj 648]
[clojure.core$require invokeStatic core.clj 5796]
[clojure.core$require doInvoke core.clj 5796]
[clojure.lang.RestFn invoke RestFn.java 408]
[user$eval35 invokeStatic form-init4271928085340993986.clj 1]
[user$eval35 invoke form-init4271928085340993986.clj 1]
[clojure.lang.Compiler eval Compiler.java 6927]
[clojure.lang.Compiler eval Compiler.java 6916]
[clojure.lang.Compiler eval Compiler.java 6916]
[clojure.lang.Compiler load Compiler.java 7379]
[clojure.lang.Compiler loadFile Compiler.java 7317]
[clojure.main$load_script invokeStatic main.clj 275]
[clojure.main$init_opt invokeStatic main.clj 277]
[clojure.main$init_opt invoke main.clj 277]
[clojure.main$initialize invokeStatic main.clj 308]
[clojure.main$null_opt invokeStatic main.clj 342]
[clojure.main$null_opt invoke main.clj 339]
[clojure.main$main invokeStatic main.clj 421]
[clojure.main$main doInvoke main.clj 384]
[clojure.lang.RestFn invoke RestFn.java 421]
[clojure.lang.Var invoke Var.java 383]
[clojure.lang.AFn applyToHelper AFn.java 156]
[clojure.lang.Var applyTo Var.java 700]
[clojure.main main main.java 37]
[sun.reflect.NativeMethodAccessorImpl invoke0 NativeMethodAccessorImpl.java -2]
[sun.reflect.NativeMethodAccessorImpl invoke NativeMethodAccessorImpl.java 62]
[sun.reflect.DelegatingMethodAccessorImpl invoke DelegatingMethodAccessorImpl.java 43]
[java.lang.reflect.Method invoke Method.java 498]
[com.intellij.rt.execution.application.AppMain main AppMain.java 147]]}
Connecting to local nREPL server…
Clojure 1.8.0
nREPL server started on port 64585 on host 127.0.0.1 - nrepl://127.0.0.1:64585
Loading src/stardog_clojure/core.clj…
CompilerException java.io.FileNotFoundException: Could not locate stardog_clj__init.class or stardog_clj.clj on classpath. Please check that namespaces with dashes use underscores in the Clojure file name., compiling:(/Users/chipnowacek/IdeaProjects/stardog-clojure/src/stardog_clojure/core.clj:1:1)

The mavenInstall was distributed with the Stardog 2.x before there was a publicly available maven repository and would install artifacts from the distribution zip file to your local m2 repo. You can probably skip that step by adding the public maven repo (http://maven.stardog.com) to your project file.

  (defproject stardog-clojure "0.1.0-SNAPSHOT"
  :description "TODO"
  :url "TODO"
  :license {:name "TODO: Choose a license"
            :url  "http://choosealicense.com/"}
  :repositories { "stardog" "http://maven.stardog.com"}
  :dependencies [[org.clojure/clojure "1.8.0"]
                 [stardog-clj "4.2.1"]
                 [com.stuartsierra/component "0.3.2"]]
  :main ^:skip-aot stardog-clojure.core
  :target-path "target/%s"
  :profiles {:dev     {:dependencies [[org.clojure/tools.namespace "0.2.11"]
                                      [com.stuartsierra/component.repl "0.2.0"]]
                       :source-paths ["dev"]}
             :uberjar {:aot :all}})

Hi,

Zachary is correct that http://maven.stardog.com should be used instead of the old mavenInstall script. I have created a ticket for us to update the README on stardog-clj. Thanks for the report!

Thank you. The clojars artifact is different than what’s in maven.stardog.com?

The clojars artifact is the same, but what maven.stardog.com gives you is its dependencies.

Try :repositories {"stardog" {:url "http://maven.stardog.com"}}

Same error. For some reason I’m not allowed to link to the revised file in the repo.

Why is this post being marked as spam?

Why is this post hidden?

Some built in rule about multiple links to same domain (Github in this case) for new posters or something. I deferred it.

Ah. Thank you.

Even with the automatons, congrats on the new system. It’s nice.

Any ideas what I ought to check next? I’m stumped.

I’ve lost track of where you are. What does your project file look like an what problem are you currently having?

Same issue as first reported.

Give this a try and let me know if it works. I think they made a change after 1.x to support ordering repositories.

(defproject stardog-clojure "0.1.0-SNAPSHOT"
  :description "TODO"
  :url "TODO"
  :license {:name "TODO: Choose a license"
            :url  "http://choosealicense.com/"}
  :repositories [["stardog" "http://maven.stardog.com"]]
  :dependencies [[org.clojure/clojure "1.8.0"]
                 [stardog-clj "4.2.1"]
                 [com.stuartsierra/component "0.3.2"]]
  :main ^:skip-aot stardog-clojure.core
  :target-path "target/%s"
  :profiles {:dev     {:dependencies [[org.clojure/tools.namespace "0.2.11"]
                                      [com.stuartsierra/component.repl "0.2.0"]]
                       :source-paths ["dev"]}
             :uberjar {:aot :all}})

Chip,

I did a lein new stardog-clojure, copied in your project.clj and created the following core.clj that works with it. There is one documentation update, which is the reasoning parameter is now a boolean.

Let me know if you have any issues with the below.

Thanks,
Al

Here’s the changed file: project.clj
Here’s what happens when starting the REPL:
#error {
:cause Could not locate stardog_clj__init.class or stardog_clj.clj on classpath. Please check that namespaces with dashes use underscores in the Clojure file name.
:via
[{:type clojure.lang.Compiler$CompilerException
:message java.io.FileNotFoundException: Could not locate stardog_clj__init.class or stardog_clj.clj on classpath. Please check that namespaces with dashes use underscores in the Clojure file name., compiling:(stardog_clojure/core.clj:1:1)
:at [clojure.lang.Compiler load Compiler.java 7391]}
{:type java.io.FileNotFoundException
:message Could not locate stardog_clj__init.class or stardog_clj.clj on classpath. Please check that namespaces with dashes use underscores in the Clojure file name.
:at [clojure.lang.RT load RT.java 456]}]
:trace
[[clojure.lang.RT load RT.java 456]
[clojure.lang.RT load RT.java 419]
[clojure.core$load$fn__5677 invoke core.clj 5893]
[clojure.core$load invokeStatic core.clj 5892]
[clojure.core$load doInvoke core.clj 5876]
[clojure.lang.RestFn invoke RestFn.java 408]
[clojure.core$load_one invokeStatic core.clj 5697]
[clojure.core$load_one invoke core.clj 5692]
[clojure.core$load_lib$fn__5626 invoke core.clj 5737]
[clojure.core$load_lib invokeStatic core.clj 5736]
[clojure.core$load_lib doInvoke core.clj 5717]
[clojure.lang.RestFn applyTo RestFn.java 142]
[clojure.core$apply invokeStatic core.clj 648]
[clojure.core$load_libs invokeStatic core.clj 5774]
[clojure.core$load_libs doInvoke core.clj 5758]
[clojure.lang.RestFn applyTo RestFn.java 137]
[clojure.core$apply invokeStatic core.clj 648]
[clojure.core$require invokeStatic core.clj 5796]
[clojure.core$require doInvoke core.clj 5796]
[clojure.lang.RestFn invoke RestFn.java 408]
[stardog_clojure.core$eval44$loading__5569__auto____45 invoke core.clj 1]
[stardog_clojure.core$eval44 invokeStatic core.clj 1]
[stardog_clojure.core$eval44 invoke core.clj 1]
[clojure.lang.Compiler eval Compiler.java 6927]
[clojure.lang.Compiler eval Compiler.java 6916]
[clojure.lang.Compiler load Compiler.java 7379]
[clojure.lang.RT loadResourceScript RT.java 372]
[clojure.lang.RT loadResourceScript RT.java 363]
[clojure.lang.RT load RT.java 453]
[clojure.lang.RT load RT.java 419]
[clojure.core$load$fn__5677 invoke core.clj 5893]
[clojure.core$load invokeStatic core.clj 5892]
[clojure.core$load doInvoke core.clj 5876]
[clojure.lang.RestFn invoke RestFn.java 408]
[clojure.core$load_one invokeStatic core.clj 5697]
[clojure.core$load_one invoke core.clj 5692]
[clojure.core$load_lib$fn__5626 invoke core.clj 5737]
[clojure.core$load_lib invokeStatic core.clj 5736]
[clojure.core$load_lib doInvoke core.clj 5717]
[clojure.lang.RestFn applyTo RestFn.java 142]
[clojure.core$apply invokeStatic core.clj 648]
[clojure.core$load_libs invokeStatic core.clj 5774]
[clojure.core$load_libs doInvoke core.clj 5758]
[clojure.lang.RestFn applyTo RestFn.java 137]
[clojure.core$apply invokeStatic core.clj 648]
[clojure.core$require invokeStatic core.clj 5796]
[clojure.core$require doInvoke core.clj 5796]
[clojure.lang.RestFn invoke RestFn.java 408]
[user$eval35 invokeStatic form-init3616052878460460881.clj 1]
[user$eval35 invoke form-init3616052878460460881.clj 1]
[clojure.lang.Compiler eval Compiler.java 6927]
[clojure.lang.Compiler eval Compiler.java 6916]
[clojure.lang.Compiler eval Compiler.java 6916]
[clojure.lang.Compiler load Compiler.java 7379]
[clojure.lang.Compiler loadFile Compiler.java 7317]
[clojure.main$load_script invokeStatic main.clj 275]
[clojure.main$init_opt invokeStatic main.clj 277]
[clojure.main$init_opt invoke main.clj 277]
[clojure.main$initialize invokeStatic main.clj 308]
[clojure.main$null_opt invokeStatic main.clj 342]
[clojure.main$null_opt invoke main.clj 339]
[clojure.main$main invokeStatic main.clj 421]
[clojure.main$main doInvoke main.clj 384]
[clojure.lang.RestFn invoke RestFn.java 421]
[clojure.lang.Var invoke Var.java 383]
[clojure.lang.AFn applyToHelper AFn.java 156]
[clojure.lang.Var applyTo Var.java 700]
[clojure.main main main.java 37]]}
Connecting to local nREPL server…
Clojure 1.8.0
nREPL server started on port 60896 on host 127.0.0.1 - nrepl://127.0.0.1:60896

Thanks, Al. Let me give it a whirl.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.