FileNotFoundException Could not locate clojure/java/jdbc__init.class

clojure, jar, namespaces, require

Solution

here's my dependency line:

[org.clojure/java.jdbc "0.2.3"]

Heres the require line from one of my projects that use jdbc

(:require [clojure.java [jdbc :as sql]])

If none of this helps here are my standard leiningen fixing steps:

- lein deps and look for errors

- lein clean

- lein upgrade

- lein deps :tree and look for strangeness

- rm -rf target/ # this one has only helped me with messed up native deps.

- rm ~/.m2/repository -rf # this is the last resort, it's lots of downloading.

- join #leiningen on irc.freenode.net and ask for help

PS: I found this video helpful in getting a handle on namespaces.

Problem

I have a problem with importing jars in clojure. I used lein to add dependencies. This is code from project.clj ``` (defproject recommendation "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "http://example.com/FIXME" :license {:name "Eclipse Public License" :url "http://www.eclipse.org/legal/epl-v10.html"} :dependencies [[org.clojure/clojure "1.5.1"] [org.clojure/java.jdbc "0.0.6"] ;; jdbc [mysql/mysql-connector-java "5.1.6"]] :aot :all :main recommendation.core) ``` I typed in the command `lein deps`, and it downloaded 3 jars in lib folder. This is code from recommendation.core (ns recommendation.core (:require [clojure.java.jdbc :as sql]) ) And I get exception: ``` FileNotFoundException Could not locate clojure/java/jdbc__init.class or clojure/java/jdbc.clj on classpath: clojure.lang.RT.load (RT.java:443) ``` Can anybody tell me where i am wrong and what to do?

Original source