Hi All,

  This is the Exception i am getting ..
  Pls let me know your thoughts..

Thanks a lot for all your help..

===================================================================================================

Excep=java.lang.ArrayIndexOutOfBoundsException: 112
[4/21/03 18:12:47:047 GMT+05:30] 354f8540 SystemErr     R 
java.lang.ArrayIndexOutOfBoundsException: 112
[4/21/03 18:12:47:047 GMT+05:30] 354f8540 SystemErr     R       at 
org.apache.poi.util.StringUtil.putUncompressedUnicode(StringUtil.java:175)
[4/21/03 18:12:47:047 GMT+05:30] 354f8540 SystemErr     R       at 
org.apache.poi.hssf.record.UnicodeString.serialize(UnicodeString.java:299)
[4/21/03 18:12:47:047 GMT+05:30] 354f8540 SystemErr     R       at 
org.apache.poi.hssf.record.Record.serialize(Record.java:168)
[4/21/03 18:12:47:047 GMT+05:30] 354f8540 SystemErr     R       at 
org.apache.poi.hssf.record.SSTRecord.serialize(SSTRecord.java:541)
[4/21/03 18:12:47:097 GMT+05:30] 354f8540 SystemErr     R       at 
org.apache.poi.hssf.model.Workbook.serialize(Workbook.java:664)
[4/21/03 18:12:47:097 GMT+05:30] 354f8540 SystemErr     R       at 
org.apache.poi.hssf.usermodel.HSSFWorkbook.getBytes(HSSFWorkbook.java:505)
[4/21/03 18:12:47:097 GMT+05:30] 354f8540 SystemErr     R       at 
org.apache.poi.hssf.usermodel.HSSFWorkbook.write(HSSFWorkbook.java:465)
[4/21/03 18:12:47:097 GMT+05:30] 354f8540 SystemErr     R       at 
com.geindustrials.qms.util.GEISQMSExcelGenerator.generateWorkBook(GEISQMSExcelGenerator.java:177)
[4/21/03 18:12:47:107 GMT+05:30] 354f8540 SystemErr     R       at 
com.geindustrials.qms.actions.supplier.DownloadExcelAction.perform(DownloadExcelAction.java:80)
[4/21/03 18:12:47:107 GMT+05:30] 354f8540 SystemErr     R       at 
com.geindustrials.framework.action.RequestProcessor.process(RequestProcessor.java:115)
[4/21/03 18:12:47:107 GMT+05:30] 354f8540 SystemErr     R       at 
com.geindustrials.framework.action.ActionServlet.process(ActionServlet.java:39)
[4/21/03 18:12:47:107 GMT+05:30] 354f8540 SystemErr     R       at 
com.geindustrials.framework.action.ActionServlet.doGet(ActionServlet.java:23)
[4/21/03 18:12:47:107 GMT+05:30] 354f8540 SystemErr     R       at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
[4/21/03 18:12:47:107 GMT+05:30] 354f8540 SystemErr     R       at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
[4/21/03 18:12:47:107 GMT+05:30] 354f8540 SystemErr     R       at 
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
[4/21/03 18:12:47:107 GMT+05:30] 354f8540 SystemErr     R       at 
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
[4/21/03 18:12:47:107 GMT+05:30] 354f8540 SystemErr     R       at 
com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
[4/21/03 18:12:47:107 GMT+05:30] 354f8540 SystemErr     R       at 
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
[4/21/03 18:12:47:107 GMT+05:30] 354f8540 SystemErr     R       at 
com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:258)
[4/21/03 18:12:47:107 GMT+05:30] 354f8540 SystemErr     R       at 
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
[4/21/03 18:12:47:107 GMT+05:30] 354f8540 SystemErr     R       at 
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
[4/21/03 18:12:47:117 GMT+05:30] 354f8540 SystemErr     R       at 
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:872)
[4/21/03 18:12:47:117 GMT+05:30] 354f8540 SystemErr     R       at 
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:491)
[4/21/03 18:12:47:117 GMT+05:30] 354f8540 SystemErr     R       at 
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:173)
[4/21/03 18:12:47:117 GMT+05:30] 354f8540 SystemErr     R       at 
com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:79)
[4/21/03 18:12:47:117 GMT+05:30] 354f8540 SystemErr     R       at 
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:199)
[4/21/03 18:12:47:117 GMT+05:30] 354f8540 SystemErr     R       at 
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
[4/21/03 18:12:47:117 GMT+05:30] 354f8540 SystemErr     R       at 
com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:114)
[4/21/03 18:12:47:117 GMT+05:30] 354f8540 SystemErr     R       at 
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:187)
[4/21/03 18:12:47:117 GMT+05:30] 354f8540 SystemErr     R       at 
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:331)
[4/21/03 18:12:47:117 GMT+05:30] 354f8540 SystemErr     R       at 
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
[4/21/03 18:12:47:127 GMT+05:30] 354f8540 SystemErr     R       at 
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:432)
[4/21/03 18:12:47:127 GMT+05:30] 354f8540 SystemErr     R       at 
com.ibm.ws.http.HttpConnection.run(HttpConnection.java:343)
[4/21/03 18:12:47:127 GMT+05:30] 354f8540 SystemErr     R       at 
com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:592)

