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
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
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
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
;
}
/**
* @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
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
;
}
}
-
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
7 matches
Mail list logo