Hi Daniel,

While this may not be all-inclusive, there could be two main reasons
for the error.

1. You don't really have all the jars required.  This is easy to
check.  A jar is just a zip file really and can be viewed (jar -tvf
<jarname>).  Look for the class file in there that matches the class
that is being complained about.  If you can't find it in any of the
jars, that's your problem right there.
2. You have all the jars, but are not including them in the classpath
for your clojure program.  This goes to what Kevin was asking about.
The best way (IMO) to make sure you're all good there would be to run
your clojure project using leiningen.  Otherwise, if you are running
from the command line, make sure your -cp argument includes all the
jars you need (this is really java, not clojure specific).

Apologies if some of the above is stuff you already know, I hoped to
err on the side of explaining too much rather than too little.

Let us know how you go.

Cheers

On Jan 6, 7:21 am, Daniel Bell <dchristianb...@gmail.com> wrote:
> So school has started, and I'm laden with syllabi, either in print or
> online.  I'm a stats student, so all my professors use LaTex
> for...well, everything.  So I have all these .pdf files.
>
> I had the idea of parsing them and extracting the homework schedules
> and then making a simple Android app that showed what was due
> depending on the date.  This is admittedly kind of overengineering the
> whole thing, but I just got the phone for Christmas and I've been
> itching to write something for it.
>
> In the process of trying to extract the text (I was using Apache's
> PDFBox), I ran into a NoClassDefFound error when importing certain
> classes.  I checked that all the .jars were in all the right places,
> etc, to no avail.
>
> I wasn't so much frustrated by the error (they happen) as with my
> inability to do much about it or really poke at it.  According to the
> Java docs, NCDF occurs when a class definition that was present at
> (Java's) compile time is absent at (Java's) runtime.  I'm not really
> sure how that could happen---where could I go for more insight into
> how java packages/classes are loaded?  (I actually have the
> clojure.core source in front of me as I write this, but can't seem to
> find where "defmacro import" becomes...well, whatever java it becomes)
>
> tl, dr: If I never wanted to have a classpath/library loading issue in
> Clojure ever again, what should I read?
>
> Thanks,
>
> Daniel

-- 
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