请在 2024 Clojure状态调查!中分享您的想法。

欢迎!请参阅关于页面了解此网站的工作原理的更多信息。

0
编译器

嘿,

我想要使用这个 Git 仓库。安装对我来说成功了,但是当我运行 mvn -X exec:java 时,我得到了以下错误

    java.lang.ExceptionInInitializerError
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:293)
    at java.lang.Thread.run (Thread.java:748)
[...]

    Caused by: java.io.FileNotFoundException: Could not locate clojure/spec__init.class, clojure/spec.clj or clojure/spec.cljc on classpath.
    at clojure.lang.RT.load (RT.java:466)
    at clojure.lang.RT.load (RT.java:428)
    at clojure.core$load$fn__6824.invoke (core.clj:6126)
    at clojure.core$load.invokeStatic (core.clj:6125)
    at clojure.core$load.doInvoke (core.clj:6109)
    at clojure.lang.RestFn.invoke (RestFn.java:408)
    at clojure.core$load_one.invokeStatic (core.clj:5908)
    at clojure.core$load_one.invoke (core.clj:5903)
    at clojure.core$load_lib$fn__6765.invoke (core.clj:5948)
    at clojure.core$load_lib.invokeStatic (core.clj:5947)
    at clojure.core$load_lib.doInvoke (core.clj:5928)
    at clojure.lang.RestFn.applyTo (RestFn.java:142)
    at clojure.core$apply.invokeStatic (core.clj:667)
    at clojure.core$load_libs.invokeStatic (core.clj:5985)
    at clojure.core$load_libs.doInvoke (core.clj:5969)
    at clojure.lang.RestFn.applyTo (RestFn.java:137)
    at clojure.core$apply.invokeStatic (core.clj:667)
    at clojure.core$require.invokeStatic (core.clj:6007)
    at clojure.core$require.doInvoke (core.clj:6007)
    at clojure.lang.RestFn.invoke (RestFn.java:408)
    at edu.upc.nlp4bpm_commons.config$eval211$loading__6706__auto____212.invoke (config.clj:1)
    at edu.upc.nlp4bpm_commons.config$eval211.invokeStatic (config.clj:1)
    at edu.upc.nlp4bpm_commons.config$eval211.invoke (config.clj:1)
    at clojure.lang.Compiler.eval (Compiler.java:7176)
    at clojure.lang.Compiler.eval (Compiler.java:7165)
    at clojure.lang.Compiler.load (Compiler.java:7635)
    at clojure.lang.RT.loadResourceScript (RT.java:381)
    at clojure.lang.RT.loadResourceScript (RT.java:372)
    at clojure.lang.RT.load (RT.java:463)
    at clojure.lang.RT.load (RT.java:428)
    at clojure.core$load$fn__6824.invoke (core.clj:6126)
    at clojure.core$load.invokeStatic (core.clj:6125)
    at clojure.core$load.doInvoke (core.clj:6109)
    at clojure.lang.RestFn.invoke (RestFn.java:408)
    at clojure.core$load_one.invokeStatic (core.clj:5908)
    at clojure.core$load_one.invoke (core.clj:5903)
    at clojure.core$load_lib$fn__6765.invoke (core.clj:5948)
    at clojure.core$load_lib.invokeStatic (core.clj:5947)
    at clojure.core$load_lib.doInvoke (core.clj:5928)
    at clojure.lang.RestFn.applyTo (RestFn.java:142)
    at clojure.core$apply.invokeStatic (core.clj:667)
    at clojure.core$load_libs.invokeStatic (core.clj:5985)
    at clojure.core$load_libs.doInvoke (core.clj:5969)
    at clojure.lang.RestFn.applyTo (RestFn.java:137)
    at clojure.core$apply.invokeStatic (core.clj:667)
    at clojure.core$require.invokeStatic (core.clj:6007)
    at clojure.core$require.doInvoke (core.clj:6007)
    at clojure.lang.RestFn.invoke (RestFn.java:482)
    at du.upc.nlp4bpm_commons.freeling_api$eval150$loading__6706__auto____151.invoke (freeling_api.clj:1)
    at edu.upc.nlp4bpm_commons.freeling_api$eval150.invokeStatic (freeling_api.clj:1)
    at edu.upc.nlp4bpm_commons.freeling_api$eval150.invoke (freeling_api.clj:1)
    at clojure.lang.Compiler.eval (Compiler.java:7176)
    at clojure.lang.Compiler.eval (Compiler.java:7165)
    at clojure.lang.Compiler.load (Compiler.java:7635)
    at clojure.lang.RT.loadResourceScript (RT.java:381)
    at clojure.lang.RT.loadResourceScript (RT.java:372)
    at clojure.lang.RT.load (RT.java:463)
    at clojure.lang.RT.load (RT.java:428)
    at clojure.core$load$fn__6824.invoke (core.clj:6126)
    at clojure.core$load.invokeStatic (core.clj:6125)
    at clojure.core$load.doInvoke (core.clj:6109)
    at clojure.lang.RestFn.invoke (RestFn.java:408)
    at clojure.core$load_one.invokeStatic (core.clj:5908)
    at clojure.core$load_one.invoke (core.clj:5903)
    at clojure.core$load_lib$fn__6765.invoke (core.clj:5948)
    at clojure.core$load_lib.invokeStatic (core.clj:5947)
    at clojure.core$load_lib.doInvoke (core.clj:5928)
    at clojure.lang.RestFn.applyTo (RestFn.java:142)
    at clojure.core$apply.invokeStatic (core.clj:667)
    at clojure.core$load_libs.invokeStatic (core.clj:5985)
    at clojure.core$load_libs.doInvoke (core.clj:5969)
    at clojure.lang.RestFn.applyTo (RestFn.java:137)
    at clojure.core$apply.invokeStatic (core.clj:667)
    at clojure.core$require.invokeStatic (core.clj:6007)
    at clojure.core$require.doInvoke (core.clj:6007)
    at clojure.lang.RestFn.invoke (RestFn.java:408)
    at clojure.lang.Var.invoke (Var.java:384)
    at edu.upc.modelvsdocument.StandaloneMain.require (StandaloneMain.java:23)
    at edu.upc.modelvsdocument.StandaloneMain.<clinit> (StandaloneMain.java:12)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:293)
    at java.lang.Thread.run (Thread.java:748)
   

