I'm fetching huge number of records say 140,000 records from the database and write it to excel.I'm using jxl for this purpose.
But i keep getting
CoordinatorCo W HMGR0152W: CPU Starvation detected. Current thread scheduling delay is 7 seconds.
and while calling
I'm facing memory issue found in the server console.
Exception data: java.lang.OutOfMemoryError at jxl.write.biff.MemoryDataOutput.write(MemoryDataOutput.java:72)
I'm getting records in batch of 30,000(inside do loop).And making sure each worksheet will have not more than 60000 records.I strongly suspect
Because all the queries are fired inside the loop and the above error occurs when write method is called.I've posted part of my code as shown below.
I appriciate your help in this regard.Thanks in advance
Joined: Sep 25, 2003
Problem is resoved.I'm posting solution if it may be of some use for somebody in the future.
Instead of keeping the binary content in memory(which needs huge memory incase of large data).A temperory file is created to temporarly keep the data before writting.