IncompatibleClassChangeError ClusteringDocumentList example

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

IncompatibleClassChangeError ClusteringDocumentList example

fertapric
Hi,

I'm trying to run the ClusteringDocumentList example. It compiles, but when I tried to test it, it reaches an exception. The first part based on clustering by URL works fine, but the Lingo and STC algorithms crashes.

Exception in thread "main" java.lang.IncompatibleClassChangeError
        at org.carrot2.util.CloseableUtils.close(CloseableUtils.java:38)
        at org.carrot2.text.preprocessing.Tokenizer.tokenize(Tokenizer.java:162)
        at org.carrot2.text.preprocessing.pipeline.BasicPreprocessingPipeline.preprocess(BasicPreprocessingPipeline.java:96)
        at org.carrot2.text.preprocessing.pipeline.CompletePreprocessingPipeline.preprocess(CompletePreprocessingPipeline.java:54)
        at org.carrot2.text.preprocessing.pipeline.BasicPreprocessingPipeline.preprocess(BasicPreprocessingPipeline.java:87)
        at org.carrot2.clustering.lingo.LingoClusteringAlgorithm.cluster(LingoClusteringAlgorithm.java:196)
        at org.carrot2.clustering.lingo.LingoClusteringAlgorithm.access$000(LingoClusteringAlgorithm.java:41)
        at org.carrot2.clustering.lingo.LingoClusteringAlgorithm$1.process(LingoClusteringAlgorithm.java:175)
        at org.carrot2.text.clustering.MultilingualClustering.clusterByLanguage(MultilingualClustering.java:222)
        at org.carrot2.text.clustering.MultilingualClustering.process(MultilingualClustering.java:110)
        at org.carrot2.clustering.lingo.LingoClusteringAlgorithm.process(LingoClusteringAlgorithm.java:168)
        at org.carrot2.core.ControllerUtils.performProcessing(ControllerUtils.java:95)
        at org.carrot2.core.ControllerUtils.performProcessing(ControllerUtils.java:138)
        at org.carrot2.core.ControllerUtils.performProcessing(ControllerUtils.java:115)
        at org.carrot2.core.SimpleController.process(SimpleController.java:161)
        at org.carrot2.core.SimpleController.process(SimpleController.java:112)
        at org.carrot2.examples.clustering.ClusteringDocumentList.main(ClusteringDocumentList.java:89)


Thanks
Reply | Threaded
Open this post in threaded view
|

Re: IncompatibleClassChangeError ClusteringDocumentList example

Dawid Weiss-2
Check if you're compiling with the same version of Java as running, it
looks like you're compiling with Java 1.6, but executing with a
different version.

Dawid

On Fri, Apr 9, 2010 at 6:05 PM, fertapric <[hidden email]> wrote:

>
> Hi,
>
> I'm trying to run the ClusteringDocumentList example. It compiles, but when
> I tried to test it, it reaches an exception. The first part based on
> clustering by URL works fine, but the Lingo and STC algorithms crashes.
>
> Exception in thread "main" java.lang.IncompatibleClassChangeError
>        at org.carrot2.util.CloseableUtils.close(CloseableUtils.java:38)
>        at org.carrot2.text.preprocessing.Tokenizer.tokenize(Tokenizer.java:162)
>        at
> org.carrot2.text.preprocessing.pipeline.BasicPreprocessingPipeline.preprocess(BasicPreprocessingPipeline.java:96)
>        at
> org.carrot2.text.preprocessing.pipeline.CompletePreprocessingPipeline.preprocess(CompletePreprocessingPipeline.java:54)
>        at
> org.carrot2.text.preprocessing.pipeline.BasicPreprocessingPipeline.preprocess(BasicPreprocessingPipeline.java:87)
>        at
> org.carrot2.clustering.lingo.LingoClusteringAlgorithm.cluster(LingoClusteringAlgorithm.java:196)
>        at
> org.carrot2.clustering.lingo.LingoClusteringAlgorithm.access$000(LingoClusteringAlgorithm.java:41)
>        at
> org.carrot2.clustering.lingo.LingoClusteringAlgorithm$1.process(LingoClusteringAlgorithm.java:175)
>        at
> org.carrot2.text.clustering.MultilingualClustering.clusterByLanguage(MultilingualClustering.java:222)
>        at
> org.carrot2.text.clustering.MultilingualClustering.process(MultilingualClustering.java:110)
>        at
> org.carrot2.clustering.lingo.LingoClusteringAlgorithm.process(LingoClusteringAlgorithm.java:168)
>        at
> org.carrot2.core.ControllerUtils.performProcessing(ControllerUtils.java:95)
>        at
> org.carrot2.core.ControllerUtils.performProcessing(ControllerUtils.java:138)
>        at
> org.carrot2.core.ControllerUtils.performProcessing(ControllerUtils.java:115)
>        at org.carrot2.core.SimpleController.process(SimpleController.java:161)
>        at org.carrot2.core.SimpleController.process(SimpleController.java:112)
>        at
> org.carrot2.examples.clustering.ClusteringDocumentList.main(ClusteringDocumentList.java:89)
>
>
> Thanks
> --
> View this message in context: http://n2.nabble.com/IncompatibleClassChangeError-ClusteringDocumentList-example-tp4877979p4877979.html
> Sent from the Carrot2 Users and Developers Forum mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Carrot2-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/carrot2-developers
>

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Carrot2-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/carrot2-developers
Reply | Threaded
Open this post in threaded view
|

Re: IncompatibleClassChangeError ClusteringDocumentList example

fertapric
It seems that I'm using the same version for compiling and executing

MacBook:~ user$ javac -version
javac 1.6.0_17
MacBook:~ user$ java -version
java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04-248-10M3025)
Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01-101, mixed mode)
Reply | Threaded
Open this post in threaded view
|

Re: IncompatibleClassChangeError ClusteringDocumentList example

Dawid Weiss-2
In reply to this post by fertapric
> Exception in thread "main" java.lang.IncompatibleClassChangeError
>        at org.carrot2.util.CloseableUtils.close(CloseableUtils.java:38)
>        at org.carrot2.text.preprocessing.Tokenizer.tokenize(Tokenizer.java:162)

Your error is caused by the fact that you use a different version of
Lucene compared to the one shipped with Carrot2. To be specific, we
have a method that uses interface argument Closeable:

close(Closeable c)

and the argument passed to it is:

org.apache.lucene.analysis.Tokenizer

In Lucene's 3.x line, Tokenizer implements this interface, I'm
guessing it didn't in previous versions.

Dawid

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Carrot2-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/carrot2-developers
Reply | Threaded
Open this post in threaded view
|

Re: IncompatibleClassChangeError ClusteringDocumentList example

fertapric
Thank you very much, you were completely right, I was using a 2.9.2 Lucene version instead of the one shipped with the Carrot2 package.
Regards