Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenSPIM update site needs to reconsider micromanager-dev dependency #2

Open
hinerm opened this issue May 27, 2015 · 5 comments
Open

Comments

@hinerm
Copy link
Member

hinerm commented May 27, 2015

The auto-enabling of the micromanager-dev update site is confusing, as there is no indication that it is tied to OpenSPIM.

When disabling micromanager-dev without disabling OpenSPIM, micromanager attempts to reinstall itself on Fiji restart.

See:
http://fiji.sc/bugzilla/show_bug.cgi?id=1075
https://list.nih.gov/cgi-bin/wa.exe?A2=ind1505&L=IMAGEJ&F=&S=&P=181254

So, we certainly need update site dependencies, but this silent work-around is problematic - especially given that micromanager-dev is not a public update site (e.g. not on the wiki or publicized anywhere else from what I can tell).

Also, to uninstall OpenSPIM I have to:

  1. Turn off the OpenSPIM update site
  2. Turn off micromanager-dev

If I try disabling both OpenSPIM and micromanager-dev simultaneously I get:

[ERROR] Cannot create plugin: class='org.scijava.plugins.scripting.javascript.JavaScriptScriptLanguage', name='JavaScript', priority=0.0, enabled=true, pluginType=ScriptLanguage
java.lang.NullPointerException
    at org.scijava.script.AdaptedScriptLanguage.<init>(AdaptedScriptLanguage.java:63)
    at org.scijava.script.AdaptedScriptLanguage.<init>(AdaptedScriptLanguage.java:73)
    at org.scijava.plugins.scripting.javascript.JavaScriptScriptLanguage.<init>(JavaScriptScriptLanguage.java:59)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
    at java.lang.Class.newInstance(Class.java:438)
    at org.scijava.plugin.PluginInfo.createInstance(PluginInfo.java:302)
    at org.scijava.plugin.DefaultPluginService.createInstance(DefaultPluginService.java:236)
    at org.scijava.plugin.DefaultPluginService.createInstances(DefaultPluginService.java:225)
    at org.scijava.plugin.DefaultPluginService.createInstancesOfType(DefaultPluginService.java:216)
    at org.scijava.plugin.AbstractSingletonService.initInstances(AbstractSingletonService.java:114)
    at org.scijava.plugin.AbstractSingletonService.getInstances(AbstractSingletonService.java:72)
    at org.scijava.script.DefaultScriptService.initScriptLanguageIndex(DefaultScriptService.java:342)
    at org.scijava.script.DefaultScriptService.scriptLanguageIndex(DefaultScriptService.java:307)
    at org.scijava.script.DefaultScriptService.getIndex(DefaultScriptService.java:117)
    at org.scijava.script.DefaultScriptService.canHandleFile(DefaultScriptService.java:233)
    at org.scijava.script.ScriptFinder.discoverScripts(ScriptFinder.java:131)
    at org.scijava.script.ScriptFinder.discoverScripts(ScriptFinder.java:125)
    at org.scijava.script.ScriptFinder.findScripts(ScriptFinder.java:93)
    at org.scijava.script.DefaultScriptService.initScripts(DefaultScriptService.java:391)
    at org.scijava.script.DefaultScriptService.scripts(DefaultScriptService.java:325)
    at org.scijava.script.DefaultScriptService.getScripts(DefaultScriptService.java:167)
    at net.imagej.legacy.LegacyService.getScriptsAndNonLegacyCommands(LegacyService.java:627)
    at net.imagej.legacy.IJ1Helper.addMenuItems(IJ1Helper.java:630)
    at net.imagej.legacy.LegacyService.initialize(LegacyService.java:501)
    at org.scijava.service.ServiceHelper.createServiceRecursively(ServiceHelper.java:353)
    at org.scijava.service.ServiceHelper.createExactService(ServiceHelper.java:269)
    at org.scijava.service.ServiceHelper.loadService(ServiceHelper.java:231)
    at org.scijava.service.ServiceHelper.loadService(ServiceHelper.java:194)
    at org.scijava.service.ServiceHelper.loadServices(ServiceHelper.java:166)
    at org.scijava.Context.<init>(Context.java:267)
    at org.scijava.Context.<init>(Context.java:224)
    at org.scijava.Context.<init>(Context.java:163)
    at org.scijava.Context.<init>(Context.java:119)
    at org.scijava.Context.<init>(Context.java:107)
    at net.imagej.ImageJ.<init>(ImageJ.java:82)
    at net.imagej.Main.launch(Main.java:61)
    at net.imagej.Main.main(Main.java:73)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at net.imagej.launcher.ClassLauncher.launch(ClassLauncher.java:258)
    at net.imagej.launcher.ClassLauncher.run(ClassLauncher.java:184)
    at net.imagej.launcher.ClassLauncher.main(ClassLauncher.java:76)
java.net.MalformedURLException
    at java.net.URL.<init>(URL.java:620)
    at java.net.URL.<init>(URL.java:483)
    at java.net.URL.<init>(URL.java:432)
    at net.imagej.updater.util.Downloader.download(Downloader.java:106)
    at net.imagej.updater.util.Downloader.start(Downloader.java:98)
    at net.imagej.updater.Installer.start(Installer.java:154)
    at net.imagej.ui.swing.updater.UpdaterFrame.install(UpdaterFrame.java:629)
    at net.imagej.ui.swing.updater.UpdaterFrame$13.run(UpdaterFrame.java:566)
Caused by: java.lang.NullPointerException
    at java.net.URL.<init>(URL.java:525)
@ctrueden
Copy link
Member

Cannot create plugin: class='org.scijava.plugins.scripting.javascript.JavaScriptScriptLanguage', name='JavaScript', priority=0.0, enabled=true, pluginType=ScriptLanguage
java.lang.NullPointerException
    at org.scijava.script.AdaptedScriptLanguage.<init>(AdaptedScriptLanguage.java:63)

This first exception is imagej/ImageJ#116.

@dscho
Copy link
Contributor

dscho commented May 27, 2015

OpenSPIM simply requires Micro-Manager. The users should not have reported this as a Fiji problem, because they clearly set up an OpenSPIM software. Not your fault, @hinerm & @ctrueden!

@dscho
Copy link
Contributor

dscho commented May 27, 2015

@hkmoon as a clue bat, maybe you could insert something like

Helper.log("Enabling the Micro-Manager-dev update site because OpenSPIM requires it!");

before

, and insert

public static void log(final String msg) {
   IJ.log(msg);
}

into https://github.com/openspim/openspim-app/blob/4469e05bca800b3957b4f12cc64a6f80ae48add3/src/main/java/org/openspim/app/Helper.java ... we cannot use ImageJ 1.x classes in the OpenSPIMService class directly because then they would be loaded already when loading (as opposed to running) the OpenSPIMService class, which would prevent the legacy support from runtime-patching the ImageJ 1.x classes.

@hkmoon
Copy link
Member

hkmoon commented May 28, 2015

@dscho Actually, do you want me to put those codes in the master branch?

@dscho
Copy link
Contributor

dscho commented Aug 27, 2015

Sorry for the late response: yep, on master. We will also have to upload a new build to the update site after that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants