michaelklishin/monger

"lein repl" throws ClassNotFoundException

kiemdoder opened this issue · 3 comments

After I changed the com.novemberain/monger dependency in my project.clj to 3.1.0 I get the following ClassNotFoundException when I try to run "lein repl"

java.lang.ClassNotFoundException: com.novemberain.monger.DBRef
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at clojure.lang.RT.classForName(RT.java:2168)
at clojure.lang.RT.classForName(RT.java:2177)
at monger.conversion__init.__init0(Unknown Source)
at monger.conversion__init.(Unknown Source)

You need to clean compiled classes with lein clean.

More specifically Monger had to drop DB reference support at some point because MongoDB Java driver did, see e.g. d9e6be6 and 0b72761.

It happened a while back.

Thank you for clearing that up. I should have known to run lein clean first.