Fork me on GitHub

Hi is it possible to create namespaced string keys and if so how?


Not really - but you can convert keywords to strings and vice versa if that helps.


there are spaces in some of the string keys and i don't want to change the keys


{:namespace "what is this"
 :name "eeey"}


if it doesn't cleanly fit into a keyword, symbol, or string - you can always use your own aggregate as a key


i wouldn't call this the most idiomatic thing in the world - but keywords and symbols are more for programatic identifiers and it sounds like your thing comes from outside data


and to be clear

{{:namespace "what is this"
  :name "eeey"}              123}
Using maps as keys does work

✔️ 1

I've got a list of urls I need to do some processing on: basically initiate a GET and do some processing on the response, and finally serializing $stuff to sqlite. How do I want to do this in clojure? Should I map the list into a series of future objects that I then wait on? Should I investigate core.async for something like this?


i'd say neither


futures are backed by a "cached thread pool", so if you kick off a bunch of get requests all at once you will get exactly that many threads


which may or may not be okay, but i would use with your own executor


OR, just run all the requests in order without any async and see if its fast enough


I was looking into the repo , can we also add response data in the log ?


Might not be understanding the question, but this seems to be what the wrap-log-response-function is for 😊


@UDB2Q0W13, I meant if my api is returning {:a "message"} does we get the response in the logs?


Aha, I looked at the source code and it looks like only the response status gets logged 😢


I'm trying to use a 3'rd-party .jar file in a deps.edn project. I've put the jar file in a folder local to my project and pointed to it in the :deps section of my deps.edn file using a :local/root directive as shown in the "Include a local jar on disk" section of the "Deps and CLI Guide" document. However, I'm getting an error:

Error building classpath. Manifest type not detected when finding deps for <library> in coordinate #:local{:root <path-to-jar>}
Why is this error being thrown and what do I do about it? The "Deps and CLI Guide" doesn't mention anything about a manifest in the section on including the jar file.

Alan Birchenough18:04:08

