The excel file is a normal excel created in MS office 2007. The error is caused when read using inputStream = ClassPathResource.class.getResourceAsStream(filePath); In this case the file is located in classpath.
But if I give an absolute path to the file and try reading like this, java.net.URI uri = new URI(filePath); File file = new File(uri); inputStream = new FileInputStream(file); In this case I don't get any exception. The wonderign part is that it works with a tomcat & fails in one jboss server. Can I know When is this particular error supposed to be thrown... MSB wrote: > > Have you tried to open the file directly - creating a simplt > FileInputStream attached directly to the file for example - to see whether > POI responds in the same way or if it opens the file? What is the source > of the file - was it generated by Excel or some other piece of software? > -- View this message in context: http://old.nabble.com/exception-when-inputstream-is-read-from-getClass%28%29.getClassLoader%28%29.getResourceAsStream%28%22file.xls%22%29-tp26406348p29169246.html Sent from the POI - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@poi.apache.org For additional commands, e-mail: user-h...@poi.apache.org