NOTICE! This is a static HTML version of a legacy Fiji BugZilla bug.

The Fiji project now uses GitHub Issues for issue tracking.

Please file all new issues there.

Bug 402 - ij-launcher.jar missing after update
ij-launcher.jar missing after update
Status: RESOLVED FIXED
Product: Fiji
Classification: Unclassified
Component: Other
unspecified
PC Windows
: P2 normal
Assigned To: ImageJ Bugs Mailing List
Depends on:
Blocks:
 
Reported: 2012-02-13 20:15 CST by Satya Mishra
Modified: 2012-05-12 06:34 CDT
1 user (show)

See Also:

Description Satya Mishra 2012-02-13 20:15:47 CST
I downloaded Fiji from http://fiji.sc/downloads/Madison/fiji-win32-20110307.zip and did an update. After the update, Fiji failed to start with the following error:

Exception in thread "main" java.lang.NoClassDefFoundError: imagej/ClassLauncher
Caused by: java.lang.ClassNotFoundException: imagej.ClassLauncher
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find imagej/ClassLauncher

After some debug, I found that ij-launcher.jar was missing. 

To correct the upgrade, I copied fiji-win32.exe and jars/Fiji.jar back from the downloaded zip, and did an advanced update to manually install jars/ij-launcher.jar, update fiji-win32.exe . These steps solved the update problem.
Comment 1 Johannes Schindelin 2012-02-13 21:24:37 CST
Unfortunately, a few bits of information are missing. Even more unfortunate is the fact that I cannot reproduce (since I am most likely doing something different here): When I follow what instructions are provided, my Fiji updates correctly.

I _guess_ that somewhere in between, something failed and Fiji offered an error message.
Comment 2 Collin Poczatek 2012-04-02 22:50:48 CDT
I think I can add some info, since this seems to be happening to me as well and it seems to happen basically everytime.  First I'm running fiji from fiji-linux64-20110307.tar.bz2, on Ubuntu 10.10.  Also this has been happening for a while, ie weeks.

I'm pretty sure what's happening is that for whatever reason downloading a jar that's being updated fails.  In my case I suspect the crappy network I'm on.  So you end up with some incomplete/corrupt jar.  And I should stress that it's not a specific jar.  I've had it happen on I think, ij-launcher.jar, Track2EM.jar, clojure.jar, and Fiji_Updater.jar.  Johannes, maybe the only way to test is to pull your network cable during an update? :)


The first 3 exceptions below happen while the update is running, while the latter 2 are examples of exceptions that happen after restarting:


Exception in thread "Thread-1" java.lang.RuntimeException: Incorrect file size for /nrims/home3/cpoczatek/fiji/Fiji.app/update/plugins/Fiji_Updater.jar: 152136 (expected 234769)
	at fiji.updater.logic.Installer.verify(Installer.java:103)
	at fiji.updater.logic.Installer$VerifyFiles.itemDone(Installer.java:87)
	at fiji.updater.util.Progressable.itemDone(Progressable.java:47)
	at fiji.updater.util.Downloader.download(Downloader.java:104)
	at fiji.updater.util.Downloader.start(Downloader.java:59)
	at fiji.updater.logic.Installer.start(Installer.java:82)
	at fiji.updater.ui.UpdaterFrame.updateTheUpdater(UpdaterFrame.java:551)
	at fiji.updater.Updater.run(Updater.java:120)
	at fiji.updater.UptodateCheck.showDialog(UptodateCheck.java:181)
	at fiji.updater.UptodateCheck.checkOrShowDialog(UptodateCheck.java:59)
	at fiji.updater.UptodateCheck.run(UptodateCheck.java:40)
	at fiji.Main.gentlyRunPlugIn(Main.java:308)
	at fiji.Main.runUpdater(Main.java:299)
	at fiji.Main$1.run(Main.java:346)


java.lang.RuntimeException: Incorrect file size for /nrims/home3/cpoczatek/fiji/Fiji.app/update/plugins/TrakEM2_.jar: 358915 (expected 1807676)
	at fiji.updater.logic.Installer.verify(Installer.java:109)
	at fiji.updater.logic.Installer$VerifyFiles.itemDone(Installer.java:93)
	at fiji.updater.util.Progressable.itemDone(Progressable.java:47)
	at fiji.updater.util.Downloader.download(Downloader.java:104)
	at fiji.updater.util.Downloader.start(Downloader.java:59)
	at fiji.updater.logic.Installer.start(Installer.java:88)
	at fiji.updater.ui.UpdaterFrame.install(UpdaterFrame.java:566)
	at fiji.updater.ui.UpdaterFrame$12.run(UpdaterFrame.java:513)

java.lang.RuntimeException: Incorrect file size for /nrims/home3/cpoczatek/fiji/Fiji.app/update/jars/clojure.jar: 743479 (expected 3388194)
	at fiji.updater.logic.Installer.verify(Installer.java:109)
	at fiji.updater.logic.Installer$VerifyFiles.itemDone(Installer.java:93)
	at fiji.updater.util.Progressable.itemDone(Progressable.java:47)
	at fiji.updater.util.Downloader.download(Downloader.java:104)
	at fiji.updater.util.Downloader.start(Downloader.java:59)
	at fiji.updater.logic.Installer.start(Installer.java:88)
	at fiji.updater.ui.UpdaterFrame.install(UpdaterFrame.java:566)
	at fiji.updater.ui.UpdaterFrame$12.run(UpdaterFrame.java:513)


[pompeii@cpoczatek][Fiji.app] ./fiji-linux64
Exception in thread "main" java.lang.NoClassDefFoundError: imagej/ClassLauncher
Caused by: java.lang.ClassNotFoundException: imagej.ClassLauncher
	at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find imagej/ClassLauncher
[pompeii@cpoczatek][Fiji.app] 


[pompeii@cpoczatek][Fiji.app] ./fiji-linux64 
/nrims/home3/cpoczatek/fiji/Fiji.app/plugins/Fiji_Updater.jar: java.util.zip.ZipException: error in opening zip file
Comment 3 Johannes Schindelin 2012-04-20 22:32:14 CDT
The idea about pulling the network cable is a good one ;-)

I fear that we actually need to name the "update/" directory differently so that interrupted updates can never affect the next start of Fiji. Will try to find some time to work on that (it's not exactly trivial, and since I work on moving the Updater into ImageJ2, things get delayed a bit, sorry for that).
Comment 4 Johannes Schindelin 2012-05-12 06:34:13 CDT
This bug should be fixed by the most recent switch to the ImageJ2 version of the ImageJ launcher.