This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-11-27
Channels
- # announcements (7)
- # aws (1)
- # beginners (42)
- # calva (65)
- # clj-kondo (5)
- # cljs-dev (11)
- # clojure (69)
- # clojure-australia (7)
- # clojure-dev (4)
- # clojure-europe (9)
- # clojure-gamedev (2)
- # clojurescript (2)
- # conjure (4)
- # cursive (1)
- # data-science (1)
- # datomic (8)
- # events (1)
- # fulcro (35)
- # graalvm-mobile (40)
- # introduce-yourself (1)
- # lsp (26)
- # malli (14)
- # mathematics (2)
- # missionary (5)
- # nextjournal (4)
- # off-topic (4)
- # polylith (10)
- # shadow-cljs (5)
- # test-doc-blocks (1)
- # tools-build (24)
- # tools-deps (1)
- # xtdb (12)
I am getting
[Use -Dgraal.LogFile=<path> to redirect Graal log output to a file.]
org.graalvm.libgraal.jni.JNIExceptionWrapper: java.lang.NullPointerException
at org.graalvm.compiler.hotspot.management.Factory.unregister(Factory.java:133)
at org.graalvm.compiler.hotspot.management.JMXFromLibGraalEntryPoints.unregister(JMXFromLibGraalEntryPoints.java:66)
...
when running `clj -T:build jar` .@U04V15CAJ you wouldn't know about this one?
I tried clj -J-Dgraal.LogFile=test.log -T:build jar
as well as adding :jvm-opts ["-Dgraal.LogFile=test.log"]
to my build alias.
java -version
gives me
openjdk version "11.0.11" 2021-04-20
OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.20.04)
OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.20.04, mixed mode, sharing)
I am getting a cyclic load dependency for clj -T:build jar
when switching from v0.5.1
to v0.6.x
This is what my build.clj looks like
(ns build
(:require [clojure.tools.build.api :as b]))
(def lib 'rundherum/rundherum-activemq-example)
(def version (format "0.1.%s" (b/git-count-revs nil)))
(def class-dir "target/classes")
(def basis (b/create-basis {:project "deps.edn"}))
(def jar-file (format "target/%s-%s.jar" (name lib) version))
(defn clean
"Cleans the target path."
[_]
(b/delete {:path "target"}))
(defn jar [_]
(b/copy-dir {:src-dirs ["consumer" "producer"]
:target-dir class-dir})
(b/compile-clj {:basis basis
:src-dirs ["consumer" "producer"]
:class-dir class-dir})
(b/uber {:class-dir class-dir
:uber-file jar-file
:basis basis}))
The actual error is
Unexpected error macroexpanding clojure.core.async/go at (org/ramper/activemq_util.clj:56:23).
Cyclic load dependency: [ /producer ]->/org/ramper/activemq_util->/org/ramper/api->[ /producer ]
@UL638RXE2 Can you try https://github.com/clj-easy/graal-build-time/blob/b91cd78a977fdf81758705668f44b0d2ddad4bdc/build.clj#L1-L2?
If you're using v0.6.4 or later, you can specify :java-opts
to compile-clj
and pass that Graal log output option. See https://clojure.github.io/tools.build/clojure.tools.build.api.html#var-compile-clj
(btw, kind of unusual to compile code into a JAR -- normally you only compile code into an uberjar)
@U04V70XH6 maybe my naming is misleading, but doesn't this create an uberjar?
Oh, yes, that's very confusing.
Yes, you are calling uber in a function called jar 👀