Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/clojure/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Clojure 与Datomic won';不编译_Clojure_Datomic - Fatal编程技术网

Clojure 与Datomic won';不编译

Clojure 与Datomic won';不编译,clojure,datomic,Clojure,Datomic,我正在设置一个compojure应用程序,我想让datomic作为我的数据库-但一旦我添加了client-pro依赖项,我的应用程序就不会运行了 以下是我所做的: 注册帐户 下载的datomic pro 创建了一个Transactior.properties,并使用我在电子邮件中收到的许可证密钥对其进行了更新 运行bin/transactior transactior.properties 打开另一个选项卡,并创建了一个数据库: 在另一个选项卡上启动对等服务器 将[com.datomic/cli

我正在设置一个compojure应用程序,我想让datomic作为我的数据库-但一旦我添加了
client-pro
依赖项,我的应用程序就不会运行了

以下是我所做的:

  • 注册帐户
  • 下载的
    datomic pro
  • 创建了一个
    Transactior.properties
    ,并使用我在电子邮件中收到的
    许可证密钥对其进行了更新
  • 运行
    bin/transactior transactior.properties
  • 打开另一个选项卡,并创建了一个数据库:
  • 在另一个选项卡上启动对等服务器
  • [com.datomic/client-pro“0.8.28”]
    添加到我的依赖项中
  • 运行
    lein-ring server
    时,我遇到以下错误:

    Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.util.thread.NonBlockingThread
    
    快速靠边站 这不是一个直接的答案,但如果您只是想快速启动Datomic,您可以在此处克隆Tupelo Datomic repo:

    它包括Datomic Free的预配置版本。只需运行
    lein test
    ,即可查看它的运行情况。然后可以添加自己的代码


    关于码头 欧文的答案可能就是你所需要的。另一种可能性是,您可能需要在特定版本中添加可传递依赖项,并在其他版本中使用
    :exclude
    。还请注意,在
    project.clj
    中,必须在文件顶部列出重要的deps,因为这些deps版本(及其可传递的deps版本)将覆盖以后指定的任何deps版本

    我在
    project.clj
    中有一个项目的lein DEP:

      :exclusions [cheshire
                   com.cognitect/transit-clj
                   com.cognitect/transit-cljs
                   com.cognitect/transit-java
                   com.cognitect/transit-js
                   com.fasterxml.jackson.core/jackson-core
                   com.fasterxml.jackson.core/jackson-databind
                   com.fasterxml.jackson.dataformat/jackson-dataformat-cbor
                   com.fasterxml.jackson.dataformat/jackson-dataformat-smile
                   joda-time/joda-time
                   org.eclipse.jetty/jetty-server]
    
      :dependencies [
                     ; fundamental items must come first to override later transitive dependencies
                     [cheshire "5.8.1"]
                     [com.cognitect/transit-clj "0.8.313"]
                     [com.cognitect/transit-cljs "0.8.256"]
                     [com.cognitect/transit-java "0.8.337"]
                     [com.cognitect/transit-js "0.8.861"]
                     [com.fasterxml.jackson.core/jackson-core "2.9.9"]
                     [com.fasterxml.jackson.core/jackson-databind "2.9.9"]
                     [com.fasterxml.jackson.dataformat/jackson-dataformat-cbor "2.9.9"]
                     [com.fasterxml.jackson.dataformat/jackson-dataformat-smile "2.9.9"]
                     [joda-time/joda-time "2.10.3"]
                     [org.clojure/clojure "1.10.1"]
                     [org.eclipse.jetty/jetty-server "9.4.19.v20190610"]
    
    然后是第二级DEP的列表:

                     ; high-priority libs, ensure these versions override any transitive dependency versions
                     [binaryage/devtools "0.9.10"]
                     [binaryage/oops "0.7.0"]
                     [com.andrewmcveigh/cljs-time "0.5.2"]
                     [com.cemerick/url "0.1.1"]
                     [org.clojure/core.async "0.4.500" :exclusions [org.clojure/tools.reader]]
                     [org.clojure/core.match "0.3.0"]
                     [org.clojure/test.check "0.9.0"]
                     [org.clojure/tools.cli "0.4.2"]
                     [org.clojure/tools.logging "0.5.0"]
                     [org.clojure/tools.nrepl "0.2.13"] ; #todo #awt upgrade => [nrepl "0.3.1"] from https://github.com/nrepl/nrepl
                     [prismatic/schema "1.1.11"]
                     [tupelo "0.9.144"]
                     [venantius/accountant "0.2.4"]
    
                     ; "normal" dependency libs, whose transitive dependencies can be overridden by previous libs
                     [ch.qos.logback/logback-classic "1.2.3"]
                     [clj-http "3.10.0"]
                     [clj-time "0.15.1"] ; #todo switch to java.time & tupelo.java-time
                     [cljsjs/cytoscape "3.1.4-0"]
                     [com.amazonaws/aws-java-sdk "1.11.602" :exclusions [joda-time]]
                     [com.taoensso/carmine "2.19.1"]
                     [compojure "1.6.1"]
                     [cprop "0.1.14"]
                     [expound "0.7.2"]
                     [funcool/struct "1.4.0"]
                     [io.janusplatform/janus-environment-config "1.8.7-SNAPSHOT"]
                     [io.janusplatform/janus-logging-java "1.0.11-SNAPSHOT" :exclusions [com.google.guava/guava]]
                     [io.janusplatform/janus-resource-connector "4.3.0-SNAPSHOT"]
                     [jayq "2.5.5"]
                     [luminus-jetty "0.1.7" ]
                     [luminus-nrepl "0.1.6"]
                     [luminus/ring-ttl-session "0.3.3"]
                     [markdown-clj "1.10.0"]
                     [metosin/muuntaja "0.2.1"]
                     [metosin/ring-http-response "0.9.1"]
                     [metosin/spec-tools "0.10.0"]
                     [metosin/scjsv "0.5.0"]
                     [metrics-clojure-ring "2.10.0"]
                     [mount "0.1.16"]
                     [org.webjars/bootstrap "4.3.1"]
                     [org.webjars/font-awesome "5.9.0"]
                     [overtone/at-at "1.2.0"]
                     [ring-webjars "0.2.0"]
                     [ring/ring-codec "1.1.2"]
                     [ring/ring-core "1.7.1"]
                     [ring/ring-defaults "0.3.2"]
                     [ring/ring-json "0.4.0"]
                     [throttler "1.0.0"]
    
    然后是第三层DEP:

                     ; high-priority libs, ensure these versions override any transitive dependency versions
                     [binaryage/devtools "0.9.10"]
                     [binaryage/oops "0.7.0"]
                     [com.andrewmcveigh/cljs-time "0.5.2"]
                     [com.cemerick/url "0.1.1"]
                     [org.clojure/core.async "0.4.500" :exclusions [org.clojure/tools.reader]]
                     [org.clojure/core.match "0.3.0"]
                     [org.clojure/test.check "0.9.0"]
                     [org.clojure/tools.cli "0.4.2"]
                     [org.clojure/tools.logging "0.5.0"]
                     [org.clojure/tools.nrepl "0.2.13"] ; #todo #awt upgrade => [nrepl "0.3.1"] from https://github.com/nrepl/nrepl
                     [prismatic/schema "1.1.11"]
                     [tupelo "0.9.144"]
                     [venantius/accountant "0.2.4"]
    
                     ; "normal" dependency libs, whose transitive dependencies can be overridden by previous libs
                     [ch.qos.logback/logback-classic "1.2.3"]
                     [clj-http "3.10.0"]
                     [clj-time "0.15.1"] ; #todo switch to java.time & tupelo.java-time
                     [cljsjs/cytoscape "3.1.4-0"]
                     [com.amazonaws/aws-java-sdk "1.11.602" :exclusions [joda-time]]
                     [com.taoensso/carmine "2.19.1"]
                     [compojure "1.6.1"]
                     [cprop "0.1.14"]
                     [expound "0.7.2"]
                     [funcool/struct "1.4.0"]
                     [io.janusplatform/janus-environment-config "1.8.7-SNAPSHOT"]
                     [io.janusplatform/janus-logging-java "1.0.11-SNAPSHOT" :exclusions [com.google.guava/guava]]
                     [io.janusplatform/janus-resource-connector "4.3.0-SNAPSHOT"]
                     [jayq "2.5.5"]
                     [luminus-jetty "0.1.7" ]
                     [luminus-nrepl "0.1.6"]
                     [luminus/ring-ttl-session "0.3.3"]
                     [markdown-clj "1.10.0"]
                     [metosin/muuntaja "0.2.1"]
                     [metosin/ring-http-response "0.9.1"]
                     [metosin/spec-tools "0.10.0"]
                     [metosin/scjsv "0.5.0"]
                     [metrics-clojure-ring "2.10.0"]
                     [mount "0.1.16"]
                     [org.webjars/bootstrap "4.3.1"]
                     [org.webjars/font-awesome "5.9.0"]
                     [overtone/at-at "1.2.0"]
                     [ring-webjars "0.2.0"]
                     [ring/ring-codec "1.1.2"]
                     [ring/ring-core "1.7.1"]
                     [ring/ring-defaults "0.3.2"]
                     [ring/ring-json "0.4.0"]
                     [throttler "1.0.0"]
    
    以及一些杂项部门:

                     [amazonica "0.3.145" :exclusions [com.amazonaws/aws-java-sdk
                                                       com.fasterxml.jackson.core/jackson-core
                                                       com.fasterxml.jackson.dataformat/jackson-dataformat-cbor
                                                       org.apache.httpcomponents/httpclient]]    ; #todo do we really need all these exclusions???
    
                     [cljs-ajax "0.8.0" :exclusions [cheshire
                                                     com.cognitect/transit-clj
                                                     com.cognitect/transit-java
                                                     org.apache.httpcomponents/httpasyncclient
                                                     org.apache.httpcomponents/httpcore
                                                     org.msgpack/msgpack]]    ; #todo do we really need all these exclusions???
    
                     [org.springframework/spring-webmvc "5.1.8.RELEASE" :exclusions [org.springframework/spring-jcl
                                                                                     org.springframework/spring-aop]]
                     ]
    
    您还可以看到,我必须排除Jetty,以防止可传递依赖项引入错误的版本,然后专门添加我想要的版本。

    这不是一个直接的答案,但如果您只是想快速启动Datomic,您可以在此处克隆Tupelo Datomic repo:

    它包括Datomic Free的预配置版本。只需运行
    lein test
    ,即可查看它的运行情况。然后可以添加自己的代码


    关于码头 欧文的答案可能就是你所需要的。另一种可能性是,您可能需要在特定版本中添加可传递依赖项,并在其他版本中使用
    :exclude
    。还请注意,在
    project.clj
    中,必须在文件顶部列出重要的deps,因为这些deps版本(及其可传递的deps版本)将覆盖以后指定的任何deps版本

    我在
    project.clj
    中有一个项目的lein DEP:

      :exclusions [cheshire
                   com.cognitect/transit-clj
                   com.cognitect/transit-cljs
                   com.cognitect/transit-java
                   com.cognitect/transit-js
                   com.fasterxml.jackson.core/jackson-core
                   com.fasterxml.jackson.core/jackson-databind
                   com.fasterxml.jackson.dataformat/jackson-dataformat-cbor
                   com.fasterxml.jackson.dataformat/jackson-dataformat-smile
                   joda-time/joda-time
                   org.eclipse.jetty/jetty-server]
    
      :dependencies [
                     ; fundamental items must come first to override later transitive dependencies
                     [cheshire "5.8.1"]
                     [com.cognitect/transit-clj "0.8.313"]
                     [com.cognitect/transit-cljs "0.8.256"]
                     [com.cognitect/transit-java "0.8.337"]
                     [com.cognitect/transit-js "0.8.861"]
                     [com.fasterxml.jackson.core/jackson-core "2.9.9"]
                     [com.fasterxml.jackson.core/jackson-databind "2.9.9"]
                     [com.fasterxml.jackson.dataformat/jackson-dataformat-cbor "2.9.9"]
                     [com.fasterxml.jackson.dataformat/jackson-dataformat-smile "2.9.9"]
                     [joda-time/joda-time "2.10.3"]
                     [org.clojure/clojure "1.10.1"]
                     [org.eclipse.jetty/jetty-server "9.4.19.v20190610"]
    
    然后是第二级DEP的列表:

                     ; high-priority libs, ensure these versions override any transitive dependency versions
                     [binaryage/devtools "0.9.10"]
                     [binaryage/oops "0.7.0"]
                     [com.andrewmcveigh/cljs-time "0.5.2"]
                     [com.cemerick/url "0.1.1"]
                     [org.clojure/core.async "0.4.500" :exclusions [org.clojure/tools.reader]]
                     [org.clojure/core.match "0.3.0"]
                     [org.clojure/test.check "0.9.0"]
                     [org.clojure/tools.cli "0.4.2"]
                     [org.clojure/tools.logging "0.5.0"]
                     [org.clojure/tools.nrepl "0.2.13"] ; #todo #awt upgrade => [nrepl "0.3.1"] from https://github.com/nrepl/nrepl
                     [prismatic/schema "1.1.11"]
                     [tupelo "0.9.144"]
                     [venantius/accountant "0.2.4"]
    
                     ; "normal" dependency libs, whose transitive dependencies can be overridden by previous libs
                     [ch.qos.logback/logback-classic "1.2.3"]
                     [clj-http "3.10.0"]
                     [clj-time "0.15.1"] ; #todo switch to java.time & tupelo.java-time
                     [cljsjs/cytoscape "3.1.4-0"]
                     [com.amazonaws/aws-java-sdk "1.11.602" :exclusions [joda-time]]
                     [com.taoensso/carmine "2.19.1"]
                     [compojure "1.6.1"]
                     [cprop "0.1.14"]
                     [expound "0.7.2"]
                     [funcool/struct "1.4.0"]
                     [io.janusplatform/janus-environment-config "1.8.7-SNAPSHOT"]
                     [io.janusplatform/janus-logging-java "1.0.11-SNAPSHOT" :exclusions [com.google.guava/guava]]
                     [io.janusplatform/janus-resource-connector "4.3.0-SNAPSHOT"]
                     [jayq "2.5.5"]
                     [luminus-jetty "0.1.7" ]
                     [luminus-nrepl "0.1.6"]
                     [luminus/ring-ttl-session "0.3.3"]
                     [markdown-clj "1.10.0"]
                     [metosin/muuntaja "0.2.1"]
                     [metosin/ring-http-response "0.9.1"]
                     [metosin/spec-tools "0.10.0"]
                     [metosin/scjsv "0.5.0"]
                     [metrics-clojure-ring "2.10.0"]
                     [mount "0.1.16"]
                     [org.webjars/bootstrap "4.3.1"]
                     [org.webjars/font-awesome "5.9.0"]
                     [overtone/at-at "1.2.0"]
                     [ring-webjars "0.2.0"]
                     [ring/ring-codec "1.1.2"]
                     [ring/ring-core "1.7.1"]
                     [ring/ring-defaults "0.3.2"]
                     [ring/ring-json "0.4.0"]
                     [throttler "1.0.0"]
    
    然后是第三层DEP:

                     ; high-priority libs, ensure these versions override any transitive dependency versions
                     [binaryage/devtools "0.9.10"]
                     [binaryage/oops "0.7.0"]
                     [com.andrewmcveigh/cljs-time "0.5.2"]
                     [com.cemerick/url "0.1.1"]
                     [org.clojure/core.async "0.4.500" :exclusions [org.clojure/tools.reader]]
                     [org.clojure/core.match "0.3.0"]
                     [org.clojure/test.check "0.9.0"]
                     [org.clojure/tools.cli "0.4.2"]
                     [org.clojure/tools.logging "0.5.0"]
                     [org.clojure/tools.nrepl "0.2.13"] ; #todo #awt upgrade => [nrepl "0.3.1"] from https://github.com/nrepl/nrepl
                     [prismatic/schema "1.1.11"]
                     [tupelo "0.9.144"]
                     [venantius/accountant "0.2.4"]
    
                     ; "normal" dependency libs, whose transitive dependencies can be overridden by previous libs
                     [ch.qos.logback/logback-classic "1.2.3"]
                     [clj-http "3.10.0"]
                     [clj-time "0.15.1"] ; #todo switch to java.time & tupelo.java-time
                     [cljsjs/cytoscape "3.1.4-0"]
                     [com.amazonaws/aws-java-sdk "1.11.602" :exclusions [joda-time]]
                     [com.taoensso/carmine "2.19.1"]
                     [compojure "1.6.1"]
                     [cprop "0.1.14"]
                     [expound "0.7.2"]
                     [funcool/struct "1.4.0"]
                     [io.janusplatform/janus-environment-config "1.8.7-SNAPSHOT"]
                     [io.janusplatform/janus-logging-java "1.0.11-SNAPSHOT" :exclusions [com.google.guava/guava]]
                     [io.janusplatform/janus-resource-connector "4.3.0-SNAPSHOT"]
                     [jayq "2.5.5"]
                     [luminus-jetty "0.1.7" ]
                     [luminus-nrepl "0.1.6"]
                     [luminus/ring-ttl-session "0.3.3"]
                     [markdown-clj "1.10.0"]
                     [metosin/muuntaja "0.2.1"]
                     [metosin/ring-http-response "0.9.1"]
                     [metosin/spec-tools "0.10.0"]
                     [metosin/scjsv "0.5.0"]
                     [metrics-clojure-ring "2.10.0"]
                     [mount "0.1.16"]
                     [org.webjars/bootstrap "4.3.1"]
                     [org.webjars/font-awesome "5.9.0"]
                     [overtone/at-at "1.2.0"]
                     [ring-webjars "0.2.0"]
                     [ring/ring-codec "1.1.2"]
                     [ring/ring-core "1.7.1"]
                     [ring/ring-defaults "0.3.2"]
                     [ring/ring-json "0.4.0"]
                     [throttler "1.0.0"]
    
    以及一些杂项部门:

                     [amazonica "0.3.145" :exclusions [com.amazonaws/aws-java-sdk
                                                       com.fasterxml.jackson.core/jackson-core
                                                       com.fasterxml.jackson.dataformat/jackson-dataformat-cbor
                                                       org.apache.httpcomponents/httpclient]]    ; #todo do we really need all these exclusions???
    
                     [cljs-ajax "0.8.0" :exclusions [cheshire
                                                     com.cognitect/transit-clj
                                                     com.cognitect/transit-java
                                                     org.apache.httpcomponents/httpasyncclient
                                                     org.apache.httpcomponents/httpcore
                                                     org.msgpack/msgpack]]    ; #todo do we really need all these exclusions???
    
                     [org.springframework/spring-webmvc "5.1.8.RELEASE" :exclusions [org.springframework/spring-jcl
                                                                                     org.springframework/spring-aop]]
                     ]
    

    您还可以看到,我必须排除Jetty,以防止可传递依赖项引入错误的版本,然后专门添加我想要的版本。

    可能与冲突的
    依赖项有关。选中
    lein deps:tree
    ,并尝试对环依赖项使用相同的版本。可能必须手动添加类似于
    [org.eclipse.jetty/jetty-util“9.4.17.v20190418”]
    的内容。可能与冲突的
    依赖项有关。选中
    lein deps:tree
    ,并尝试对环依赖项使用相同的版本。可能需要手动添加类似于
    [org.eclipse.jetty/jetty-util“9.4.17.v20190418”]
    的内容。