gpt4 book ai didi

clojure - Luminus 和重新构建 Uberjar 错误

转载 作者:行者123 更新时间:2023-12-01 23:17:10 25 4
gpt4 key购买 nike

我有一个由 lein new luminus <app-name> +jetty +mongodb +re-frame +cider 生成的小应用程序运行 uberjar 时出错命令。它作为一个开发应用程序通过 lein repl 运行.

由于使用 Datomic,我已经看到类似的错误被归结为依赖项不匹配,但目前我的项目中没有依赖项。

这是通过调用 lein uberjar 生成的堆栈跟踪:

See https://github.com/technomancy/leiningen/wiki/Repeatability)
Retrieving org/clojure/core.async/0.2.374/core.async-0.2.374.jar from central
Retrieving org/clojure/tools.analyzer.jvm/0.6.9/tools.analyzer.jvm-0.6.9.jar from central
Retrieving org/clojure/tools.analyzer/0.6.7/tools.analyzer-0.6.7.jar from central
Compiling myapp.env
Compiling myapp.elastic.common
Compiling myapp.elastic.indexer
Compiling myapp.web.config
Compiling myapp.web.core
Compiling myapp.web.db.core
Compiling myapp.web.handler
Compiling myapp.web.layout
Compiling myapp.web.middleware
Compiling myapp.web.routes.home
Compiling myapp.validation
Compiling ClojureScript...
Retrieving cljsbuild/cljsbuild/1.1.4/cljsbuild-1.1.4.pom from clojars
Retrieving org/clojure/clojurescript/0.0-3211/clojurescript-0.0-3211.pom from central
Retrieving org/clojure/clojure/1.7.0-beta1/clojure-1.7.0-beta1.pom from central
Retrieving cljsbuild/cljsbuild/1.1.4/cljsbuild-1.1.4.jar from clojars
Compiling "target/cljsbuild/public/js/app.js" from ["src/cljc" "src/cljs" "env/prod/cljs"]...
Compiling "target/cljsbuild/public/js/app.js" failed.
Exception in thread "main" java.lang.NoSuchMethodError: com.google.common.base.CharMatcher.javaUpperCase()Lcom/google/common/base/CharMatcher;, compiling:(/private/var/folders/ms/7lyl677n0zz5dnw0wxffj8j00000gn/T/form-init4762266950288731870.clj:1:125)
at clojure.lang.Compiler.load(Compiler.java:7391)
at clojure.lang.Compiler.loadFile(Compiler.java:7317)
at clojure.main$load_script.invokeStatic(main.clj:275)
at clojure.main$init_opt.invokeStatic(main.clj:277)
at clojure.main$init_opt.invoke(main.clj:277)
at clojure.main$initialize.invokeStatic(main.clj:308)
at clojure.main$null_opt.invokeStatic(main.clj:342)
at clojure.main$null_opt.invoke(main.clj:339)
at clojure.main$main.invokeStatic(main.clj:421)
at clojure.main$main.doInvoke(main.clj:384)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:383)
at clojure.lang.AFn.applyToHelper(AFn.java:156)
at clojure.lang.Var.applyTo(Var.java:700)
at clojure.main.main(main.java:37)
Caused by: java.lang.NoSuchMethodError: com.google.common.base.CharMatcher.javaUpperCase()Lcom/google/common/base/CharMatcher;
at com.google.javascript.jscomp.parsing.JsDocInfoParser.validTemplateTypeName(JsDocInfoParser.java:1233)
at com.google.javascript.jscomp.parsing.JsDocInfoParser.parseAnnotation(JsDocInfoParser.java:953)
at com.google.javascript.jscomp.parsing.JsDocInfoParser.parseHelperLoop(JsDocInfoParser.java:290)
at com.google.javascript.jscomp.parsing.JsDocInfoParser.parse(JsDocInfoParser.java:280)
at com.google.javascript.jscomp.parsing.IRFactory.createJsDocInfoParser(IRFactory.java:910)
at com.google.javascript.jscomp.parsing.IRFactory.handleJsDoc(IRFactory.java:692)
at com.google.javascript.jscomp.parsing.IRFactory.handleJsDoc(IRFactory.java:706)
at com.google.javascript.jscomp.parsing.IRFactory.transform(IRFactory.java:766)
at com.google.javascript.jscomp.parsing.IRFactory$TransformDispatcher.processAstRoot(IRFactory.java:1024)
at com.google.javascript.jscomp.parsing.IRFactory$TransformDispatcher.process(IRFactory.java:2712)
at com.google.javascript.jscomp.parsing.IRFactory.transformTree(IRFactory.java:356)
at com.google.javascript.jscomp.parsing.ParserRunner.parse(ParserRunner.java:129)
at com.google.javascript.jscomp.JsAst.parse(JsAst.java:142)
at com.google.javascript.jscomp.JsAst.getAstRoot(JsAst.java:52)
at com.google.javascript.jscomp.CompilerInput.getAstRoot(CompilerInput.java:118)
at com.google.javascript.jscomp.Compiler.parseInputs(Compiler.java:1443)
at com.google.javascript.jscomp.Compiler.parse(Compiler.java:775)
at com.google.javascript.jscomp.Compiler.compileInternal(Compiler.java:731)
at com.google.javascript.jscomp.Compiler.access$000(Compiler.java:83)
at com.google.javascript.jscomp.Compiler$2.call(Compiler.java:698)
at com.google.javascript.jscomp.Compiler$2.call(Compiler.java:695)
at com.google.javascript.jscomp.CompilerExecutor$2.call(CompilerExecutor.java:93)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Uberjar aborting because jar failed: Subprocess failed

最佳答案

我通过将 [com.google.guava/guava "21.0"] 添加到 project.clj 中的 :dependencies 解决了类似的问题>

关于clojure - Luminus 和重新构建 Uberjar 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42276340/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com