From: Andres Moreno <amorenompls@gmail.com>
To: help-guix@gnu.org
Subject: clojure-tools not finding java classes
Date: Sun, 30 Jun 2024 18:16:45 -0700 [thread overview]
Message-ID: <CAOXoXz0fKD+3B+b_y6A8MPYxZcSRDusby6VWTUy8Nnp4Y0fAzQ@mail.gmail.com> (raw)
I started to play with the Kit Web Framework and followed the instructions
to build the default example,
https://kit-clj.github.io/docs/guestbook.html#guestbook_application
> clojure -Ttools install com.github.seancorfield/clj-new '{:git/tag
"v1.2.404"}' :as clj-new
> clojure -Tclj-new create :template io.github.kit-clj :name kit/guestbook
> cd guestbook
I then try to start a CIDER repl by typing:
> clj -M:dev:cider
This fails with a class-not-found error:
java.lang.NoClassDefFoundError: org/xnio/channels/StreamSourceChannel
The complaint comes from
Exception in thread "main" Syntax error compiling . at
(ring/adapter/undertow/request.clj:10:17)
I can get rid of this issue by adding
org.jboss.xnio/xnio-api {:mvn/version "3.8.16.Final"}
org.jboss.xnio/xnio-nio {:mvn/version "3.8.16.Final"}
to my deps.edn file.
Eventually, I succeeded and got a REPL working, but there were a few
additional classes that threw errors when I invoked the (go) function at
the REPL: those erors were fixed by adding the below to the deps.edn file:
org.wildfly.common/wildfly-common {:mvn/version "2.0.0"}
org.jboss.logging/jboss-logging {:mvn/version "3.6.0.Final"}
io.smallrye.config/smallrye-config-common {:mvn/version "3.8.3"}
io.smallrye.common/smallrye-common-net {:mvn/version "2.4.0"}
org.jboss.threads/jboss-threads {:mvn/version "3.6.1.Final"}
io.smallrye.common/smallrye-common-cpu {:mvn/version "2.4.0"}
Set-up on Guix System:
- openjdk 21.0.2 (also tested: openjdk 11.0.22)
- clojure-tools 1.11.2.1446
Note that I can run the above on Debian 12.6 just as the documentation
suggests, with no need to add any additional classes to the deps.edn file
when I have clojure-tools manually installed on Debian per the script on
the Clojure website.
Additionally, I got the same errors when I used clojure-tools on Debian
using the Guix package manager. This suggests that the issue is related to
clojure-tools.
I have a work-around so this issue is in no way critical. Nevertheless, I
thought that I should report it should the folks that look after the
clojure-tools package want to look into it. I don't know my way around the
Clojure web stack so I couldn't figure out how to provide a simpler example.
I will try to find something simpler in a different domain in the meantime.
Regards, afm
reply other threads:[~2024-07-01 1:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAOXoXz0fKD+3B+b_y6A8MPYxZcSRDusby6VWTUy8Nnp4Y0fAzQ@mail.gmail.com \
--to=amorenompls@gmail.com \
--cc=help-guix@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).