problem in usin POI package

java , j2ee , corejava , poi Fort Wayne, United States
  • 5 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).

Contribute

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.

“Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.” - Rich Cook