Doesn’t the jar file itself need to contain a manifest? (See

Alan Birchenough18:04:12

Are you sure that it does?


Manifest in this case refers to a deps.edn or pom.xml file in the jar


Which is confusing because jars also can a manifest file which is something else entirely


What version of the cli tools are you using?


I don't entirely recall under what circumstances tools.deps requires a pom or dep.edn file, but I would not expect it to require one in that case


Is that 3rd party JAR file publicly accessible so we can double-check what is in it? And, yes, what does clojure -version say, and perhaps also share your whole deps.edn file if you can. More information will make it easier for us to help you @U0DTU8J83

Alex Miller (Clojure team)19:04:29

I suspect the error means no pom.xml was found in the jar file (which is used for finding transitive deps)

Alex Miller (Clojure team)19:04:43

possibly that is required when it should not be

Alex Miller (Clojure team)19:04:45

I'm a little curious if that is the actual error as that implies you actually have "path-to-jar" in your deps (not sure if that was a concealing edit)

Alex Miller (Clojure team)19:04:24

yeah, this doesn't seem to be an issue

% jar cf foo.jar
% clj -Sdeps '{:deps {foo/bar {:local/root "foo.jar"}}}' -Stree
org.clojure/clojure 1.11.1
  . org.clojure/spec.alpha 0.3.218
  . org.clojure/core.specs.alpha 0.2.62
foo/bar /Users/alex.miller/code/foo.jar

Alex Miller (Clojure team)19:04:32

seems fine to not have a pom.xml in the jar


An issue i’ve had in the past doing this is i would put the path to the folder containing the jar rather than the path to the jar itself. ie /Users/dan/stuff/ instead of /Users/dan/stuff/library.jar. If that’s perhaps your issue

Alex Miller (Clojure team)20:04:21

the error at the top implies the actual deps.edn has "<path-to-jar>" in it (that's not in any error message)


I think its consistent with i’ve written here:

clj -Sdeps '{:deps {metabase/metabase {:local/root "/Users/dan/projects/work/jars"}}}'
Error building classpath. Manifest type not detected when finding deps for metabase/metabase in coordinate #:local{:root "/Users/dan/projects/work/jars"}
If you put a path to a jar and forget to include the jar name you receive exactly that error. I have 10 jars in that directory but i’ve done this in the past when i downloaded a jar and wrongly thought i had to point at the folder containing the jar rather than the jar itself

Alex Miller (Clojure team)20:04:02

agreed and that is common, but I don't think that's the issue here

Alex Miller (Clojure team)20:04:27

but until the OP clarifies, can't tell


Sorry it's taken a while to get back to you. Here's my deps.edn:


 {org.clojure/clojure {:mvn/version "1.10.3"}
  compojure/compojure {:mvn/version "1.6.2"}
  http-kit/http-kit {:mvn/version "2.5.3"}
  ring/ring-json {:mvn/version "0.5.1"}
  ring-cors/ring-cors {:mvn/version "0.1.13"}
  org.clojure/data.json {:mvn/version "2.4.0"}
  mercator/mapper {:local/root "../mercator"}
  mercator/expander {:local/root "../mercator"}
  mercator/primitives {:local/root "../mercator"}
  mercator/templates {:local/root "../mercator"}
  cheshire/cheshire {:mvn/version "5.0.2"}
  ;; The one below is the one that's giving me an issue...
  apelon-dts/dtscore {:local/root "resources/jars/apelon"}}

 :jvm-opts ["-XX:-OmitStackTraceInFastThrow"]
  :aliases {;; build an uberjar (application) with AOT compilation by default:
            :dev {}
            :uberjar {:replace-deps {com.github.seancorfield/depstar {:mvn/version "2.1.303"}}
                      :exec-fn hf.depstar/uberjar
                      :exec-args {:aot true}}
  ;; build a jar (library):
            :jar {:replace-deps {com.github.seancorfield/depstar {:mvn/version "2.1.303"}}
                  :exec-fn hf.depstar/jar
                  :exec-args {}}}}


{:local/root "resources/jars/apelon"} doesn’t seem to be a path to a jar but a path to a folder that may or may not contain a jar?


The jar file has a pom.xml in its maven directory and has a MANIFEST.MF file in the META-INF directory.


It is the name of the directory that has the .jar file in it.


Should I be adding the name of the .jar file, as well? Trailing /?


The full error message I'm getting is:

Error building classpath. Manifest type not detected when finding deps for apelon-dts/dtscore in coordinate #:local{:root "C:\\Users\\fadrian\\Projects\\motive-cql-builder\\mercator-server\\resources\\jars\\apelon"}


yes use a full path to the jar.


OK. I've changed my :deps declaration for the .jar file to:

apelon-dts/dtscore {:local/root "resources/jars/apelon/dtscore-4.6.1-838.jar"}
I'm now getting the (slightly different) error message:
Error building classpath. Manifest type not detected when finding deps for apelon-dts/dtscore in coordinate #:local{:root "C:\\Users\\fadrian\\Projects\\motive-cql-builder\\mercator-server\\resources\\jars\\apelon\\dtscore-4.6.1-838.jar"}


The pom.xml file (to my limited experience) looks good and the groupId and artifactId all seem to match.


@U0DTU8J83 And is that full path correct? That's the correct path to that .jar file?


Yes. The full path is correct. When going over the pom.xml files, there are some dependencies that are not in my :deps section. Would I need to add those?

Alex Miller (Clojure team)21:04:43

What version of the Clojure CLI? clj --version

Alex Miller (Clojure team)21:04:46

and inside the jar file, where is the pom? jar tf dtscore-4.6.1-838.jar | grep pom is what I would do in *nix, not sure if you're on windows


I’ve tried to register 30 times at to download their jar but cannot get it to accept a password through its verification 😞

Alex Miller (Clojure team)21:04:57

it's going to look for something under META-INF/ that ends in pom.xml


Not certain about the version... How can I tell? pom.xml is found in META-INF/maven/apelon-dts/dtscore/pom.xml inside the .jar file.


Alex Miller (Clojure team)21:04:05

can you drop me the jar file somehow?

Alex Miller (Clojure team)21:04:14

that all seems like it should be ok


I'm checking whether one can send the jar without running into licensing issues.


I've sent the .jar to you via DM.

Alex Miller (Clojure team)22:04:18

well I don't see the problem you see, but I do see others

Alex Miller (Clojure team)22:04:58

do you have anything configured in your ~/.m2/settings.xml


No, I don't.

Alex Miller (Clojure team)22:04:20

I can see many ways this can be problematic but not getting exactly the same errors - there are some system deps declared in the internal pom that point to hardcoded paths on your system. those fail for me, but that should be downstream from the error you're seeing, so I don't understand that. a workaround for this issue would be to instead include this as a path which will put it on the classpath without trying to understand it's deps:

{:paths ["src" "resources/jars/apelon/dtscore-4.6.1-838.jar"] 
and then remove it from :deps

Alex Miller (Clojure team)22:04:00

could also be a windows thing I guess

Alex Miller (Clojure team)22:04:25

do you have a resources/jars/apelon/project/pom.xml or something like that?


There is in some other jars I have from this company, but none in dtscore.


It turns out your suggestion of adding the file to the src paths went farther, but then crashed with an error message:

ERROR: Unhandled REPL handler exception processing message {:op eval, :code *ns*, :id 1}
<stack trace>
Caused by: java.nio.file.NoSuchFileException: c:\Users\fadrian\Projects\motive-cql-builder\mercator-server\resources\jars\apelon\dtscore-4.6.1-838.jar
<more stack trace>
This is even when I'm looking directly at the .jar file mentioned in the file manager. I'll look into more tomorrow.

Alex Miller (Clojure team)23:04:32

That looks like something failed well beyond, could tell from the stack trace

Alex Miller (Clojure team)23:04:59

Anyhow, I think something else is needed here from a feature level and I'll log something about that


According to the stack trace, it's throwing the exception when it's trying to read some file attributes for/within the .jar:

Caused by: java.nio.file.NoSuchFileException: c:\Users\fadrian\Projects\motive-cql-builder\mercator-server\resources\jars\apelon\dtscore-4.6.1-838.jar
        at java.base/sun.nio.fs.WindowsException.translateToIOException(
        at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(
        at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(
        at java.base/sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(
        at java.base/sun.nio.fs.WindowsFileAttributeViews$Basic.readAttributes(
        at java.base/sun.nio.fs.WindowsFileSystemProvider.readAttributes(
        at java.base/java.nio.file.Files.readAttributes(
        at java.base/$Source.get(
        at java.base/$CleanableResource.<init>(
        at java.base/<init>(
        at java.base/<init>(
        at java.base/java.util.jar.JarFile.<init>(
        at java.base/java.util.jar.JarFile.<init>(
        at java.base/java.util.jar.JarFile.<init>(
        at cider.nrepl.middleware.track_state$fn__3870.invokeStatic(track_state.clj:155)
        at cider.nrepl.middleware.track_state$fn__3870.invoke(track_state.clj:155)
        at clojure.core$map$fn__5884.invoke(core.clj:2759)
        at clojure.lang.LazySeq.sval(
        at clojure.lang.LazySeq.seq(
        at clojure.lang.RT.seq(
        at clojure.core$seq__5419.invokeStatic(core.clj:139)
        at clojure.core$map$fn__5884.invoke(core.clj:2750)
        at clojure.lang.LazySeq.sval(
        at clojure.lang.LazySeq.seq(
        at clojure.lang.RT.seq(
        at clojure.core$seq__5419.invokeStatic(core.clj:139)
        at clojure.core$apply.invokeStatic(core.clj:662)
        at clojure.core$mapcat.invokeStatic(core.clj:2787)
        at clojure.core$mapcat.doInvoke(core.clj:2787)
        at clojure.lang.RestFn.applyTo(
        at clojure.lang.Compiler$InvokeExpr.eval(
        ... 68 more


That is coming from CIDER/nREPL -- so you're well past the Clojure CLI and deps.edn issue. Maybe you can go ask in #cider? It might be Windows a path/escape issue in the nREPL middleware?


Sounds good. I'll give it a shot.


(posting here as well). I'd urge you to get a repl up without any extra tooling before figuring out what is going on in CIDER and Calva. I think Calva on windows uses a reproduction of the clojure cli and not the actual cli. Further, CIDER's tooling might have a bug, or might be hitting an issue related to this jar. It was far better to get a repl using just clojure or clj command line tools and then proceed to editor integrated tooling


Why not installing the jar file locally, and then using it in the project.clj or deps directly?

mvn install:install-file –Dfile=C:\dev\app.jar -DgroupId=com.roufid.tutorials -DartifactId=example-app -Dversion=1.0


A question from a coworker recently who is on the frontend (js) side and wants to learn from a good codebase: > A side topic: is this considered a good code base to learn if one wants to understand how to write a small, pure Clojure library written in idiomatic Clojure? Would appreciate if anything comes to mind

Fredy Gadotti20:04:46

I asked something like this couple weeks ago and they send a few suggestions. I like the code of


heh. We work there and he is looking for something a bit smaller in scope that is “good code” for learning the language more than learning how to make a proper full product

😂 2

(and you made our day 🙂 )

👍 1
❤️ 1

that’s a pretty complex domain to jump into for someone new to the language


(but an amazing project)


i think something like hiccup might fit the bill?

Fredy Gadotti20:04:47

@U11BV7MTK LOL 😅 I just saw your profile now. hehe

😂 2

almost too abstract. that would be handy idioms rather than library code that accomplishes something


after doing Clojure for a year that library is lovely. But before some experience it would just feel like koans i suspect


that is absolutely beautiful code

respatialized16:04:19 Another good choice for a small "does one thing well" library

John Bradens22:04:07

Hey I'm trying to learn how to use clj and I am trying clj -M:dev -M:repl and I'm getting

WARNING: Specified aliases are undeclared and are not being used: [:dev] 
Execution error (FileNotFoundException) at (
-M:repl (No such file or directory)
I'm new to using clj, do I need to update it or anything?

John Bradens22:04:53

Why am I getting this error & how do I fix it?

Alex Miller (Clojure team)22:04:32

everything after -M is treated as an argument passed to the main

John Bradens22:04:39

Awesome thank you! It worked