Hi, Currently new io.scif.img.ImgOpener(); fails with java.lang.IllegalArgumentException: Invalid service: net.imagej.legacy.LegacyAppEventService
To reproduce run new io.scif.img.ImgOpener(); in Beanshell interpreter. The exception displayed in Beanshell interpreter is a bit non-helpful. Benjamin Schmid noticed the error, when it occurred in BigDataViewer’s ExportSpimSequencePlugIn. Here is the exception from that, which is a bit more detailed java.lang.IllegalArgumentException: Invalid service: net.imagej.legacy.LegacyAppEventService at org.scijava.service.ServiceHelper.createExactService(ServiceHelper.java:280) 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:244) at org.scijava.Context.<init>(Context.java:203) at org.scijava.Context.<init>(Context.java:142) at org.scijava.Context.<init>(Context.java:128) at io.scif.img.AbstractImgIOComponent.<init>(AbstractImgIOComponent.java:57) at io.scif.img.ImgOpener.<init>(ImgOpener.java:94) at bdv.ij.export.imgloader.StackImageLoader.<init>(StackImageLoader.java:52) at bdv.ij.export.SpimRegistrationSequence.createImageLoader(SpimRegistrationSequence.java:109) at bdv.ij.export.SpimRegistrationSequence.<init>(SpimRegistrationSequence.java:56) at bdv.ij.ExportSpimSequencePlugIn.getParameters(ExportSpimSequencePlugIn.java:490) at bdv.ij.ExportSpimSequencePlugIn.run(ExportSpimSequencePlugIn.java:52) at ij.IJ.runUserPlugIn(IJ.java:202) at ij.IJ.runPlugIn(IJ.java:166) at ij.Executer.runCommand(Executer.java:131) at ij.Executer.run(Executer.java:64) at java.lang.Thread.run(Thread.java:744) Caused by: java.lang.IllegalArgumentException: Invalid service: net.imagej.legacy.DefaultLegacyService at org.scijava.service.ServiceHelper.createExactService(ServiceHelper.java:280) at org.scijava.service.ServiceHelper.loadService(ServiceHelper.java:231) at org.scijava.service.ServiceHelper.createServiceRecursively(ServiceHelper.java:340) at org.scijava.service.ServiceHelper.createExactService(ServiceHelper.java:269) ... 19 more Caused by: java.lang.UnsupportedOperationException: Cannot instantiate more than one DefaultLegacyService at net.imagej.legacy.DefaultLegacyService.checkInstance(DefaultLegacyService.java:606) at net.imagej.legacy.DefaultLegacyService.initialize(DefaultLegacyService.java:411) at org.scijava.service.ServiceHelper.createServiceRecursively(ServiceHelper.java:353) at org.scijava.service.ServiceHelper.createExactService(ServiceHelper.java:269) ... 22 more Caused by: java.lang.Throwable: Initialized here: at net.imagej.legacy.DefaultLegacyService.initialize(DefaultLegacyService.java:429) 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.createServiceRecursively(ServiceHelper.java:340) 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:244) at org.scijava.Context.<init>(Context.java:203) at org.scijava.Context.<init>(Context.java:142) at org.scijava.Context.<init>(Context.java:98) at org.scijava.Context.<init>(Context.java:86) 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:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) 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) best regards, Tobias
signature.asc
Description: Message signed with OpenPGP using GPGMail
_______________________________________________ ImageJ-devel mailing list ImageJ-devel@imagej.net http://imagej.net/mailman/listinfo/imagej-devel