[ImageJ-devel] Jython error

Johannes Schindelin Johannes.Schindelin at gmx.de
Wed Apr 9 16:02:26 CDT 2014


Hi Brian,

On Wed, 9 Apr 2014, Brian Northan wrote:

> I just updated to pom-scijava-1.55

I hope you mean pom-scijava 1.155, not 1.55.

> and am having trouble running a jython script (was working fine until I
> updated, I hadn't updated in a few weeks so I don't know exactly when it
> broke).
> 
> when I call "os.path.exists" I get...
> 
> "java.lang.IncompatibleClassChangeError: Found class
> com.kenai.jffi.InvocationBuffer, but interface was expected"

It is one of those problems caused by other software maintainers being
overly happy to include soon-to-be-outdated dependencies in their .jar
files. In particular, when I run

$ ./bin/find-jar-for-class.bsh com.kenai.jffi.InvocationBuffer
Class com.kenai.jffi.InvocationBuffer is in .../jruby-complete-1.7.11.jar
Class com.kenai.jffi.InvocationBuffer is in .../jython-2.5.2.jar
Class com.kenai.jffi.InvocationBuffer is in .../jruby-1.6.7.2.jar

I see that the class/interface is in the two biggest offenders: JRuby
and Jython. Most likely, one of them has an obsolete version of jffi
bundled, and another one accesses that obsolete version by mistake.

If you have jruby 1.6.7.2, try to delete that .jar (it is a game of luck
which of your .jar files appears in the class path first, so I would
strongly suggest to delete it rather than renaming it).

Ciao,
Johannes



More information about the ImageJ-devel mailing list