Cannot run hyperstack reduce dimensionality in headless mode

Hi,

I’ve been trying to run a macro in headless mode on a linux platform, it works perfectly, until I try to reduce the dimensionality of my hyperstack to save each slice individually.
The relevant bit of code is:

for (j=1; j<=slices; j++) {
Stack.setSlice(j);
run(“Reduce Dimensionality…”, “frames keep”);
saveAs(“Tiff”, output+“Slice”+toString(j)+"_"+substring(title1,0,lengthOf(title1))+".tif");
selectWindow(title1);
close(“Slice*”);
call(“java.lang.System.gc”);
}

But when that part of the code runs I get:

java.lang.NullPointerException
at ij.plugin.HyperStackReducer.dialogItemChanged(HyperStackReducer.java:181)
at net.imagej.patcher.HeadlessGenericDialog.showDialog(HeadlessGenericDialog.java:220)
at ij.plugin.HyperStackReducer.showDialog(HyperStackReducer.java:168)
at ij.plugin.HyperStackReducer.run(HyperStackReducer.java:41)
at ij.IJ.runPlugIn(IJ.java:204)
at ij.Executer.runCommand(Executer.java:150)
at ij.Executer.run(Executer.java:68)
at ij.IJ.run(IJ.java:317)
at ij.IJ.run(IJ.java:328)
at ij.macro.Functions.doRun(Functions.java:686)
at ij.macro.Functions.doFunction(Functions.java:98)
at ij.macro.Interpreter.doStatement(Interpreter.java:278)
at ij.macro.Interpreter.doBlock(Interpreter.java:712)
at ij.macro.Interpreter.doStatement(Interpreter.java:323)
at ij.macro.Interpreter.doFor(Interpreter.java:634)
at ij.macro.Interpreter.doStatement(Interpreter.java:305)
at ij.macro.Interpreter.doBlock(Interpreter.java:712)
at ij.macro.Interpreter.doStatement(Interpreter.java:323)
at ij.macro.Interpreter.doIf(Interpreter.java:1090)
at ij.macro.Interpreter.doStatement(Interpreter.java:299)
at ij.macro.Interpreter.doIf(Interpreter.java:1103)
at ij.macro.Interpreter.doStatement(Interpreter.java:299)
at ij.macro.Interpreter.doBlock(Interpreter.java:712)
at ij.macro.Interpreter.doStatement(Interpreter.java:323)
at ij.macro.Interpreter.doFor(Interpreter.java:634)
at ij.macro.Interpreter.doStatement(Interpreter.java:305)
at ij.macro.Interpreter.doBlock(Interpreter.java:712)
at ij.macro.Interpreter.runUserFunction(Interpreter.java:400)
at ij.macro.Interpreter.doStatement(Interpreter.java:281)
at ij.macro.Interpreter.doStatements(Interpreter.java:264)
at ij.macro.Interpreter.run(Interpreter.java:160)
at ij.macro.Interpreter.run(Interpreter.java:93)
at ij.macro.Interpreter.run(Interpreter.java:104)
at ij.plugin.Macro_Runner.runMacro(Macro_Runner.java:161)
at ij.IJ.runMacro(IJ.java:153)
at ij.IJ.runMacro(IJ.java:142)
at net.imagej.legacy.IJ1Helper$3.call(IJ1Helper.java:1148)
at net.imagej.legacy.IJ1Helper$3.call(IJ1Helper.java:1144)
at net.imagej.legacy.IJ1Helper.runMacroFriendly(IJ1Helper.java:1095)
at net.imagej.legacy.IJ1Helper.runMacro(IJ1Helper.java:1144)
at net.imagej.legacy.plugin.IJ1MacroEngine.eval(IJ1MacroEngine.java:145)
at org.scijava.script.ScriptModule.run(ScriptModule.java:157)
at org.scijava.module.ModuleRunner.run(ModuleRunner.java:165)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:124)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:63)
at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:225)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

and the macro keeps running, saving the whole hyperstack instead of the reduced slice.

Any idea on how to fix this or if it’s an issue in HyperStackReducer not liking headless?

Kind regards,
Gilles

This bug should be fixed in the ImageJ 1.53g40 daily build.

This test macro

print(IJ.getFullVersion);
newImage("HyperStack", "16-bit grayscale-mode label", 400, 200, 3, 4, 5);
Stack.getDimensions(width, height, channels, slices, frames);
print("before: ", width, height, channels, slices, frames);
run("Reduce Dimensionality...", "frames keep");
Stack.getDimensions(width, height, channels, slices, frames);
print("after: ", width, height, channels, slices, frames);

