problem in usin POI package

java , j2ee , corejava , poi Fort Wayne, United States
  • 9 years ago

    Dear All,

    I am finding a little untraceable issue in using POI package for reading and writing in to excel sheet. Basically my requirement is to read the excel templat and get some values which can be used as search keys to query and get the data from DB. And the results of DB select query will be written in the same excel temaplate in few cells.

    Now, with one FileInputstream I am reading the file. Next by using one FileInputstream I am finding the where the result should be written and by using one FileOutputstream I am writing the file.

    I did all the closing and flushing of streams proper.

    Now, I am getting the filenotfoundexception at random point of executions. For example, if I am executing the read/write operation 50 times by using a loop, the error comes in 20 th time or 45th time or evn 5th time which is completely unpredictable and untraceable of what exactltly cause the error. Few times the complete execution happens successfully without any issues. Can any one of you please help me?

Post a reply

Enter your message below

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“There are 10 types of people in the world, those who can read binary, and those who can't.”