Error when running ScientiFig

dependencies
scientifig
plugin
Tags: #<Tag:0x00007fd542fa6d50> #<Tag:0x00007fd542fa6b98> #<Tag:0x00007fd542fa6a30>

#1

Trying to run ScientiFig this evening, and immediately after selecting it from the Plugins menu, I get the following in an “Exception” text window.

(Fiji Is Just) ImageJ 2.0.0-rc-43/1.51q26; Java 1.8.0_144 [32-bit]; Windows 7 6.1; 19MB of 1024MB (1%)
 
java.lang.NoClassDefFoundError: org/apache/batik/ext/awt/image/spi/RegistryEntry
	at sf_ext_lancher.SF_ext_lancher.run(SF_ext_lancher.java:44)
	at ij.IJ.runUserPlugIn(IJ.java:219)
	at ij.IJ.runPlugIn(IJ.java:183)
	at ij.Executer.runCommand(Executer.java:137)
	at ij.Executer.run(Executer.java:66)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: org.apache.batik.ext.awt.image.spi.RegistryEntry
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 6 more

I’ve uninstalled and reinstalled via the Fiji updater. I’m not the expert on Java errors, but it looks like maybe Batik is a dependency, and is no longer installed? Would manually installing an earlier version of ScientiFig pull it back in, or is Batik installed via some other package? Or am I off in the weeds?


#2

OK, slightly embarrassed to be posting a fix this quickly. My search for ScientiFig came up dry, but searching for Batik resulted in this post, explaining that it is related to the Java 6 Legacy/Java 8 update sites that have been mentioned a couple times. In my case, I need to enable the Java 8 update site.


#3

@jimpassmore

Dear Jim,

there are two ways to solve the issue:

1- If you don’t mind updating your FIJI then download and install the latest FIJI (bundled with java 8) from ‘http://fiji.sc/’. Launch this new FIJI and run the updater to install the ‘ScientiFig’ update site (please see https://imagej.net/Following_an_update_site for a great tutorial on update sites)

2- If, on the other hand, you prefer to keep your ‘aging’ FIJI as it is (and/or prefer to keep using java 1.6), then you must enable the new ‘Scientifig-deprecated’ update site together with the ‘Fiji-Legacy’ update site while inactivating the ‘ScientiFig’ and the ‘java-8’ update sites.

Both solutions should work, but please let me know otherwise. Please also note that ‘Scientifig-deprecated’ is an old version of the software that contains a few known bugs and that will never be updated. I just created it for users that have an old FIJI bundled with java 6 and prefer not to install a more recent version (probably because they fear they may lose cool plugins during the transition, which is something I can totally understand).

For the record the issue comes from the fact that ‘FIJI-legacy’ contains batik 1.8 whereas ‘java-8’ contains batik 1.9 and some classes have been moved between the two versions of the batik library making it hard/impossible to use the same code with both versions (and thereby making the last version of SF not compatible with old FIJIs). Hopefully, I’ll be able to find a better fix for that in the future rather than creating a deprecated update site, but that is the only solution that came to my mind for now.

Sorry for the inconvenience and thanks a lot for using this software.

best,

benoit

ps: I have just modified the SF launcher so that it reports all problems it can detect and prints several guidelines on how to fix these issues