java.lang.IncompatibleClassChangeError: [class] and [inner class] disagree on InnerClasses attribute

1,957 views
Skip to first unread message

Mark Triggs

unread,
Jan 12, 2009, 7:06:59 PM1/12/09
to Clojure
Hi all,

I've just been fiddling with Lucene indexing from Clojure, and wanted
to
access a static field of this inner class:

http://lucene.apache.org/java/2_4_0/api/org/apache/lucene/index/IndexWriter.MaxFieldLength.html

I'm importing IndexWriter$MaxFieldLength with no problems, but
attempts
to eval:

IndexWriter$MaxFieldLength/UNLIMITED

or

(. IndexWriter$MaxFieldLength UNLIMITED)

both yield the following exception:

java.lang.IncompatibleClassChangeError:
org.apache.lucene.index.IndexWriter and
org.apache.lucene.index.IndexWriter$MaxFieldLength disagree on
InnerClasses attribute (NO_SOURCE_FILE:0) [Thrown class
clojure.lang.Compiler$CompilerException]

I'm running SVN r1205. Am I doing something wrong here?

Thanks,

Mark

Mark Triggs

unread,
Jan 13, 2009, 9:30:34 PM1/13/09
to Clojure
Aha! I notice that this problem goes away if I run the JVM the way
I'm supposed to (with -cp lucene-core.xxx.jar) instead of using (add-
classpath ...) to load the jar in the first place. This probably
isn't a big deal, then :o)

Thanks,

Mark

On Jan 13, 11:06 am, Mark Triggs <mark.h.tri...@gmail.com> wrote:
> Hi all,
>
> I've just been fiddling with Lucene indexing from Clojure, and wanted
> to
> access a static field of this inner class:
>
>  http://lucene.apache.org/java/2_4_0/api/org/apache/lucene/index/Index...
Reply all
Reply to author
Forward
0 new messages