poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Height, Jason" <jhei...@subcorp.com.au>
Subject RE: part2 of: DESPERATE, HELP: Problem with new HSSFWorkbook() in web unix server
Date Mon, 20 Sep 2004 23:22:59 GMT
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] 
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
------------------------------------------------------------------------
----
----------------------- 
>                                                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        = null;
>     HSSFSheet       sheet      = null;
>     HSSFPrintSetup  printSetup = null;
>     if(ReportProducer.DEBUG1) {
>       System.out.println("7:40--constructTemplateAsWorkbook(): #1");
>     }
>     wbk = new HSSFWorkbook();
>     if(ReportProducer.DEBUG1) {
>       System.out.println("7:40--constructTemplateAsWorkbook(): #2");
>     }
>     for(int nSheet=1; nSheet<; nSheet++) {
>       if(ReportProducer.DEBUG1) {
>         System.out.println("7:40--constructTemplateAsWorkbook(): #3:
LOOP
> nSheet="+nSheet);
>       }
>       sheet = wbk.createSheet();
>        sheet.setAutobreaks(true);
>        sheet.setHorizontallyCenter(true);
>        if(ReportProducer.DEBUG1) {
>          System.out.println("7:40--constructTemplateAsWorkbook(): #4:
LOOP
> nSheet="+nSheet);
>        }
>        //sheet.setMargin
>        printSetup = sheet.getPrintSetup();
>        printSetup.setLandscape(true);
>        if(ReportProducer.DEBUG1) {
>          System.out.println("7:40--constructTemplateAsWorkbook(): #5:
LOOP
> nSheet="+nSheet);
>        }
>        printSetup.setFitWidth((short)1);
>        if(ReportProducer.DEBUG1) {
>          System.out.println("7:40--constructTemplateAsWorkbook(): #6:
LOOP
> nSheet="+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 Australian Submarine Corporation
Pty Limited (ASC).  It may also be legally privileged.  Unauthorised use and disclosure is
prohibited.  ASC is not taken to have waived confidentiality or privilege if this e-mail was
sent to you in error. 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 viruses before it is used.  The statements
in this e-mail are those of the sender only, unless specifically stated to be those of ASC
by someone with authority to do so.


---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-dev-help@jakarta.apache.org


Mime
View raw message