Re: ClassCast Exception for ExcelFile Upload

2007-04-30 Thread Lance
email and destroy the original message without making a copy. Thank you. - Original Message - From: "Lance" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Monday, April 30, 2007 9:21 AM Subject: Re: ClassCast Exception for ExcelFile Upload I think thi

Re: ClassCast Exception for ExcelFile Upload

2007-04-30 Thread Martin Gainty
you. - Original Message - From: "Lance" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Monday, April 30, 2007 9:21 AM Subject: Re: ClassCast Exception for ExcelFile Upload I think this is your problem... FileInputStream fin = (FileInputStream)

Re: ClassCast Exception for ExcelFile Upload

2007-04-30 Thread Lance
I think this is your problem... FileInputStream fin = (FileInputStream) in; Do you need to do this? Can you do RcsaPOIEventListner.readExcelStream(in); The input stream is coming from the request which is not necessarily saved to disk / read from a FileInputStream. Kirthi wrote: I am havin

Re: ClassCast Exception for ExcelFile Upload

2007-04-28 Thread Laurie Harper
Oops, no, that wouldn't work in this case. Perhaps it would be better if we back up for a moment: why do you need a FileInputStream specifically? Since FIS is a 'root level' IS implementation, i.e. designed to wrap a datasource (file) directly rather than than to augment an existing stram (lik

Re: ClassCast Exception for ExcelFile Upload

2007-04-27 Thread Kirthi
>> } >> >> >> ** >> >> import org.apache.struts.validator.ValidatorForm; >> import org.apache.struts.upload.FormFile; >> >> /** >> [EMAIL PROTECTED] >> * >> */ >> >> /** >> *Form bean for File

Re: ClassCast Exception for ExcelFile Upload

2007-04-27 Thread Laurie Harper
You didn't specify which line in the code you posted is throwing the exception, but I would guess it's this: InputStream in = (InputStream) formFile.getInputStream(); FileInputStream fin = (FileInputStream) in; It's never wise to down-cast a value from an interface type

ClassCast Exception for ExcelFile Upload

2007-04-27 Thread Kirthi
celFile() { return excelFile; } /** * @param theFile The FormFile to set. */ public void setExcelFile(FormFile excelFile) { this.excelFile = excelFile; } } -- View this message in context: http: