1

I'm trying to connect to a running clojure app package as a uberjar. I added [com.cemerick/drawbridge "0.0.7"] to my project.clj. But when I trying to connect with lein repl :connect http://ip:port/repl it is like it is not even connecting.

I get a stacktrace:

java.io.FileNotFoundException: Could not locate cemerick/drawbridge/client__init.class or cemerick/drawbridge/client.clj on classpath.
at clojure.lang.RT.load (RT.java:456)
clojure.lang.RT.load (RT.java:419)
clojure.core$load$fn__5677.invoke (core.clj:5893)
clojure.core$load.invokeStatic (core.clj:5892)
clojure.core$load.doInvoke (core.clj:5876)
....
clojure.lang.AFn.applyToHelper (AFn.java:171)
clojure.lang.Var.applyTo (Var.java:700)
clojure.main.main (main.java:37)

But when I run lein classpath I can find drawbridge there /root/.m2/repository/com/cemerick/drawbridge/0.0.7/drawbridge-0.0.7.jar

jar tf /root/.m2/repository/com/cemerick/drawbridge/0.0.7/drawbridge-0.0.7.jar
META-INF/MANIFEST.MF
META-INF/maven/com.cemerick/drawbridge/pom.xml
...
cemerick/drawbridge/client.clj

Any clues?

regius
  • 55
  • 6

3 Answers3

1

This looks like a plain old regression in Leiningen. I have submitted this as https://github.com/technomancy/leiningen/issues/2370.

John Conti
  • 11
  • 4
0

Tested the same command on a older lein (clojure:lein-2.7.1) and it looks better. Something is maybe wrong on the server side but it connect at least.

regius
  • 55
  • 6
0

Leiningen does not include Drawbridge anymore and you need to add it explicitly to plugins:

(defproject whatever "0.1.0-SNAPSHOT"
  :plugins [[nrepl/drawbridge "0.2.1"]]))

See nREPL over HTTP(s) with Drawbridge in 2020

Jakub Holý
  • 6,019
  • 3
  • 33
  • 33