Questions tagged [ioexception]

IOException is the general class of exceptions produced by failed or interrupted input/output operations in several languages, including Java and C#.

IOException is the general class of exceptions produced by failed or interrupted Input/Output operations in several languages, including Java and C# and other .NET languages.

1451 questions
7
votes
1 answer

Hadoop MapReduce job I/O Exception due to premature EOF from inputStream

I ran a MapReduce program using the command hadoop jar [mainClass] path/to/input path/to/output. However, my job was hanging at: INFO mapreduce.Job: map 100% reduce 29%. Much later, I terminated and checked the datanode log (I am running in…
AST
  • 211
  • 6
  • 18
7
votes
7 answers

How do I close a file after catching an IOException in java?

All, I am trying to ensure that a file I have open with BufferedReader is closed when I catch an IOException, but it appears as if my BufferedReader object is out of scope in the catch block. public static ArrayList readFiletoArrayList(String…
DimDom
  • 83
  • 1
  • 1
  • 4
7
votes
3 answers

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

I have a code where I am sending the URL request and receiving the response and storing it as a String as public String GenerateXML(String q)// Here 'q' is the URL { // Generating the XML file for reference // Getting the response in XML…
user3188390
  • 603
  • 2
  • 11
  • 19
7
votes
5 answers

Access denied when trying to execute a .exe in %AppData%

I'm trying to use RemoveDrive.exe, found here, in my Java application. I have it in my JAR, and I'm extracting it to a temporary file using the following code, however when I try to run it I get an IOException which says CreateProcess error=5,…
Andy
  • 3,600
  • 12
  • 53
  • 84
7
votes
3 answers

IOException on accept thread

One part of my application connects to a device through Bluetooth and normally works fine but occasionally it won't connect and I get the following error 03-11 10:29:20.328: E/BluetoothComService(8059): accept() failed 03-11 10:29:20.328:…
codeMagic
  • 44,549
  • 13
  • 77
  • 93
7
votes
7 answers

Android Bluetooth Connection - Service Discovery Failed

I'm trying to create a basic bluetooth application, for testing the device. I got the code from developer.android. Here is the link : http://developer.android.com/guide/topics/connectivity/bluetooth.html#ConnectingDevices Here is run part of my…
juliadream
  • 251
  • 1
  • 4
  • 16
6
votes
3 answers

Missing error requests in the tomcat's localhost_access log, while IOException during the Jackson invocation appears in the application log

Some weird situation. During a performance test of a web application (war), the client gets 500 on about 2% of the requests. When searching the application log, there are some exceptions there: java.io.IOException: Stream closed at…
Tarlog
  • 10,024
  • 2
  • 43
  • 67
6
votes
5 answers

Java UrlConnection triggering "Connection reset" exceptions under high load. Why?

I'm using Java to stream files from Amazon S3, on Linux (Ubuntu 10) 64-bit servers. I'm using a separate thread for each file, and each file opens an HttpURLConnection which downloads and processes each file concurrently. Everything works…
netflux
  • 3,648
  • 6
  • 37
  • 40
6
votes
0 answers

Android PdfRenderer throws IOException

My application lists PDF files, and when the user selects a PDF, the app opens it. If the user selects a corrupted PDF file, PdfRenderer throws IOException (which is fine, since I catch that exception and inform the user that the file is…
Aswin P Ashok
  • 702
  • 8
  • 27
6
votes
4 answers

What is a IOException, and how do I fix it?

What are IO Exceptions (java.io.IOException) and what causes them? What methods/tools can be used to determine the cause so that you stop the exception from causing premature termination? What does this mean, and what can I do to fix this exception?
Victor
  • 3,520
  • 3
  • 38
  • 58
6
votes
1 answer

NetworkStream gets System.IO.IOException: Unable to write data to the transport connection

I am using a NetworkStream to keep an open TCP/IP connection that messages can be sent across. I receive a message, process it, and then return an ACK. I am working with a site where occasionally I receive the message, but when I go to send the ACK,…
Tim
  • 2,731
  • 9
  • 35
  • 72
6
votes
1 answer

Okhttp. Exception java.io.IOException: unexpected end of stream on Connection

I faced with an issue, about third of all OkHttpClient newCall(request).execute(); requests to the server fails with this exception: Exception java.io.IOException: unexpected end of stream on Connection{[REDACTED_DOMAIN_NAME]:80, proxy=DIRECT@…
Aleksey Khokhrin
  • 166
  • 2
  • 13
6
votes
10 answers

C# The process cannot access the file ''' because it is being used by another process

The snippet of code was just supposed to write a string into a text file called "all_results.txt". I had errors implementing in File.WriteAllText. After searching the net for solutions, I tried using FileStream and StreamWriter as substitutes. The…
youngscientist
  • 171
  • 2
  • 2
  • 5
6
votes
1 answer

Extract HTTP Status Code from java.io.IOException

How is it possible (if at all) to get the HTTP status code from a java.io.IOException in java ?
YAKOVM
  • 9,805
  • 31
  • 116
  • 217
6
votes
1 answer

IOException when dynamically compiling code

I have the following line of code: CSharpCodeProvider c = new CSharpCodeProvider(); CompilerParameters cp = new CompilerParameters(); cp.ReferencedAssemblies.Add("system.dll"); cp.CompilerOptions = "/t:library"; cp.GenerateInMemory =…
Igor Ševo
  • 5,459
  • 3
  • 35
  • 80