-----Original Message-----
From: Robert Lowe [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 21, 2004 6:03 PM
To: POI Users List
Subject: RE: Exception =java.lang.ArrayIndexOutOfBoundsException: 112


Sateesh, I think you should modify your code to show the whole stack trace.
I'm sure you'll get much better help if you can provide a full stack trace.



Best regards,

Robert Lowe
http://RMLowe.com/



-----Original Message-----
From: Kommineni, Sateesh (GE Consumer & Industrial)
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 21, 2004 8:26 PM
To: POI Users List
Subject: RE: Exception =java.lang.ArrayIndexOutOfBoundsException: 112


Hi,

   I am getting the following Exception..
   java.lang.ArrayIndexOutOfBoundsException: 112
   In my earlier mail i mentioned just 112 , which i got by printing the
getMessage() on exception. Sorry for just mentioning 112

   Why i am getting ArrayIndexOutofBoundsException when i am trying to write
the data to a ServletOutputStream object..

   Shall i need to specify the byte size i am going to write to the stream??

   Pls let me know your thoughts..

-Sateesh



-----Original Message-----
From: Avik Sengupta [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 21, 2004 5:37 PM
To: POI Users List
Subject: Re: Exception = 112


>  What does the 112 mean ??

You tell me. You are eating up the exception.

On Wed, 2004-01-21 at 16:53, Kommineni, Sateesh (GE Consumer &
Industrial) wrote:
> Hi All,
>
>     I am trying to modify an existing Excel File using the POI.
>
>     The Environment details are
>
>      WSAD5.0 , POI = jakarta-poi-1.5.0-dev-20020415
>
>    When i try to generate a File using the below given code...i am getting
the Error:
>  ....
>  [4/21/03 16:30:59:364 GMT+05:30] 26adc544 SystemOut     O Created a Row
..
>  [4/21/03 16:30:59:364 GMT+05:30] 26adc544 SystemOut     O  About to write
the
>  [4/21/03 16:30:59:414 GMT+05:30] 26adc544 SystemOut     O Excpe in
generateWorkBook()=112
>
>   What does the 112 mean ??
>
>
============================================================================
============
> public void generateWorkBook(OutputStream out, ArrayList ctqDetails)throws
Exception{
>
>               System.out.println(" Here in generateWorkBook() and out="+out);
>               GEISQMSCtqBeanEx ctqBeanEx = null;
>               HSSFWorkbook wb = null;
>               HSSFRow  row    = null;
>               HSSFCell cell   = null;
>               FileOutputStream fout= null;
>               POIFSFileSystem fs =null;
>               String oldPartNum ="";
>               try{
>                       if(path==null)
>                         throw new Exception("Path is Not set Error..");
>                       fs  = new POIFSFileSystem(new FileInputStream(path+FILE_NAME));
>                       wb = new HSSFWorkbook(fs);
>                       HSSFSheet sheet = wb.getSheet("Ctq Details");
>                       System.out.println("No.of Sheets 
> After="+wb.getNumberOfSheets());
>                       int noOfCtqs    =  ctqDetails.size();
>                       System.out.println("No.Of CTQs="+noOfCtqs);
>                       for(int i=0;i<noOfCtqs;i++){
>                               ctqBeanEx  = (CtqBeanEx) ctqDetails.get(i);
>                               System.out.println("Part Number"+(i+1)+"
="+ctqBeanEx.getPartNumber()+" Ctq Number="+ctqBeanEx.getCtqNumber());
>
>                               if(oldPartNum==null)
>                                       oldPartNum = ctqBeanEx.getPartNumber();
>                               row     =       sheet.createRow((short)i);
>                               System.out.println("Old Part="+oldPartNum);
>                               if(oldPartNum!=null && 
> !oldPartNum.equals(ctqBeanEx.getPartNumber())){
>                                       // Column 0 is Part Number
>                                       cell = row.createCell((short)0);
>                                       cell.setCellValue(ctqBeanEx.getPartNumber());
>                                       cell.setCellType(HSSFCell.CELL_TYPE_STRING);
>
>                               }
>                               // Column 1 is CTQ Number
>                               cell = row.createCell((short)1);
>                               
> cell.setCellValue(Integer.parseInt(ctqBeanEx.getCtqNumber()));
>                               cell.setCellType(HSSFCell.CELL_TYPE_NUMERIC);
>
>
>                               // Column 2 is SubGroup Size
>                               cell = row.createCell((short)2);
>                               cell.setCellValue(ctqBeanEx.getSubGroupSize());
>                               cell.setCellType(HSSFCell.CELL_TYPE_NUMERIC);
>
>
>                               // Column 3 is Ctq Specification
>                               cell = row.createCell((short)3);
>                               cell.setCellValue(ctqBeanEx.getCtqSpec());
>                               cell.setCellType(HSSFCell.CELL_TYPE_STRING);
>
>                               // Column 4 is Unit Of Measure
>                               cell = row.createCell((short)4);
>                               cell.setCellValue(ctqBeanEx.getUom());
>                               cell.setCellType(HSSFCell.CELL_TYPE_STRING);
>
>
>
>                               // Column 5 is USL
>                               cell = row.createCell((short)5);
>                               cell.setCellValue(ctqBeanEx.getUsl());
>                               cell.setCellType(HSSFCell.CELL_TYPE_NUMERIC);
>
>
>                               // Column 6 is LSL
>                               cell = row.createCell((short)6);
>                               cell.setCellValue(ctqBeanEx.getLsl());
>                               cell.setCellType(HSSFCell.CELL_TYPE_NUMERIC);
>
>
>                               // Column 7 is Nominal
>                               cell = row.createCell((short)7);
>                               cell.setCellValue(ctqBeanEx.getNominal());
>                               cell.setCellType(HSSFCell.CELL_TYPE_NUMERIC);
>
>
>                               // Column 8 is UAL
>                               /*
>                               cell = row.createCell((short)8);
>                               cell.setCellValue(ctqBeanEx.getUal());
>                               cell.setCellType(HSSFCell.CELL_TYPE_NUMERIC);
>
>
>
>                               // Column 9 is LAL
>                               cell = row.createCell((short)9);
>                               cell.setCellValue(ctqBeanEx.getLal());
>                               cell.setCellType(HSSFCell.CELL_TYPE_NUMERIC);
>                               */
>                               System.out.println("Created a Row ..");
>                               oldPartNum = ctqBeanEx.getPartNumber();
>
>                       }
>                       System.out.println("About to write the ");
>                       int index = FILE_NAME.indexOf('.');
>                       fout=new 
> FileOutputStream(path+FILE_NAME.substring(0,index)+"1.xls");
>                       wb.write(fout);
>                       System.out.println("Done with fout");
>                       if(out!=null){
>                       System.out.println("About to write the data to the Servlet
OutputStream");
>                       wb.write(out);
>                       }
>
>               System.out.println("After constructing the Excel Sheet");
>               }
>               catch(Exception e){
>                  System.out.println("Excpe in generateWorkBook()="+e.getMessage());
>                  throw e;
>               }
>               finally{
>                       try{
>                               fout.close();
>                       }
>                       catch(Exception e){
>                          throw new Exception("Unable to close the
FileOutputStream="+e.getMessage());
>                       }
>               }
>
>       }
>
>
============================================================================
==============
>
> Thanks in Advance..
> Sateesh
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to