outputs:

1.53g40
before: 400 200 3 4 5
after: 400 200 1 1 5

I also see numerous error messages on the console that I do not understand:

[ERROR] Invalid service: sc.fiji.filamentdetector.gui.GUIStatusService

java.lang.NullPointerException

at java.util.ArrayList.addAll(ArrayList.java:581)

at org.scijava.util.ClassUtils.getAnnotatedFields(ClassUtils.java:193)

at org.scijava.util.ClassUtils.getAnnotatedFields(ClassUtils.java:163)

at org.scijava.service.ServiceHelper.createServiceRecursively(ServiceHelper.java:315)

at org.scijava.service.ServiceHelper.createExactService(ServiceHelper.java:267)

at org.scijava.service.ServiceHelper.loadService(ServiceHelper.java:229)

at org.scijava.service.ServiceHelper.loadService(ServiceHelper.java:192)

at org.scijava.service.ServiceHelper.loadServices(ServiceHelper.java:164)

at org.scijava.Context.<init>(Context.java:278)

at org.scijava.Context.<init>(Context.java:234)

at org.scijava.Context.<init>(Context.java:174)

at org.scijava.Context.<init>(Context.java:160)

at net.imagej.ImageJ.<init>(ImageJ.java:77)

at net.imagej.Main.main(Main.java:54)

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:498)

at net.imagej.launcher.ClassLauncher.launch(ClassLauncher.java:291)

at net.imagej.launcher.ClassLauncher.run(ClassLauncher.java:198)

at net.imagej.launcher.ClassLauncher.main(ClassLauncher.java:89)

[ERROR] No match: sc.fiji.filamentdetector.gui.GUIStatusService

java.lang.IllegalArgumentException: Cannot modify method: public void run(java.lang.String arg)

at net.imagej.patcher.CodeHacker.insertAtTopOfMethod(CodeHacker.java:166)

at net.imagej.patcher.LegacyInjector.inject(LegacyInjector.java:288)

at net.imagej.patcher.LegacyInjector.injectHooks(LegacyInjector.java:107)

at net.imagej.patcher.LegacyEnvironment.initialize(LegacyEnvironment.java:100)

at net.imagej.patcher.LegacyEnvironment.applyPatches(LegacyEnvironment.java:494)

at net.imagej.patcher.LegacyInjector.preinit(LegacyInjector.java:395)

at net.imagej.patcher.LegacyInjector.preinit(LegacyInjector.java:374)

at net.imagej.legacy.LegacyService.<clinit>(LegacyService.java:141)

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:423)

at java.lang.Class.newInstance(Class.java:442)

at org.scijava.service.ServiceHelper.createServiceRecursively(ServiceHelper.java:300)

at org.scijava.service.ServiceHelper.createExactService(ServiceHelper.java:267)

at org.scijava.service.ServiceHelper.loadService(ServiceHelper.java:229)

at org.scijava.service.ServiceHelper.loadService(ServiceHelper.java:192)

at org.scijava.service.ServiceHelper.loadServices(ServiceHelper.java:164)

at org.scijava.Context.<init>(Context.java:278)

at org.scijava.Context.<init>(Context.java:234)

at org.scijava.Context.<init>(Context.java:174)

at org.scijava.Context.<init>(Context.java:160)

at net.imagej.ImageJ.<init>(ImageJ.java:77)

at net.imagej.Main.main(Main.java:54)

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:498)

at net.imagej.launcher.ClassLauncher.launch(ClassLauncher.java:291)

at net.imagej.launcher.ClassLauncher.run(ClassLauncher.java:198)

at net.imagej.launcher.ClassLauncher.main(ClassLauncher.java:89)

Caused by: java.lang.IllegalArgumentException: No such class: MacAdapter

at net.imagej.patcher.CodeHacker.getClass(CodeHacker.java:878)

at net.imagej.patcher.CodeHacker.getMethod(CodeHacker.java:904)

at net.imagej.patcher.CodeHacker.getBehavior(CodeHacker.java:894)

at net.imagej.patcher.CodeHacker.insertAtTopOfMethod(CodeHacker.java:157)

... 30 more

Caused by: javassist.NotFoundException: MacAdapter

at javassist.ClassPool.get(ClassPool.java:430)

at net.imagej.patcher.CodeHacker.getClass(CodeHacker.java:873)

... 33 more

