Forums Register Login

Strange java.io.FileNotFoundException: error

+Pie Number of slices to send: Send
A java listener process is running on unix server. This java listener process listens to a MQueue. When a message is received by the queue, it is passed on to the java listener process. The java process stores the message to a file in the input directory and calls a db procedure by passing the file name. The db procedure then processes it creates an acknowledgement file in the output directory and passes the ack file name back to java process. Then the java process reads the contents of the file and sends it to another MQueue. If any of the steps fail in between, the process calls the another db procedure with the error message as parameter and the procedure generates a fail acknowledgement file in the output directory and passes the fail ack file name back to java process. Then the java process reads the contents of the file and sends it to another MQueue.
The process also writes each and every step in the logger.

This listener process has been running successfully for more than two months with no issues. But for the past two days, for some messages from MQueue (say 4 out of 20), the listener fails to store the message to an input file (java.io.FileNotFoundException) and hence calls the db procedure to generate fail acknowledge message. Then, the java process is not able to read the fail acknowledgement file (java.io.FileNotFoundException). Above all this, it is not able to write the steps to the log file during this time. There is nothing in the log file for these 4 failed messages.

We checked the unix permissions for all these folders, everything is alright.

Any help would be appreciated.
+Pie Number of slices to send: Send
Please post the file writing code snippet.
+Pie Number of slices to send: Send
Surender,

File inputFile = new File("/xxx/yyy/InputMessage_"+currentTimestamp+"_"+messageID+".xml");
inputFile.setReadable(true);
out = new FileOutputStream(inputFile);
out.write(messageContents);
out.close();
Never trust an airline that limits their passengers to one carry on iguana. Put this tiny ad in your shoe:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 553 times.
Similar Threads
A Design Question
Spring Batch Flat File Read Dynamic DB Insert Flow
writing log to a file from java stored procedure
problem transforming using JAXP (StreamResult problem)
000-341 sample test questions
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 17:21:25.