Fork me on GitHub
#leiningen
<
2022-09-21
>
Jakub Holý (HolyJak)14:09:28

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
vemv14:09:06

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)14:09:19

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

vemv14:09:13

export LEIN_USE_BOOTCLASSPATH=no may work

2
🙏 1
Jakub Holý (HolyJak)14:09:30

Thanks a lot! That indeed solved it!

🍻 1