I am using Struts 1.2 on JBoss and using JDK 1.6_u5 using the poi-3.0.2-FINAL-20080204.jar. This is the only POI jar, I did not include the contrib or scratchpad JAR because I didn't think I'd need them.

I wrote a program to open to an excel file which works fine. I create a FileInputStream, and I can open to the file and get the first line which is header information. So, I create the POIFileSystem, and then I can get the Workbook, and the Worksheet correctly.
This works perfectly and I can output the content to my console.

I am doing a build which creates an war file within the ear file, and after checking the ear file I can definitely see my lib directory and I can see I am including the correct poi-3.0.2-FINAL-20080204.jar file. When I run my web-based app, I am doing a struts file upload and I get the byte data from that upload. I have confirmed that the byte array from the file is EXACTLY the same as the byte data when the file is uploaded. After the file is uploaded, I use that byte data to create a ByteArrayInputStream and I try to parse my Excel file the same way as when I read a file in directly.
And then I get this error:
java.lang.NoSuchMethodError: org.apache.poi.hssf.usermodel.HSSFCell.getRichStringCellValue()Lorg/apache/poi/hssf/usermodel/HSSFRichTextString;

I don't get any errors in Eclipse indicating that this method does not exist. So again, I was looking at the build to see how the EAR gets built. I looked at the lib directory in the EAR file and I can see the JAR there. If the JAR didn't exist, then I wouldn't have been able to create the POIFileSystem, the Workbook., or the Worksheet.

So, I am at a complete loss and need some help on figuring this out. Thanks! Tom





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

Reply via email to