Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NoClassDefFoundError with clojure tools logging

I'm using clojure.tools.logging for a web application. For long times it works fine, with org.clojure/tools.logging "0.1.2". I start and stop then re-start clojure repl[lein repl] for multiple time for development testing purposes. Suddenly, repl throws following error. I update the logging library to org.clojure/tools.logging "0.2.3", but, no use. Still I get the same error, It only gave this error on the repl, but, with the application running, logs work fine. I coudn't identify where is the issue.

I'm using lo4j with clojure.tools.logging.

java.lang.NoClassDefFoundError: clojure/tools/logging/impl/LoggerFactory (NO_SOURCE_FILE:0)
like image 299
Abimaran Kugathasan Avatar asked Nov 28 '11 05:11

Abimaran Kugathasan


Video Answer


2 Answers

I would try lein clean, and then lein deps, and then lein compile and finally lein repl. If that didn't work I'd next try manually deleting the lib and classes directories, and then run lein deps, lein compile and then lein repl again.

like image 130
Bill Avatar answered Sep 23 '22 16:09

Bill


Adding to :aot in the project.clj file worked for me.

:aot [clojure.tools.logging.impl ...]
like image 36
Candland Avatar answered Sep 22 '22 16:09

Candland