clojure - lein ring server-headless fails when including datomic dependency -


my goal create web application using compojure , attach datomic database. individually, these 2 components work fine. however, when try start server lein ring server-headless (including datomic dependency) enourmous error. head of error output:

exception in thread "main" java.lang.noclassdeffounderror: org/eclipse/jetty/util/component/aggregatelifecycle, compiling:(ring/adapter/jetty.clj:1:1)     @ clojure.lang.compiler.load(compiler.java:7391)     @ 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) 

using project.clj

(defproject pinvest "0.1.0-snapshot"   :description "foobar"   :min-lein-version "2.0.0"   :dependencies [[org.clojure/clojure "1.8.0"]                  [org.clojure/core.async "0.3.442"]                  [org.clojure/tools.namespace "0.2.11"]                  [compojure "1.5.1"]                  [ring/ring-defaults "0.2.1"]                  [com.datomic/clj-client "0.8.606"]]   :plugins [[lein-ring "0.9.7"]]   :ring {:handler pinvest.handler/app}   :profiles   {:dev {:dependencies [[javax.servlet/servlet-api "2.5"]                         [ring/ring-mock "0.3.0"]]}}) 

initially generated lein new compojure foo. dependency com.datomic/clj-client causing problem in starting server.

i tried excluding dependencies, making project.clj with

[com.datomic/clj-client "0.8.606"     :exclusions [org.eclipse.jetty/jetty-http                  org.eclipse.jetty/jetty-util                  org.eclipse.jetty/jetty-client]] 

but results in

clojure.lang.compiler$compilerexception: java.lang.classnotfoundexception: org.eclipse.jetty.client.httpclient, compiling:(cognitect/http_client.clj:1:1) 

any appriciated.

ps. i'm newbie clojure, , these error messages impossible understand

try not use jetty. slack group came similar problem uses combination (http-kit in place of jetty):

[com.datomic/datomic-free "0.9.5544"] [ring/ring-core "1.5.0"] [http-kit "2.2.0"]


Comments

Popular posts from this blog

c# - Update a combobox from a presenter (MVP) -

How to understand 2 main() functions after using uftrace to profile the C++ program? -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -