Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ClassNotFoundException with imported Interface
We start with an interface specification, a snippet of which is this
(ns ie4clj.api)
(definterface Inferrable
(^boolean eval [])
(^boolean evalMembers [members])
)
We then use that interface in a test, a snippet of which is this
(ns ie4clj.Tests
(:require
[ie4clj.AndList]
[ie4clj.OrList]
[ie4clj.Not])
(:import (ie4clj.api Inferrable)))
(defn SimpleTrue
(reify
Inferrable <<<<<<<
(defn eval [] true)))
When that use had problems, the inteliij IDE added the import statement, so I assume that's how to use it
Now, in another file, a snippet of which is this:
(ns ie4clj.AndList
(:import (ie4clj.api Inferrable))
)
(defn AndList
(reify
Inferrable
(defn evalMembers [members]
I see the error message
Syntax error (ClassNotFoundException) compiling at (ie4clj/AndList.clj:1:1).
ie4clj.api.Inferrable
A question is this: why does the import work in the test file but not in the AndList file?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment