On java 25 trying to build an uberjar for a project is failing with ‘“is” is null’ using a bog standard clojure.tools.build.api/uber call. The trace is uninformative, will put it and java details in thread. Just curious if anyone has ideas on where to begin to debug. This same uber call worked before (for months across maybe 30 builds) but switching back to java21 doesn’t seem to help (I installed java25 a few days ago) so presumably it’s the most recent changes I made to the project 😕 Clojure CLI version 1.12.4.1602 Solved: Broken symlinks in the project caused this. A mock mini-website in resources was the culprit. Same issue on my linux machine, btw.
> I wonder if this means every symlink results in an extra copy of the file, hmm Most likely - the error comes from a copy function.
Is the same as https://clojure.atlassian.net/browse/TBUILD-36
Execution error (NullPointerException) at clojure.tools.build.tasks.uber/copy-stream! (uber.clj:51). Cannot invoke “http://java.io.InputStream.read(byte[])” because “is” is null Full report at: /var/folders/fz/whkql1md3fj91wf5ww6g3j9r0000gn/T/clojure-16052673399864001532.edn
Full report:
{:clojure.main/message
"Execution error (NullPointerException) at clojure.tools.build.tasks.uber/copy-stream! (uber.clj:51).\nCannot invoke \"
:clojure.main/triage
{:clojure.error/class java.lang.NullPointerException,
:clojure.error/line 51,
:clojure.error/cause
"Cannot invoke \"
:clojure.error/symbol clojure.tools.build.tasks.uber/copy-stream!,
:clojure.error/source "uber.clj",
:clojure.error/phase :execution},
:clojure.main/trace
{:via
[{:type java.lang.NullPointerException,
:message
"Cannot invoke \"
:at
[clojure.tools.build.tasks.uber$copy_stream_BANG_
invokeStatic
"uber.clj"
51]}],
:trace
[[clojure.tools.build.tasks.uber$copy_stream_BANG_
invokeStatic
"uber.clj"
51]
[clojure.tools.build.tasks.uber$copy_stream_BANG_
invoke
"uber.clj"
46]
[clojure.tools.build.tasks.uber$explode1
invokeStatic
"uber.clj"
160]
[clojure.tools.build.tasks.uber$explode1 invoke "uber.clj" 142]
[clojure.tools.build.tasks.uber$explode$fn__3701
invoke
"uber.clj"
203]
[clojure.tools.build.tasks.uber$explode invokeStatic "uber.clj" 199]
[clojure.tools.build.tasks.uber$explode invoke "uber.clj" 168]
[clojure.tools.build.tasks.uber$uber$fn__3734$fn__3738
invoke
"uber.clj"
285]
[clojure.lang.PersistentVector reduce "PersistentVector.java" 418]
[clojure.core$reduce invokeStatic "core.clj" 6964]
[clojure.core$reduce invoke "core.clj" 6947]
[clojure.tools.build.tasks.uber$uber$fn__3734 invoke "uber.clj" 284]
[clojure.core.protocols$iterator_reduce_BANG_
invokeStatic
"protocols.clj"
42]
[clojure.core.protocols$iter_reduce invokeStatic "protocols.clj" 52]
[clojure.core.protocols$fn__8260 invokeStatic "protocols.clj" 74]
[clojure.core.protocols$fn__8260 invoke "protocols.clj" 74]
[clojure.core.protocols$fn__8207$G__8202__8220
invoke
"protocols.clj"
13]
[clojure.core$reduce invokeStatic "core.clj" 6965]
[clojure.core$reduce invoke "core.clj" 6947]
[clojure.tools.build.tasks.uber$uber invokeStatic "uber.clj" 282]
[clojure.tools.build.tasks.uber$uber invoke "uber.clj" 269]
[clojure.lang.Var invoke "Var.java" 386]
[clojure.tools.build.api$uber invokeStatic "api.clj" 512]
[clojure.tools.build.api$uber invoke "api.clj" 440]
[build$uber invokeStatic "build.clj" 37]
[build$uber invoke "build.clj" 29]
[clojure.lang.Var invoke "Var.java" 386]
[clojure.run.exec$exec invokeStatic "exec.clj" 88]
[clojure.run.exec$exec invoke "exec.clj" 78]
[clojure.run.exec$_main$fn__218 invoke "exec.clj" 227]
[clojure.run.exec$_main invokeStatic "exec.clj" 223]
[clojure.run.exec$_main doInvoke "exec.clj" 191]
[clojure.lang.RestFn applyTo "RestFn.java" 140]
[clojure.lang.Var applyTo "Var.java" 707]
[clojure.core$apply invokeStatic "core.clj" 667]
[clojure.main$main_opt invokeStatic "main.clj" 515]
[clojure.main$main_opt invoke "main.clj" 511]
[clojure.main$main invokeStatic "main.clj" 665]
[clojure.main$main doInvoke "main.clj" 617]
[clojure.lang.RestFn applyTo "RestFn.java" 140]
[clojure.lang.Var applyTo "Var.java" 707]
[clojure.main main "main.java" 40]],
:cause
"Cannot invoke \"
openjdk 25.0.2 2026-01-20 LTS OpenJDK Runtime Environment Temurin-25.0.2+10 (build 25.0.2+10-LTS) OpenJDK 64-Bit Server VM Temurin-25.0.2+10 (build 25.0.2+10-LTS, mixed mode, sharing)
macos 26.3.1
Clojure CLI version 1.12.4.1602
I had a vague memory of having hit this before. I guess my Google skiils weren’t as good tonight. This is caused by broken symlinks (target does not exist) in the project dir, in this case resources. A non issue for my project but maybe symlinks are not a thing in jars with their zip filesystems so they all have to be resolved (?) or maybe they just are resolved by tools,.build. (I wonder if this means every symlink results in an extra copy of the file, hmm.) I tried poking around to see what’s going on in tools.build but lost patience.
For others like me, confused by sudden failed builds and no new added libs/files: this can also be triggered by 'temp/transient' files your editor might conjure up for its autosave/backup system 😅, try a :wa or C-x s first