glencoesoftware/bioformats2raw

Null Pointer Exception error

ajaysingh096 opened this issue · 6 comments

When I tried to convert my .mrxs file to a new raw file, I ran into this error. Does anyone know a solution for this?:

Exception in thread "main" picocli.CommandLine$ExecutionException: Error while calling command (com.glencoesoftware.bioformats2raw.Converter@52af26ee): java.lang.NullPointerException
at picocli.CommandLine.executeUserObject(CommandLine.java:1792)
at picocli.CommandLine.access$900(CommandLine.java:145)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2150)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2144)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2108)
at picocli.CommandLine$AbstractParseResultHandler.handleParseResult(CommandLine.java:1968)
at picocli.CommandLine.parseWithHandlers(CommandLine.java:2349)
at picocli.CommandLine.parseWithHandler(CommandLine.java:2284)
at picocli.CommandLine.call(CommandLine.java:2560)
at com.glencoesoftware.bioformats2raw.Converter.main(Converter.java:1074)
Caused by: java.lang.NullPointerException
at org.joda.time.format.DateTimeFormatterBuilder$CharacterLiteral.parseInto(DateTimeFormatterBuilder.java:1224)
at org.joda.time.format.DateTimeFormatterBuilder$Composite.parseInto(DateTimeFormatterBuilder.java:2462)
at org.joda.time.format.InternalParserDateTimeParser.parseInto(InternalParserDateTimeParser.java:52)
at org.joda.time.format.DateTimeFormatterBuilder$MatchingParser.parseInto(DateTimeFormatterBuilder.java:2556)
at org.joda.time.format.DateTimeFormatter.parseDateTime(DateTimeFormatter.java:879)
at org.joda.time.Instant.parse(Instant.java:98)
at ome.xml.model.primitives.Timestamp.(Timestamp.java:74)
at com.glencoesoftware.bioformats2raw.MiraxReader.initFile(MiraxReader.java:853)
at loci.formats.FormatReader.setId(FormatReader.java:1389)
at loci.formats.ImageReader.setId(ImageReader.java:843)
at com.glencoesoftware.bioformats2raw.Converter.convert(Converter.java:412)
at com.glencoesoftware.bioformats2raw.Converter.call(Converter.java:356)
at com.glencoesoftware.bioformats2raw.Converter.call(Converter.java:90)
at picocli.CommandLine.executeUserObject(CommandLine.java:1783)
... 9 more

Also getting the NullPointerException error. on MacOS. Packages installed via conda.

@ajaysingh096 @jessecanada : are you using the latest version of bioformats2raw (0.4.0)? If not, do you still see an error message after upgrading?

Hi @melissalinkert : yes I'm using the latest version (0.4.0). I tried updating my JRE to the latest stable version but still no luck.

The error indicates that the timestamp stored in the Slidedat.ini file is not in the expected format. I would expect the changes in #128 to make the error message go away and allow the conversion to continue.

Can you try the build of #128 here:

https://ci.appveyor.com/api/buildjobs/hmheo81638pkj6qf/artifacts/build%2Fdistributions%2Fbioformats2raw-0.4.1-SNAPSHOT.zip

and see if that works? There should be a warning message like Could not parse acquistion date: ..., if you can paste the date shown in that message here that would be helpful.

Thank you for your help. Here is our message:

  • Could not parse acquisition date: 2011.11.02 10:11:55.919

@melissalinkert Although the 0.4.1-snapshot build was giving out a "could not parse acquisition date" message, we found out that it still went ahead and converted our .mrxs file to a raw file (it produced a folder named "zarr" and was contained in there).

The raw file also successfully converted to an OME.TIFF file using your raw2ometiff software.

Thank you for help and for providing this build for us!