java.lang.IllegalArgumentException: Cannot handle replace call to addCheckbox in ij.plugin.FolderOpener's boolean showDialog(ij.ImagePlus imp, java.lang.String[] list)

at net.imagej.patcher.CodeHacker.replaceCallInMethod(CodeHacker.java:723)

at net.imagej.patcher.LegacyExtensions.injectHooks(LegacyExtensions.java:267)

at net.imagej.patcher.LegacyInjector.inject(LegacyInjector.java:306)

at net.imagej.patcher.LegacyInjector.injectHooks(LegacyInjector.java:107)

at net.imagej.patcher.LegacyEnvironment.initialize(LegacyEnvironment.java:100)

at net.imagej.patcher.LegacyEnvironment.applyPatches(LegacyEnvironment.java:494)

at net.imagej.patcher.LegacyInjector.preinit(LegacyInjector.java:395)

at net.imagej.patcher.LegacyInjector.preinit(LegacyInjector.java:374)

at net.imagej.legacy.LegacyService.<clinit>(LegacyService.java:141)

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:423)

at java.lang.Class.newInstance(Class.java:442)

at org.scijava.service.ServiceHelper.createServiceRecursively(ServiceHelper.java:300)

at org.scijava.service.ServiceHelper.createExactService(ServiceHelper.java:267)

at org.scijava.service.ServiceHelper.loadService(ServiceHelper.java:229)

at org.scijava.service.ServiceHelper.loadService(ServiceHelper.java:192)

at org.scijava.service.ServiceHelper.loadServices(ServiceHelper.java:164)

at org.scijava.Context.<init>(Context.java:278)

at org.scijava.Context.<init>(Context.java:234)

at org.scijava.Context.<init>(Context.java:174)

at org.scijava.Context.<init>(Context.java:160)

at net.imagej.ImageJ.<init>(ImageJ.java:77)

at net.imagej.Main.main(Main.java:54)

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:498)

at net.imagej.launcher.ClassLauncher.launch(ClassLauncher.java:291)

at net.imagej.launcher.ClassLauncher.run(ClassLauncher.java:198)

at net.imagej.launcher.ClassLauncher.main(ClassLauncher.java:89)

Caused by: java.lang.IllegalArgumentException: No such method: boolean showDialog(ij.ImagePlus imp, java.lang.String[] list)

at net.imagej.patcher.CodeHacker.getMethod(CodeHacker.java:915)

at net.imagej.patcher.CodeHacker.getBehavior(CodeHacker.java:894)

at net.imagej.patcher.CodeHacker.replaceCallInMethod(CodeHacker.java:667)

... 31 more

Caused by: javassist.NotFoundException: showDialog(..) is not found in ij.plugin.FolderOpener

at javassist.CtClassType.getDeclaredMethod(CtClassType.java:1363)

at net.imagej.patcher.CodeHacker.getMethod(CodeHacker.java:912)

... 33 more

java.lang.IllegalArgumentException: Cannot handle replace call to getNextBoolean in ij.plugin.FolderOpener's boolean showDialog(ij.ImagePlus imp, java.lang.String[] list)

at net.imagej.patcher.CodeHacker.replaceCallInMethod(CodeHacker.java:723)

at net.imagej.patcher.LegacyExtensions.injectHooks(LegacyExtensions.java:271)

at net.imagej.patcher.LegacyInjector.inject(LegacyInjector.java:306)

at net.imagej.patcher.LegacyInjector.injectHooks(LegacyInjector.java:107)

at net.imagej.patcher.LegacyEnvironment.initialize(LegacyEnvironment.java:100)

at net.imagej.patcher.LegacyEnvironment.applyPatches(LegacyEnvironment.java:494)

at net.imagej.patcher.LegacyInjector.preinit(LegacyInjector.java:395)

at net.imagej.patcher.LegacyInjector.preinit(LegacyInjector.java:374)

at net.imagej.legacy.LegacyService.<clinit>(LegacyService.java:141)

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:423)

at java.lang.Class.newInstance(Class.java:442)

at org.scijava.service.ServiceHelper.createServiceRecursively(ServiceHelper.java:300)

at org.scijava.service.ServiceHelper.createExactService(ServiceHelper.java:267)

at org.scijava.service.ServiceHelper.loadService(ServiceHelper.java:229)

at org.scijava.service.ServiceHelper.loadService(ServiceHelper.java:192)

at org.scijava.service.ServiceHelper.loadServices(ServiceHelper.java:164)

at org.scijava.Context.<init>(Context.java:278)

at org.scijava.Context.<init>(Context.java:234)