配置.clj 文件看起来像这样

    (ns edu.upc.modelvsdocument.config
  (:use [edu.upc.modelvsdocument.utils]
        [com.rpl.specter]
        [edu.upc.modelvsdocument.schemas]
        [edu.upc.modelvsdocument.utils]
        [clojure.pprint])
  (:require [clojure.java.io :as io]
            [clojure.spec :as spec]
            [clojure.spec.test :as stest]
            [edu.upc.modelvsdocument.schemas :as t :refer :all]
            [clojure.walk :as walk]))

我读了很多关于 clojure/spec/alpha__init.class 的内容,但不知道这是否与我的问题有关。请为这位急需的 Clojure 新手提供一些智慧:)

mvn 和 clojure 版本

Apache Maven 3.6.3
Maven home: /usr/share/maven
Java version: 1.8.0_292, vendor: Private Build, runtime: /usr/lib/jvm/java-8-openjdk-amd64/jre
Default locale: en, platform encoding: UTF-8
OS name: "linux", version: "5.10.16.3-microsoft-standard-wsl2", arch: "amd64", family: "unix"

Clojure CLI version 1.10.3.1040

2 个回答

0

我们非常乐意在 #clojurians slack 中帮助您,但我觉得这会包括很多关于您的设置和Clojure基础信息的来回交流,而这并不适合使用这个问答网站。

http://clojurians.net/

好的,感谢您的建议!:
0

我的假设是你在使用 Clojure 1.9+,但没有包含它所依赖的 spec.alpha 和 core.specs.alpha 库。

正如 Justin 在另一个答案中所说的,在 Clojurians slack 上获得交互式帮助可能更容易。

...