IncompatibleClassChangeError using Snowball Stemmer

405 views Asked by At

I'm stuck in this problem from 3 days and i don't find any solution. I'm developing a DM application with NetBeans 7.3 using the Weka developer edition (3.7.10). I'm trying to use the Snowball stemmer and I keep getting the same exception while I run my application at the moment I create the stemmer with:

SnowballStemmer stemmer = new SnowballStemmer();

the exception I get is:

Refreshing GOE props...
---Registering Weka Editors---
Exception in thread "AWT-EventQueue-0"
java.lang.IncompatibleClassChangeError: class weka.classifiers.JythonClassifier has interface weka.classifiers.Classifier as super class
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:792)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:190)
at weka.core.ClassDiscovery.find(ClassDiscovery.java:343)
at weka.gui.GenericPropertiesCreator.generateOutputProperties(GenericPropertiesCreator.java:514)
at weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.java:606)
at weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.java:582)
at weka.core.converters.ConverterUtils.initialize(ConverterUtils.java:730)
at weka.core.converters.ConverterUtils.<clinit>(ConverterUtils.java:711)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:190)
at weka.core.ClassDiscovery.find(ClassDiscovery.java:343)
at weka.gui.GenericPropertiesCreator.generateOutputProperties(GenericPropertiesCreator.java:514)
at weka.gui.GenericPropertiesCreator.execute(GenericPropertiesCreator.java:606)
at weka.gui.GenericPropertiesCreator.<clinit>(GenericPropertiesCreator.java:149)
at weka.core.WekaPackageManager.refreshGOEProperties(WekaPackageManager.java:880)
at weka.core.WekaPackageManager.loadPackages(WekaPackageManager.java:874)
at weka.core.WekaPackageManager.loadPackages(WekaPackageManager.java:813)
at weka.gui.GenericObjectEditor.determineClasses(GenericObjectEditor.java:174)
at weka.gui.GenericObjectEditor.<clinit>(GenericObjectEditor.java:248)
at weka.core.stemmers.SnowballStemmer.initStemmers(SnowballStemmer.java:256)
at weka.core.stemmers.SnowballStemmer.setStemmer(SnowballStemmer.java:343)
at weka.core.stemmers.SnowballStemmer.<init>(SnowballStemmer.java:116)
at weka.core.stemmers.SnowballStemmer.<init>(SnowballStemmer.java:104)
at preproceso.TokenizadorNgram.<init>(TokenizadorNgram.java:54)
at preproceso.Preprocesamiento.tokenizar(Preprocesamiento.java:217)
at preproceso.PreprocesoPanel.btnAplicarTareasYTokenizarActionPerformed(PreprocesoPanel.java:562)
at preproceso.PreprocesoPanel.access$500(PreprocesoPanel.java:41)
at preproceso.PreprocesoPanel$6.actionPerformed(PreprocesoPanel.java:188)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
at java.awt.Component.processMouseEvent(Component.java:6505)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
at java.awt.Component.processEvent(Component.java:6270)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4861)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:708)
at java.awt.EventQueue$4.run(EventQueue.java:706)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

The first thing I would like to say is that the snowball.jar is included file in my java project. The first strange thing is that I never use weka.classifiers.JythonClassifier. The next thing is that I'm using Weka-7.3.10 and in this version the JythonClassifier extend from AbstractClassifier. It seems that the JythonClassifier found is some old version.

When I began with this project I start using thee Weka Stable Edition (3.6) but then I migrated to the developer edition (3.7). So I thougth there could be some old Weka library somewhere, thus I:

  1. unistalled the Weka
  2. deleted wekafiles directory
  3. deleted any weka.jar file from my disk
  4. installed Weka again

But I still keep getting the error.

I was searching quite a long for a solution, but found nothing... The useDynamic properties from GenericPropertiesCreator.props is set on true.

Would be really gratefull for any idea..... because I'm running out of them.

Thanks!

1

There are 1 answers

0
girip11 On

Snowball stemmer is available as a jar file in the following link along with its usage http://preciselyconcise.com/apis_and_installations/snowball_stemmer.php. The jar file can be included in your classpath