Task #10170 (closed)
Bug: FS mias import
| Reported by: | wmoore | Owned by: | mlinkert |
|---|---|---|---|
| Priority: | major | Milestone: | 5.0.0-beta1 |
| Component: | Import | Version: | n.a. |
| Keywords: | FS | Cc: | fs@… |
| Resources: | n.a. | Referenced By: | n.a. |
| References: | n.a. | Remaining Time: | 0.0d |
| Sprint: | FS Demo 2 |
Description
Importing mias / frans / siRNA_PRIM1_03102008 / 001-365700055641
java.lang.RuntimeException: Failure response on import!
Category: ::omero::grid::ImportRequest
Name: import-request-failure
Parameters: {message=ImageReader.getSeriesCount: Current file should not be null; call setId(String) first, stacktrace=java.lang.IllegalStateException: ImageReader.getSeriesCount: Current file should not be null; call setId(String) first
at loci.formats.FormatTools.assertId(FormatTools.java:713)
at loci.formats.ImageReader.getReader(ImageReader.java:202)
at loci.formats.ImageReader.getSeriesCount(ImageReader.java:433)
at loci.formats.ReaderWrapper.getSeriesCount(ReaderWrapper.java:338)
at loci.formats.ReaderWrapper.getSeriesCount(ReaderWrapper.java:338)
at loci.formats.ReaderWrapper.getSeriesCount(ReaderWrapper.java:338)
at ome.services.blitz.repo.ManagedImportRequestI.pixelData(ManagedImportRequestI.java:374)
at ome.services.blitz.repo.ManagedImportRequestI.step(ManagedImportRequestI.java:265)
at omero.cmd.HandleI.steps(HandleI.java:435)
at omero.cmd.HandleI$1.doWork(HandleI.java:365)
at omero.cmd.HandleI$1.doWork(HandleI.java:363)
Change History (9)
comment:1 Changed 7 years ago by wmoore
comment:2 Changed 7 years ago by pwalczysko
Originally reported by ajpatterson, see Ticket #10121.
Import of file failed after about 13 mins.
mias/frans/MIAS 3 D set 2 july 13 2009/
It did create an empty screen in insight.
java.lang.RuntimeException: Failure response on import!
Category: ::omero::grid::ImportRequest
Name: import-request-failure
Parameters: {message=ImageReader.getSeriesCount: Current file should not be null; call setId(String) first, stacktrace=java.lang.IllegalStateException: ImageReader.getSeriesCount: Current file should not be null; call setId(String) first
at loci.formats.FormatTools.assertId(FormatTools.java:713)
at loci.formats.ImageReader.getReader(ImageReader.java:202)
at loci.formats.ImageReader.getSeriesCount(ImageReader.java:433)
at loci.formats.ReaderWrapper.getSeriesCount(ReaderWrapper.java:338)
at loci.formats.ReaderWrapper.getSeriesCount(ReaderWrapper.java:338)
at loci.formats.ReaderWrapper.getSeriesCount(ReaderWrapper.java:338)
at ome.services.blitz.repo.ManagedImportRequestI.pixelData(ManagedImportRequestI.java:374)
at ome.services.blitz.repo.ManagedImportRequestI.step(ManagedImportRequestI.java:265)
at omero.cmd.HandleI.steps(HandleI.java:435)
at omero.cmd.HandleI$1.doWork(HandleI.java:365)
at omero.cmd.HandleI$1.doWork(HandleI.java:363)
at sun.reflect.GeneratedMethodAccessor245.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at ome.services.util.Executor$Impl$Interceptor.invoke(Executor.java:518)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at ome.security.basic.EventHandler.invoke(EventHandler.java:154)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.orm.hibernate3.HibernateInterceptor.invoke(HibernateInterceptor.java:111)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:108)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at ome.tools.hibernate.ProxyCleanupFilter$Interceptor.invoke(ProxyCleanupFilter.java:241)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at ome.services.util.ServiceHandler.invoke(ServiceHandler.java:116)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy65.doWork(Unknown Source)
at ome.services.util.Executor$Impl.execute(Executor.java:416)
at omero.cmd.HandleI.run(HandleI.java:359)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
at ome.services.util.Executor$Impl$1.call(Executor.java:447)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
at java.util.concurrent.FutureTask.run(FutureTask.java:123)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:651)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:676)
at java.lang.Thread.run(Thread.java:595)
}
at ome.formats.importer.ImportLibrary.getImportResponse(ImportLibrary.java:437)
at ome.formats.importer.ImportLibrary.importImage(ImportLibrary.java:397)
at org.openmicroscopy.shoola.env.data.OMEROGateway.importImageNew(OMEROGateway.java:6537)
at org.openmicroscopy.shoola.env.data.OMEROGateway.importImage(OMEROGateway.java:6520)
at org.openmicroscopy.shoola.env.data.OmeroImageServiceImpl.importCandidates(OmeroImageServiceImpl.java:201)
at org.openmicroscopy.shoola.env.data.OmeroImageServiceImpl.importFile(OmeroImageServiceImpl.java:1327)
at org.openmicroscopy.shoola.env.data.views.calls.ImagesImporter.importFile(ImagesImporter.java:85)
at org.openmicroscopy.shoola.env.data.views.calls.ImagesImporter.access$000(ImagesImporter.java:54)
at org.openmicroscopy.shoola.env.data.views.calls.ImagesImporter$1.doCall(ImagesImporter.java:110)
at org.openmicroscopy.shoola.env.data.views.BatchCall.doStep(BatchCall.java:144)
at org.openmicroscopy.shoola.util.concur.tasks.CompositeTask.doStep(CompositeTask.java:226)
at org.openmicroscopy.shoola.env.data.views.CompositeBatchCall.doStep(CompositeBatchCall.java:126)
at org.openmicroscopy.shoola.util.concur.tasks.ExecCommand.exec(ExecCommand.java:165)
at org.openmicroscopy.shoola.util.concur.tasks.ExecCommand.run(ExecCommand.java:276)
at org.openmicroscopy.shoola.util.concur.tasks.AsyncProcessor$Runner.run(AsyncProcessor.java:91)
at java.lang.Thread.run(Thread.java:680)
at org.openmicroscopy.shoola.env.data.OMEROGateway.importImageNew(OMEROGateway.java:6584)
at org.openmicroscopy.shoola.env.data.OMEROGateway.importImage(OMEROGateway.java:6520)
at org.openmicroscopy.shoola.env.data.OmeroImageServiceImpl.importCandidates(OmeroImageServiceImpl.java:201)
at org.openmicroscopy.shoola.env.data.OmeroImageServiceImpl.importFile(OmeroImageServiceImpl.java:1327)
at org.openmicroscopy.shoola.env.data.views.calls.ImagesImporter.importFile(ImagesImporter.java:85)
at org.openmicroscopy.shoola.env.data.views.calls.ImagesImporter.access$000(ImagesImporter.java:54)
at org.openmicroscopy.shoola.env.data.views.calls.ImagesImporter$1.doCall(ImagesImporter.java:110)
at org.openmicroscopy.shoola.env.data.views.BatchCall.doStep(BatchCall.java:144)
at org.openmicroscopy.shoola.util.concur.tasks.CompositeTask.doStep(CompositeTask.java:226)
at org.openmicroscopy.shoola.env.data.views.CompositeBatchCall.doStep(CompositeBatchCall.java:126)
at org.openmicroscopy.shoola.util.concur.tasks.ExecCommand.exec(ExecCommand.java:165)
at org.openmicroscopy.shoola.util.concur.tasks.ExecCommand.run(ExecCommand.java:276)
at org.openmicroscopy.shoola.util.concur.tasks.AsyncProcessor$Runner.run(AsyncProcessor.java:91)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.RuntimeException: Failure response on import!
Category: ::omero::grid::ImportRequest
Name: import-request-failure
Parameters: {message=ImageReader.getSeriesCount: Current file should not be null; call setId(String) first, stacktrace=java.lang.IllegalStateException: ImageReader.getSeriesCount: Current file should not be null; call setId(String) first
at loci.formats.FormatTools.assertId(FormatTools.java:713)
at loci.formats.ImageReader.getReader(ImageReader.java:202)
at loci.formats.ImageReader.getSeriesCount(ImageReader.java:433)
at loci.formats.ReaderWrapper.getSeriesCount(ReaderWrapper.java:338)
at loci.formats.ReaderWrapper.getSeriesCount(ReaderWrapper.java:338)
at loci.formats.ReaderWrapper.getSeriesCount(ReaderWrapper.java:338)
at ome.services.blitz.repo.ManagedImportRequestI.pixelData(ManagedImportRequestI.java:374)
at ome.services.blitz.repo.ManagedImportRequestI.step(ManagedImportRequestI.java:265)
at omero.cmd.HandleI.steps(HandleI.java:435)
at omero.cmd.HandleI$1.doWork(HandleI.java:365)
at omero.cmd.HandleI$1.doWork(HandleI.java:363)
at sun.reflect.GeneratedMethodAccessor245.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at ome.services.util.Executor$Impl$Interceptor.invoke(Executor.java:518)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at ome.security.basic.EventHandler.invoke(EventHandler.java:154)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.orm.hibernate3.HibernateInterceptor.invoke(HibernateInterceptor.java:111)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:108)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at ome.tools.hibernate.ProxyCleanupFilter$Interceptor.invoke(ProxyCleanupFilter.java:241)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at ome.services.util.ServiceHandler.invoke(ServiceHandler.java:116)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy65.doWork(Unknown Source)
at ome.services.util.Executor$Impl.execute(Executor.java:416)
at omero.cmd.HandleI.run(HandleI.java:359)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
at ome.services.util.Executor$Impl$1.call(Executor.java:447)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
at java.util.concurrent.FutureTask.run(FutureTask.java:123)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:651)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:676)
at java.lang.Thread.run(Thread.java:595)
}
at ome.formats.importer.ImportLibrary.getImportResponse(ImportLibrary.java:437)
at ome.formats.importer.ImportLibrary.importImage(ImportLibrary.java:397)
at org.openmicroscopy.shoola.env.data.OMEROGateway.importImageNew(OMEROGateway.java:6537)
... 13 more
comment:3 Changed 6 years ago by jmoore
- Milestone changed from OMERO-4.5 to OMERO-5
- Sprint set to FS Demo 2
Melissa, is there any way to make these changes without closing the reader? Or will just calling setId in the finally suffice? Any faster way to do it?
/**
* If available, populates overlays for a given set of pixels objects.
* @param pixelsList Pixels objects to populate overlays for.
* @param plateIds Plate object IDs to populate overlays for.
*/
private void importOverlays(
List<Pixels> pixelsList, List<Long> plateIds)
throws FormatException, IOException
{
IFormatReader baseReader = reader.getImageReader().getReader();
if (baseReader instanceof MIASReader)
{
try
{
MIASReader miasReader = (MIASReader) baseReader;
String currentFile = miasReader.getCurrentFile();
reader.close();
miasReader.setAutomaticallyParseMasks(true);
ServiceFactoryPrx sf = store.getServiceFactory();
OverlayMetadataStore s = new OverlayMetadataStore();
s.initialize(sf, pixelsList, plateIds);
reader.setMetadataStore(s);
miasReader.close();
miasReader.setAutomaticallyParseMasks(true);
miasReader.setId(currentFile);
s.complete();
}
catch (ServerError e)
{
log.warn("Error while populating MIAS overlays.", e);
}
finally
{
reader.close();
reader.setMetadataStore(store);
}
}
}
comment:4 Changed 6 years ago by mlinkert
Should be possible to split the mask parsing out into a single method that you can call post-setId. You would then end up with something like:
IFormatReader baseReader = reader.getImageReader().getReader();
if (baseReader instanceof MIASReader)
{
try
{
MIASReader miasReader = (MIASReader) baseReader;
ServiceFactoryPrx sf = store.getServiceFactory();
OverlayMetadataStore s = new OverlayMetadataStore();
s.initialize(sf, pixelsList, plateIds);
miasReader.parseMasks(s);
s.complete();
}
catch (ServerError e)
{
log.warn("Error while populating MIAS overlays.", e);
}
}
comment:5 Changed 6 years ago by jmoore
- Owner changed from jmoore to mlinkert
Melissa, that would be great. The only question is if this should be a part of an interface somewhere so that we don't have to cast to MIASReader, but I'll leave that to you.
comment:6 Changed 6 years ago by mlinkert
Bio-Formats PR opened: https://github.com/openmicroscopy/bioformats/pull/372
comment:7 Changed 6 years ago by jmoore
- Resolution set to fixed
- Status changed from new to closed
OMERO PR opened: https://github.com/openmicroscopy/openmicroscopy/pull/726
Should be available in tomorrow's build. Closing.
comment:8 Changed 6 years ago by jmoore <josh@…>
- Remaining Time set to 0
(In [9a08cc38819e88a873b25d8d728cdc32cebe1952/ome.git] on branch develop) Use MIASReader.parseMasks (Fix #10170)
Make use of the newly added parseMasks method which doesn't
require closing and re-opening the reader. This commit needs:
openmicroscopy/bioformats@20308cee521787e9ecab341953f84c7e0d08a9b7
comment:9 Changed 6 years ago by Josh Moore <josh@…>
(In [70a839eb6992dae75eb3fdd9795b689ca7bcf7ab/ome.git] on branch develop) Merge pull request #726 from joshmoore/10170-fs-mias
Use MIASReader.parseMasks (Fix #10170)
Josh:
Well, that would explain it:
MIASReader miasReader = (MIASReader) baseReader; String currentFile = miasReader.getCurrentFile(); reader.close(); ....I.e. special handling of mias.