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

Re: ClassCast Exception for ExcelFile Upload

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

Re: ClassCast Exception for ExcelFile Upload

2007-04-30 Thread Lance
and destroy the original message without making a copy. Thank you. - Original Message - From: Lance [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Monday, April 30, 2007 9:21 AM Subject: Re: ClassCast Exception for ExcelFile Upload I think this is your problem

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

ClassCast Exception for ExcelFile Upload

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

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

Re: ClassCast Exception for ExcelFile Upload

2007-04-27 Thread Kirthi
; } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/ClassCast-Exception-for-ExcelFile-Upload-tf3659580.html#a10226261 Sent from the Struts - User mailing list archive at Nabble.com