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
26
votes
5 answers

I/O exception error when using serialport.open()

FINAL UPDATE It was our firmware the whole time. Embarrassing to a degree, but I'm happy we can move forward and I can put learning Java off for another day. My answer is below. UPDATE So I have more or less given up on this. I think it is a bug…
tmwoods
  • 2,353
  • 7
  • 28
  • 55
24
votes
6 answers

System.IO.IOException: 'The process cannot access the file '@.txt' because it is being used by another process.'

I am new to programming and I have a question. If I have two functions, one creates a text file and writes into it, while the other opens the same text file and reads from it. The error I get is: System.IO.IOException: 'The process cannot access…
Mike
  • 241
  • 1
  • 2
  • 4
24
votes
2 answers

Android Exception : java.io.IOException: open failed: EACCES (Permission denied)

For some strange reason, am constantly facing an issue with different types of Android devices, for saving the captured images on the device storage. Here, is the detailed error log, of what, actually am getting. java.io.IOException: open failed:…
srsmohit
  • 241
  • 1
  • 2
  • 3
24
votes
6 answers

java.io.FileNotFoundException (permission denied) despite chmod 777

I have faced strange poblem while writing Grails application deployed on Tomcat. After creating simple test controller I want to write test contents in package com package com.domain.controller import java.io.File; import…
Athlan
  • 6,389
  • 4
  • 38
  • 56
24
votes
5 answers

java.io.IOException : No authentication challenges found

I am newbie to android and this is my first project on android. I am struggling with "authentication" problem for more than a day. I tried several options but none of them worked. Basically, I want to call a REST API and get response. I am sure…
Geek
  • 8,280
  • 17
  • 73
  • 137
23
votes
8 answers

Exception codes, or detecting a "file already exists" type exception

In trying to answer this question, I was surprised to discover that attempting to create a new file when that file already exists does not throw a unique exception type, it just throws a generic IOException. I am therefore left wondering how to…
GazTheDestroyer
  • 20,722
  • 9
  • 70
  • 103
22
votes
5 answers

java.io.IOException: Server returns HTTP response code 505

I have HTML based queries in my code and one specific kind seems to give rise to IOExceptions upon receiving 505 response from the server. I have looked up the 505 response along with other people who seemed to have similar problems. Apparently 505…
posdef
  • 6,498
  • 11
  • 46
  • 94
22
votes
8 answers

How can I handle an IOException which I know can never be thrown, in a safe and readable manner?

"The major difference between a thing that might go wrong and a thing that cannot possibly go wrong is that when a thing that cannot possibly go wrong goes wrong it usually turns out to be impossible to get at or repair." -Douglas…
Ethan Heilman
  • 16,347
  • 11
  • 61
  • 88
20
votes
3 answers

Hadoop IOException failure to login

I'm pretty new to Hadoop. However, I've been able to successfully setup hadoop 2.7.3 with Java 7 in the cluster mode on my servers. Everything works totally fine. But then, when I try to switch to Java 8 and start dfs, there is an error: Exception…
Tim
  • 1,029
  • 2
  • 14
  • 23
19
votes
9 answers

How to properly handle an IOException from close()

The Java I/O classes java.io.Reader, java.io.Writer, java.io.InputStream, java.io.OutpuStream and their various subclasses all have a close() method that can throw an IOException. Is there any consensus on the proper way to handle such exceptions? I…
sleske
  • 81,358
  • 34
  • 189
  • 227
19
votes
11 answers

NUnit [TearDown] fails -- what process is accessing my files?

Final Edit: I found a solution to the problem (at the bottom of the question). I've got an Nunit problem that's causing me grief. Edit: actually it looks more like a SQLite problem, but I'm not 100% certain yet. My TestFixture has a setup that…
Stewart Johnson
  • 14,281
  • 7
  • 61
  • 70
19
votes
2 answers

java.io.ioexception: open failed: einval (Invalid argument) when saving a image to external storage

This is my code: private boolean writeToSD(Bitmap bm, String url) { if (canIWriteOnSD()) { File sd = Environment.getExternalStorageDirectory(); File dest = new File(sd, "MoveInBlue/"); try { url =…
Charlie-Blake
  • 10,832
  • 13
  • 55
  • 90
18
votes
5 answers

Server returned HTTP response code: 400

I am trying to get an InputStream from a URL. The URL can be a opened from Firefox. It returns a json and I have installed an addon for viewing json in Firefox so I can view it there. So I tried to get it from Java by: URL url = new…
Tapas Bose
  • 28,796
  • 74
  • 215
  • 331
18
votes
5 answers

java.io.IOException: AUTHENTICATION_FAILED in Android Firebase (and SERVICE_NOT_AVAILABLE)

I'm getting following error on some devices while fetching firebase token: Fatal Exception: d.b.a.b.g.f java.io.IOException: AUTHENTICATION_FAILED com.google.android.gms.tasks.zzu.getResult (zzu.java:15) MainActivity$3.onComplete…
18
votes
3 answers

JVM failed to start: java.io.IOException: Cannot run program "/usr/libexec/StartupItemContext; error=2, No such file or directory

In my OS X Yosemite, I'm trying to start-domain in terminal: sh asadmin start-domain mythMobile and I get error: JVM failed to start: java.io.IOException: Cannot run program "/usr/libexec/StartupItemContext" (in directory…
Almas Adilbek
  • 4,371
  • 10
  • 58
  • 97
1 2
3
96 97