[Building Sakai] OutOfMemory error when importing Gradebook Spreadsheet

Bryan Bakotich bakotibj at plu.edu
Tue Feb 2 17:42:09 PST 2010


Hi all,

We had a professor trying to upload a gradebook spreadsheet (via Gradebook
-> Import Grades) crash our Sakai instance multiple times yesterday. It
turns out that he had some text in the very last line (line 1048576) of the
spreadsheet so there were over 1 million SpreadsheetRow objects created
mainly for blank lines. For each blank row there was a line like this in
catalina.out

2010-02-02 09:54:39,072 ERROR TP-Processor11
org.sakaiproject.tool.gradebook.ui.SpreadsheetUploadBean - User  is unknown
to this gradebook: java.lang.NullPointerException

It doesn't seem like we should call the SpreadsheetRow constructor for blank
rows. This can be fixed by adding a check in the csvToArray method in the
SpreadSheetUploadBean.java file. I added this if statement in the while loop
in the csvToArray method and it fixed the problem on our dev box:

if (line.replaceAll(",", "").replaceAll("\"", "").equals("")) continue;

Any thoughts or suggestions on a different place this should be caught.
Should I create a JIRA for this? Thanks for the help.

-Bryan

-- 
Bryan Bakotich
Open Source Implementation Specialist
Digital Media Center, Information & Technology Services
Pacific Lutheran University
Tacoma, WA 98447-0013
Phone: 253-536-5021
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20100202/09b5cec6/attachment.html 


More information about the sakai-dev mailing list