leiningen

Jakub Holý (HolyJak) 2022-09-21T14:24:28.079139Z

Hello! I have a real mystery, lein repl failing due to missing Timestamp class:

lein repl
nREPL server started on port 50850 on host 127.0.0.1 - 
REPL-y 0.5.1, nREPL 0.8.3
Clojure 1.10.3
OpenJDK 64-Bit Server VM 18.0.1.1+0
    Docs: (doc function-name-here)
          (find-doc "part-of-name-here")
  Source: (source function-name-here)
 Javadoc: (javadoc java-object-or-class-here)
    Exit: Control+D or (exit) or (quit)
 Results: Stored in vars *1, *2, *3, an exception in *e

user=> (require 'clojure.instant)
Execution error (ClassNotFoundException) at java.lang.Class/forName0 (Class.java:-2).
java/sql/Timestamp
Doing just (import 'java.sql.Timestamp) works. When I run clj instead then the require works just fine. I have removed my ~./lein/profiles.clj and run in a directory without project.clj (e.g. in /tmp). What could be the matter???

✅ 1
vemv 2022-09-21T14:27:06.334639Z

I don't remember this stuff by heart but you might get an idea from checking out https://github.com/brandonbloom/fipp/issues/72 / the PR that fixed it

Jakub Holý (HolyJak) 2022-09-21T14:33:19.706749Z

but it works when I run clj (admittedly that uses clj 1.11). Also importing the class works as mentioned above so it seems untrue that it does not exist

vemv 2022-09-21T14:37:13.039969Z

export LEIN_USE_BOOTCLASSPATH=no may work

🙏 1
✅ 2
Jakub Holý (HolyJak) 2022-09-21T14:41:30.457279Z

Thanks a lot! That indeed solved it!

🍻 1