I actually made an error when typing the code out in my message, so I
had no 'ns' in front of the namespace name. The issue was as you said
Mark I used hyphens but they needed to be underscores. I went into the
project classes folder and found that the package had underscores in
its name. Something so trivial caused so much trouble.

Thanks everyone for the input.

Adam

On Apr 16, 5:09 pm, Mark Fredrickson <mark.m.fredrick...@gmail.com>
wrote:
> Does app.two.b have a hyphen? If so, make it an underscore when importing.
> I've been bitten by that issue before.
>
> Also, +1 to correct names suggested by Vinzent.
>
> -M
>
>
>
>
>
>
>
> On Thursday, April 12, 2012 1:03:49 PM UTC-5, Adam Markham wrote:
>
> > I have two namespaces as follows:
>
> > (ns app.one.a
> >   (:require [ns.app.two.b])
> >   (:import [ns.app.two.b Book]))
>
> > (def b (Book. "A Book" "Adam"))
>
> > (ns app.two.b)
>
> > (defrecord Book [title author])
>
> > However whenever I try to import the defrecord I get a
> > ClassNotFoundException thrown. I tried AOT compiling the namespace
> > containing the defrecord with (:gen-class) but it made no difference.
>
> > Is there anything that i'm doing wrong?
>
> > Thanks,
>
> > Adam

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to