mzXMLread fails and tells me a 'Java exception occured'

1 view (last 30 days)
Dear reader,
My data aquired by the mass spectrometer (in *.raw format), is converted by some program (called ReAdW, available there) to make a *.mzXML file. I've been importing these mzXML files into MATLAB for some time now using the bioinformatics toolbox. What I do is the following:
mzxml_struct = mzxmlread('mydatafile.mzxml');
That has yielded me a few hundred mzxml_structs in MATLAB on which I could calculate a lot. Used this for months, even used different methods and settings on the mass spectrometer and it never failed (both ReAdW and MATLAB). But today MATLAB did not work anymore. I must admit that I used some other settings on the mass spectrometer, but since I changed settings before I don't think the problem lies there. I got the following:
Error using mzxmlread/parseScan (line 551)
Java exception occurred:
java.lang.ArrayIndexOutOfBoundsException: -1
at org.apache.commons.codec.binary.Base64.isBase64(Base64.java:137)
at org.apache.commons.codec.binary.Base64.discardNonBase64(Base64.java:478)
at org.apache.commons.codec.binary.Base64.decodeBase64(Base64.java:374)
at org.apache.commons.codec.binary.Base64.decode(Base64.java:220)
Error in mzxmlread (line 420)
parseScan;
Error in my_mzXML_script (line 14)
mzxml_struct = mzxmlread('mydatafile.mzxml');
I do understand that somewhere Matlab is trying to access a certain array, but that that array does not exist or that that array contains stuff that does not belong there which it cannot use in the mzxmlread('data.mzxml') function. However, I am not able to solve this problem.
Some stuff I tried, but did not work
-turning it off and on again
-allocate more heap space to Java
-update Java
-checked if my version of the ReAdW program was old enough for MATLAB (it was)
- Unplug my external monitor from my laptop
- Use previously aquired data and run the script; this still works
I'm currently using the following version of MATLAB (if it is any help to you):
MATLAB Version: 8.3.0.532 (R2014a)
MATLAB License Number: my licence number
Operating System: Microsoft Windows 8 Version 6.2 (Build 9200)
Java Version: Java 1.7.0_11-b21 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
With all the fancy extra toolboxes you can think of.
If you have any idea how to solve this problem, I would be very grateful.

Accepted Answer

Titus Edelhofer
Titus Edelhofer on 5 Nov 2014
Hi,
I would suggest to contact MathWorks technical support. They should be able to find out, if there is something wrong with the mzxmlread function or if there is some problem with your file.
Titus

More Answers (1)

Luuk van Oosten
Luuk van Oosten on 5 Nov 2014
Thank you for your answer Titus.
Seems that some malware corrupted the file. It works fine again. I feel stupid.
  1 Comment
Titus Edelhofer
Titus Edelhofer on 6 Nov 2014
No worries, you shouldn't. I have an algorithm working on a large data file, everything fine until about 70% of the file processed. Then it failed. To make the long story short: copying the file from one location to another must have corrupted it ;-).

Sign in to comment.

Categories

Find more on Environment and Settings in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!