Sorry to say this but it does sound like the server may be causing the problems for you here but that is something that I am completely unable to comment upon.
My advice would be to open a new thread, describe the problem you are experiencing, tell people which version of POI you are using, whic operating system and explain what the architecture of the platform is. Also, tell them that the process works perfectly well with tomcat but fails with jboss. This is a lot of extra work for you I accept but this way, the new post will beter catch peoples attention and that way you stand a better chance of someone responding who is familiar with both the tomcat or jboss servers or who may have experienced similar problems with the jboss platform. Now that I know the problem does not occur with tomcat, I think it is safe to say that you are looking for problems with jboss and need specific help in that area. Yours Mark B PS Just as an aside, is there a jboss forum that you could post a back up question in, something more general and relating to fetching files in this manner? anjsag wrote: > > 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-tp26406348p29169712.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