Matlab R2017b and bfopen error
Posted: Wed Sep 27, 2017 2:34 pm
Hello,
after update of Matlab to R2017b use of bfopen gives an error. I believe it has something to do with java version that Matlab is using because on R2017a everything is fine.
Is there a way to fix this?
The command I used to open a file:
data = bfopen('d:\DataMix\PLSNLS\07_PLSNLS.zvi');
Error message in R2017b:
Error using bfGetReader (line 75)
Java exception occurred:
java.lang.NoSuchFieldError: MICROMETER
at loci.formats.in.NiftiReader.<init>(NiftiReader.java:78)
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 loci.formats.ImageReader.<init>(ImageReader.java:129)
at loci.formats.in.FilePatternReader.<init>(FilePatternReader.java:77)
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 loci.formats.ImageReader.<init>(ImageReader.java:129)
at loci.formats.ImageReader.<init>(ImageReader.java:116)
at loci.formats.ReaderWrapper.<init>(ReaderWrapper.java:61)
at loci.formats.ChannelFiller.<init>(ChannelFiller.java:71)
Error in bfopen (line 114)
r = bfGetReader(id, stitchFiles);
Java version in R2017a:
Java 1.7.0_60-b19 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
Java version in R2017b:
Java 1.8.0_121-b13 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
BioFormats version: 5.7.1 (2017 September 20)
Thanks!
Ilya
after update of Matlab to R2017b use of bfopen gives an error. I believe it has something to do with java version that Matlab is using because on R2017a everything is fine.
Is there a way to fix this?
The command I used to open a file:
data = bfopen('d:\DataMix\PLSNLS\07_PLSNLS.zvi');
Error message in R2017b:
Error using bfGetReader (line 75)
Java exception occurred:
java.lang.NoSuchFieldError: MICROMETER
at loci.formats.in.NiftiReader.<init>(NiftiReader.java:78)
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 loci.formats.ImageReader.<init>(ImageReader.java:129)
at loci.formats.in.FilePatternReader.<init>(FilePatternReader.java:77)
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 loci.formats.ImageReader.<init>(ImageReader.java:129)
at loci.formats.ImageReader.<init>(ImageReader.java:116)
at loci.formats.ReaderWrapper.<init>(ReaderWrapper.java:61)
at loci.formats.ChannelFiller.<init>(ChannelFiller.java:71)
Error in bfopen (line 114)
r = bfGetReader(id, stitchFiles);
Java version in R2017a:
Java 1.7.0_60-b19 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
Java version in R2017b:
Java 1.8.0_121-b13 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
BioFormats version: 5.7.1 (2017 September 20)
Thanks!
Ilya