You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by Steve <st...@Basit.COM> on 2004/09/21 01:17:27 UTC
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<=12; 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