0

I know this question is being asked before Limit CsvListReader to one line

i am facing the same issue, can you please tell me what changes made to tokenizer to overcome this issue...

In my case it is occurring in different line number everytime, it is not consistent.sometimes it occurs at line 5000 of csv and some other time it occur at 6000 if i go into debug mode and step on the code one by one than it never occurs. Can you help me with what could be the issue.

pardon me for asking the same question again, but i can't seem to find a solution on my own.

one of the CSV line at which it throws the error is the "???" is the Japanese text

"CI","1","2014-04-01","BMW","","","","","","3","528","",0,0,"","","C","","","1","F","1"," 8"," 8",0,0,0,0,0,0,0,0,"",0,0,0,0,0,0,0,0,"",0,0,0,0,0,0,0,0,"",0,0,0,0,0,0,0,0,"",0,0,0,0,0,0,0,0,"",0,0,0,0,0,0,0,0,"",0,0,0,0,0,0,0,0,"",0,0,0,0,0,0,0,0,"",0,0,0,0,0,0,0,0,"",0,0,0,0,0,0,0,0,"",0,0,0,0,0,0,0,0,"","","0301","BMW","","7","","5","","5","","8","7","5","5","8","","","","","","","","0","0","???","BMW","???","???","???","???","???","???","???","???","","","","","","","","","","","","","???","BMW","???","???","???","???","???","???","???","???","","","","","","","","","","","","","","","",0,0,0,"0","0","0","2014-04-02","09:34:35","90002","082R"

other is this

"CI","1","2014-04-01","BMW","","","","","","3","633","",0,0,"","","C","","","1","F","1"," 8"," 8",0,0,0,0,0,0,0,0,"",0,0,0,0,0,0,0,0,"",0,0,0,0,0,0,0,0,"",0,0,0,0,0,0,0,0,"",0,0,0,0,0,0,0,0,"",0,0,0,0,0,0,0,0,"",0,0,0,0,0,0,0,0,"",0,0,0,0,0,0,0,0,"",0,0,0,0,0,0,0,0,"",0,0,0,0,0,0,0,0,"",0,0,0,0,0,0,0,0,"","","0301","BMW","","7","","4","","5","","8","7","4","5","8","","","","","","","","0","0","???","BMW","???","???","???","???","???","???","???","???","","","","","","","","","","","","","???","BMW","???","???","???","???","???","???","???","???","","","","","","","","","","","","","","","",0,0,0,"0","0","0","2014-04-02","09:34:35","15762","082R"

This line seems to be properly formated but yet it throws the error

Caused by: java.lang.OutOfMemoryError: Java heap space at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:99) at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:575) at java.lang.StringBuilder.append(StringBuilder.java:204) at org.supercsv.io.Tokenizer.readColumns(Tokenizer.java:106) at org.supercsv.io.AbstractCsvReader.readRow(AbstractCsvReader.java:179) at org.supercsv.io.CsvListReader.read(CsvListReader.java:69)

Community
  • 1
  • 1
  • 1
    -Xmx1g would probably be an easier solution. – bmargulies Apr 09 '14 at 01:36
  • I can't use that, as i have to deploy my code on websphere application server, and i can't change the -Xmx there, anyway as per server admin the server is having the heap memory max value as 745, which seems to be big enough, but still i get this error from supercsv – Harish Kumar Apr 09 '14 at 01:59

0 Answers0