Mailing List
Home
Forum Home
Maven - Project building tool
Axis - Java SOAP implementation
Cocoon - MVC web framework based on XML/XSL
Lucene - Full-featured text search engine APIs
Log4J - A log library
Fop - Create PDF, PCL, PS, SVG, XML driven by XSL formatting objects.
POI - Java Excel, Word and other Microsoft Office files manipulating library
Oracle database error code ...
Subjects
log4j warning: No appenders could be found
java security AccessControlException: access denied (java io FilePermission clie
java lang InstantiationException: org apache tools ant Main
Apache Axis Tutorial
Struts <logic iterate >
log4j properties How to parse outpu to multiple files
configuring log4j with BEA Weblogic 8 1
How to use XSL FOP Java together
JSP precompile
Servlet File Download dialog problem (IE6,Adobe 6 0)
Proposal: Adding jar manifest classpath in jar and war plugins
Unsupported major minor version 48 0 problem while running the an
   telope task
java security AccessControlException: access denied (java io FilePermission
axis wsdl2java Ant Task usage
net sf hibernate MappingException: Error reading resource: test/User hbm xml
Building EAR ANT Script for websphere 5 0
CREATING WAR Files
jsp data into Excel
Classpath problem
Jboss 3 2 3+ vs Tomcat Axis Question
RE: How to include jars and add them into the MANIFEST MF/Class Path
attribute
Printing problem
InstantiationException
Couldn 't find trusted certificate
Please : How can one install ant 1 6 0 under Eclipse 2 1 ?
Excel: Too many different cell formats
Running junit tests fails
XDoclet, Struts and Maven: Where to start? SOLUTION
1 3 final: now giving me java io FileNotFoundException (Too many
open files)
AXIS: tomcat timeout ?
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
How to handle high data volume?

How to handle high data volume?

2005-05-03       - By Prakash Chudasama

 Back
Reply:     1     2     3     4  

Hi

I am using POI to generate the excel report.
Following is the code which i am using to dump the data in excel sheet.
My query is fetching more than 13000 records. I am passing the workbook object
in request. The next page is servlet which set the content type and prints the
workbook.

But i am getting this error message after 10 mins or so. <May 3, 2005 12:42:36
PM GMT+05:30> <Warning> <WebLogicServer> <BEA-000337> <ExecuteThread: '14' for
queue: 'weblogic.kernel.Default' has been busy for "819" seconds working on the
request "Http Request: /TestProject/ExportExcel.jsp", which is more than the
configured time (StuckThreadMaxTime) of "600" seconds.>

How to resolve this problem? I think its OutofMemory exception.

                   HSSFWorkbook hwb = new HSSFWorkbook();
                   HSSFCellStyle style;
                   //Create sheet with appropriate name.
                   HSSFSheet sheet1 = hwb.createSheet("ExportToExcel");
                   //Create 0th row in the sheet for header
                   style =hwb.createCellStyle();
                   HSSFFont fontObj = hwb.createFont();
                   fontObj.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
                   style.setFont(fontObj);
             HSSFRow row = sheet1.createRow((short)0);
                   row = sheet1.createRow((short)0);
                   //Printing header and setting columnwidth.
                   for(int i=0;i<headerFields.size();i++){
                       sheet1.setDefaultColumnWidth((short)10);
                HSSFCell testCell = row.createCell((short)i);
                       testCell.setCellStyle(style);
                       testCell.setCellValue((String)headerFields.get(i));
                   }
                   int rowCount = 1;

                   pstmt = con.prepareStatement(strFinalQuery.toString());
                   pstmt.setQueryTimeout(GFBConstants.QUERY_TIME_OUT);
                   rs = pstmt.executeQuery();
                   while(rs !=null && rs.next())
                   {


                       HSSFRow rowInfo = sheet1.createRow((short)rowCount);
                       isRecordNotFound = false;
                       int cellCount = 0;
                       for(int i=0;    i<fields.size();i++){
                           String strVal = null;
                           sheet1.setDefaultColumnWidth((short)10);
                           HSSFCell testCell =  
rowInfo.createCell((short)(cellCount));
                           testCell.setEncoding(HSSFCell.ENCODING_UTF_16);
                           strVal = rs.getString(i+1);
                           
                           if(strVal == null)
                               strVal = "";
                           //Printing the data and setting column width.
                           testCell.setCellValue(strVal);
                           cellCount++;
                       }
                        rowCount++;
                   }
       pageContext.getRequest().setAttribute("DATA", hwb);





-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
To unsubscribe, e-mail: poi-user-unsubscribe@(protected)
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/


Earn $52 per hosting referral at Lunarpages.