at org.scijava.Context.<init>(Context.java:174)

at org.scijava.Context.<init>(Context.java:160)

at net.imagej.ImageJ.<init>(ImageJ.java:77)

at net.imagej.Main.main(Main.java:54)

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:498)

at net.imagej.launcher.ClassLauncher.launch(ClassLauncher.java:291)

at net.imagej.launcher.ClassLauncher.run(ClassLauncher.java:198)

at net.imagej.launcher.ClassLauncher.main(ClassLauncher.java:89)

Caused by: java.lang.IllegalArgumentException: No such method: boolean showDialog(ij.ImagePlus imp, java.lang.String[] list)

at net.imagej.patcher.CodeHacker.getMethod(CodeHacker.java:915)

at net.imagej.patcher.CodeHacker.getBehavior(CodeHacker.java:894)

at net.imagej.patcher.CodeHacker.replaceCallInMethod(CodeHacker.java:667)

... 31 more

Caused by: javassist.NotFoundException: showDialog(..) is not found in ij.plugin.FolderOpener

at javassist.CtClassType.getDeclaredMethod(CtClassType.java:1363)

at net.imagej.patcher.CodeHacker.getMethod(CodeHacker.java:912)

... 33 more

java.lang.IllegalArgumentException: Method void createMacro() in ij.plugin.frame.Recorder does not return on null

at net.imagej.patcher.CodeHacker.dontReturnOnNull(CodeHacker.java:497)

at net.imagej.patcher.LegacyExtensions.addEditorExtensionPoints(LegacyExtensions.java:320)

at net.imagej.patcher.LegacyExtensions.injectHooks(LegacyExtensions.java:287)

at net.imagej.patcher.LegacyInjector.inject(LegacyInjector.java:306)

at net.imagej.patcher.LegacyInjector.injectHooks(LegacyInjector.java:107)

at net.imagej.patcher.LegacyEnvironment.initialize(LegacyEnvironment.java:100)

at net.imagej.patcher.LegacyEnvironment.applyPatches(LegacyEnvironment.java:494)

at net.imagej.patcher.LegacyInjector.preinit(LegacyInjector.java:395)

at net.imagej.patcher.LegacyInjector.preinit(LegacyInjector.java:374)

at net.imagej.legacy.LegacyService.<clinit>(LegacyService.java:141)

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:423)

at java.lang.Class.newInstance(Class.java:442)

at org.scijava.service.ServiceHelper.createServiceRecursively(ServiceHelper.java:300)

at org.scijava.service.ServiceHelper.createExactService(ServiceHelper.java:267)

at org.scijava.service.ServiceHelper.loadService(ServiceHelper.java:229)

at org.scijava.service.ServiceHelper.loadService(ServiceHelper.java:192)

at org.scijava.service.ServiceHelper.loadServices(ServiceHelper.java:164)

at org.scijava.Context.<init>(Context.java:278)

at org.scijava.Context.<init>(Context.java:234)

at org.scijava.Context.<init>(Context.java:174)

at org.scijava.Context.<init>(Context.java:160)

at net.imagej.ImageJ.<init>(ImageJ.java:77)

at net.imagej.Main.main(Main.java:54)

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:498)

at net.imagej.launcher.ClassLauncher.launch(ClassLauncher.java:291)

at net.imagej.launcher.ClassLauncher.run(ClassLauncher.java:198)

at net.imagej.launcher.ClassLauncher.main(ClassLauncher.java:89)

java.lang.IllegalArgumentException: Cannot handle replace call to runPlugIn in ij.plugin.frame.Recorder's void createMacro()

at net.imagej.patcher.CodeHacker.replaceCallInMethod(CodeHacker.java:723)

at net.imagej.patcher.CodeHacker.replaceCallInMethod(CodeHacker.java:648)

at net.imagej.patcher.LegacyExtensions.addEditorExtensionPoints(LegacyExtensions.java:321)

at net.imagej.patcher.LegacyExtensions.injectHooks(LegacyExtensions.java:287)

at net.imagej.patcher.LegacyInjector.inject(LegacyInjector.java:306)

at net.imagej.patcher.LegacyInjector.injectHooks(LegacyInjector.java:107)

at net.imagej.patcher.LegacyEnvironment.initialize(LegacyEnvironment.java:100)

at net.imagej.patcher.LegacyEnvironment.applyPatches(LegacyEnvironment.java:494)

at net.imagej.patcher.LegacyInjector.preinit(LegacyInjector.java:395)

