java IO Exception: Stream Closed

You’re calling writer.close(); after you’ve done writing to it. Once a stream is closed, it can not be written to again. Usually, the way I go about implementing this is by moving the close out of the write to method. And add a method cleanUp to close the stream. This means that you have the … Read more

Why it is mandatory to use “throws IOException”

It may not be mandatory to add the throws IOException to your main function, but its mandatory to do something about the exception. When you’re doing file io, or network io, or other (?) io, something could go wrong. The file might not exist, it could be on a bad sector of the disk, the … Read more

Unable to read data from the transport connection : An existing connection was forcibly closed by the remote host

This error usually means that the target machine is running, but the service that you’re trying to connect to is not available. (Either it stopped, crashed, or is busy with another request.) In English: The connection to the machine (remote host/server/PC that the service runs at) was made but since the service was not available on that machine, the … Read more

SQLRecoverableException: I/O Exception: Connection reset

This simply means that something in the backend ( DBMS ) decided to stop working due to unavailability of resources etc. It has nothing to do with your code or the number of inserts. You can read more about similar problems here: http://kr.forums.oracle.com/forums/thread.jspa?threadID=941911 http://forums.oracle.com/forums/thread.jspa?messageID=3800354 This may not answer your question, but you will get an … Read more

IOException: The process cannot access the file ‘file path’ because it is being used by another process

What is the cause? The error message is pretty clear: you’re trying to access a file, and it’s not accessible because another process (or even the same process) is doing something with it (and it didn’t allow any sharing). Debugging It may be pretty easy to solve (or pretty hard to understand), depending on your … Read more

tech