Return-Path: Delivered-To: apmail-jakarta-poi-dev-archive@www.apache.org Received: (qmail 82090 invoked from network); 20 Sep 2004 23:23:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 20 Sep 2004 23:23:24 -0000 Received: (qmail 47199 invoked by uid 500); 20 Sep 2004 23:23:13 -0000 Delivered-To: apmail-jakarta-poi-dev-archive@jakarta.apache.org Received: (qmail 47122 invoked by uid 500); 20 Sep 2004 23:23:12 -0000 Mailing-List: contact poi-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "POI Developers List" Reply-To: "POI Developers List" Delivered-To: mailing list poi-dev@jakarta.apache.org Received: (qmail 46934 invoked by uid 99); 20 Sep 2004 23:23:11 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [203.103.42.106] (HELO snowball.asc.com.au) (203.103.42.106) by apache.org (qpsmtpd/0.28) with ESMTP; Mon, 20 Sep 2004 16:23:09 -0700 Message-ID: From: "Height, Jason" To: "POI Developers List" Date: Tue, 21 Sep 2004 08:52:59 +0930 Subject: RE: part2 of: DESPERATE, HELP: Problem with new HSSFWorkbook() in web unix server MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Steve My suggestion is to put a try catch block around all of your code below that will catch ANY exception, and print out the stack trace. That surely will lead to the exact line in the code that is causing the grief. At the moment it is impossible to give you any further indication of what the problem may be. Jason -----Original Message----- From: Steve [mailto:stephen@Basit.COM]=20 Sent: Tuesday, 21 September 2004 8:47 AM To: poi-dev@jakarta.apache.org Subject: part2 of: DESPERATE, HELP: Problem with new HSSFWorkbook() in web unix server By the way, I'm deploying with: poi-2.5-final-20040302.jar Are any other jars needed? Is it possible this problem is related a previoous problem on this second unix server, where I could not read in a xls template file? I resorted to revising my code so that I didn't need to read a template. --steve see below for problem description ------------------------------------------------------------------------ ---- -----------------------=20 > To: poi-dev@jakarta.apache.org > PM Subject: DESPERATE, HELP: Problem with new HSSFWorkbook() in web unix server > > We have a static java method (see below) in which we do > new HSSFWorkbook(); > > this causes "500 internal server error" in web server. > > The strange thing is this deployment works fine on my PC and > on our development unix server. When we "copy" the war and > ear files from the development unix server to deploy on our UAT > unix machine, then the program crashes as described above > at the new HSSFWorkbook(). > > On the other machines, we nicely get our Excel program to > popup in either a browser or in Excel. > > Any ideas about what could be causing this problem??? > We have tried everything, and asked whoever we could, > but no success so far. > > THANKS, > Steve > > private static HSSFWorkbook constructTemplateAsWorkbook() { > if(ReportProducer.DEBUG1) { > System.out.println("7:40--constructTemplateAsWorkbook(): START"); > } > HSSFWorkbook wbk =3D null; > HSSFSheet sheet =3D null; > HSSFPrintSetup printSetup =3D null; > if(ReportProducer.DEBUG1) { > System.out.println("7:40--constructTemplateAsWorkbook(): #1"); > } > wbk =3D new HSSFWorkbook(); > if(ReportProducer.DEBUG1) { > System.out.println("7:40--constructTemplateAsWorkbook(): #2"); > } > for(int nSheet=3D1; nSheet<=12; nSheet++) { > if(ReportProducer.DEBUG1) { > System.out.println("7:40--constructTemplateAsWorkbook(): #3: LOOP > nSheet=3D"+nSheet); > } > sheet =3D wbk.createSheet(); > sheet.setAutobreaks(true); > sheet.setHorizontallyCenter(true); > if(ReportProducer.DEBUG1) { > System.out.println("7:40--constructTemplateAsWorkbook(): #4: LOOP > nSheet=3D"+nSheet); > } > //sheet.setMargin > printSetup =3D sheet.getPrintSetup(); > printSetup.setLandscape(true); > if(ReportProducer.DEBUG1) { > System.out.println("7:40--constructTemplateAsWorkbook(): #5: LOOP > nSheet=3D"+nSheet); > } > printSetup.setFitWidth((short)1); > if(ReportProducer.DEBUG1) { > System.out.println("7:40--constructTemplateAsWorkbook(): #6: LOOP > nSheet=3D"+nSheet); > } > printSetup.setFitHeight((short)0); > } > if(ReportProducer.DEBUG1) { > System.out.println("7:40--constructTemplateAsWorkbook(): ABOUT to > return wbk"); > } > return wbk; > } > > > } // end of class > > xOfflineReportInvoker.getExcelWorkbook(): Start. > OfflineReportInvoker.getExcelWorkbook(): DON'T useInputStream; make > template. > 7:40--constructTemplateAsWorkbook(): START > 7:40--constructTemplateAsWorkbook(): #1 > <-------------- hangs up at this point > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: poi-dev-help@jakarta.apache.org ---------------------------------------------------------------------------= ----------------------------------------- This e-mail (including attachments) is confidential information of Australi= an Submarine Corporation Pty Limited (ASC). It may also be legally privile= ged. Unauthorised use and disclosure is prohibited. ASC is not taken to h= ave waived confidentiality or privilege if this e-mail was sent to you in e= rror. If you have received it in error, please notify the sender promptly. = While ASC takes steps to identify and eliminate viruses, it cannot confirm= that this e-mail is free from them. You should scan this e-mail for virus= es before it is used. The statements in this e-mail are those of the sende= r only, unless specifically stated to be those of ASC by someone with autho= rity to do so. --------------------------------------------------------------------- To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: poi-dev-help@jakarta.apache.org