at net.imagej.patcher.LegacyInjector.preinit(LegacyInjector.java:374)

at net.imagej.legacy.LegacyService.<clinit>(LegacyService.java:141)

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:423)

at java.lang.Class.newInstance(Class.java:442)

at org.scijava.service.ServiceHelper.createServiceRecursively(ServiceHelper.java:300)

at org.scijava.service.ServiceHelper.createExactService(ServiceHelper.java:267)

at org.scijava.service.ServiceHelper.loadService(ServiceHelper.java:229)

at org.scijava.service.ServiceHelper.loadService(ServiceHelper.java:192)

at org.scijava.service.ServiceHelper.loadServices(ServiceHelper.java:164)

at org.scijava.Context.<init>(Context.java:278)

at org.scijava.Context.<init>(Context.java:234)

at org.scijava.Context.<init>(Context.java:174)

at org.scijava.Context.<init>(Context.java:160)

at net.imagej.ImageJ.<init>(ImageJ.java:77)

at net.imagej.Main.main(Main.java:54)

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:498)

at net.imagej.launcher.ClassLauncher.launch(ClassLauncher.java:291)

at net.imagej.launcher.ClassLauncher.run(ClassLauncher.java:198)

at net.imagej.launcher.ClassLauncher.main(ClassLauncher.java:89)

Caused by: javassist.CannotCompileException: No code replaced!

at net.imagej.patcher.CodeHacker$EagerExprEditor.instrument(CodeHacker.java:1290)

at net.imagej.patcher.CodeHacker.replaceCallInMethod(CodeHacker.java:720)

... 33 more

java.lang.IllegalArgumentException: Cannot modify method: public void run(java.lang.String arg)

at net.imagej.patcher.CodeHacker.insertAtTopOfMethod(CodeHacker.java:166)

at net.imagej.patcher.LegacyExtensions.handleMacAdapter(LegacyExtensions.java:556)

at net.imagej.patcher.LegacyExtensions.injectHooks(LegacyExtensions.java:292)

at net.imagej.patcher.LegacyInjector.inject(LegacyInjector.java:306)

at net.imagej.patcher.LegacyInjector.injectHooks(LegacyInjector.java:107)

at net.imagej.patcher.LegacyEnvironment.initialize(LegacyEnvironment.java:100)

at net.imagej.patcher.LegacyEnvironment.applyPatches(LegacyEnvironment.java:494)

at net.imagej.patcher.LegacyInjector.preinit(LegacyInjector.java:395)

at net.imagej.patcher.LegacyInjector.preinit(LegacyInjector.java:374)

at net.imagej.legacy.LegacyService.<clinit>(LegacyService.java:141)

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:423)

at java.lang.Class.newInstance(Class.java:442)

at org.scijava.service.ServiceHelper.createServiceRecursively(ServiceHelper.java:300)

at org.scijava.service.ServiceHelper.createExactService(ServiceHelper.java:267)

at org.scijava.service.ServiceHelper.loadService(ServiceHelper.java:229)

at org.scijava.service.ServiceHelper.loadService(ServiceHelper.java:192)

at org.scijava.service.ServiceHelper.loadServices(ServiceHelper.java:164)

at org.scijava.Context.<init>(Context.java:278)

at org.scijava.Context.<init>(Context.java:234)

at org.scijava.Context.<init>(Context.java:174)

at org.scijava.Context.<init>(Context.java:160)

at net.imagej.ImageJ.<init>(ImageJ.java:77)

at net.imagej.Main.main(Main.java:54)

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:498)

at net.imagej.launcher.ClassLauncher.launch(ClassLauncher.java:291)

at net.imagej.launcher.ClassLauncher.run(ClassLauncher.java:198)

at net.imagej.launcher.ClassLauncher.main(ClassLauncher.java:89)

Caused by: java.lang.IllegalArgumentException: No such class: MacAdapter

at net.imagej.patcher.CodeHacker.getClass(CodeHacker.java:878)

at net.imagej.patcher.CodeHacker.getMethod(CodeHacker.java:904)

at net.imagej.patcher.CodeHacker.getBehavior(CodeHacker.java:894)

at net.imagej.patcher.CodeHacker.insertAtTopOfMethod(CodeHacker.java:157)

... 32 more

Caused by: javassist.NotFoundException: MacAdapter

at javassist.ClassPool.get(ClassPool.java:430)

at net.imagej.patcher.CodeHacker.getClass(CodeHacker.java:873)

... 35 more
1 Like

See also:

Awesome, it works well now!

Cheers,
Gilles