FileNotFoundException (File too large)

16,454

Solution 1

I received this message when trying to write a file to a directory on a RedHat server that already had the maximum number of files in it. I subdivided my files into subdirectories and the error did not reappear.

Solution 2

I think that this is an obscure error that is actually coming from the OS level or the JVM's native code implementation. The message "File too large" is the error message that you would get if the perror C library method was used to render the EFBIG error number.

Now ordinarily, this should not happen. According to the UNIX / Linux manual entries, the various open library calls should not fail with EFBIG.

However, I have seen various error reports that imply that fopen (etcetera) can fail like that on some file systems, and/or when the a C / C++ program has been built with 64bit file size support disabled.


So what does this mean?

It is not clear, but I suspect that it means that you are either:

  • using a flaky implementation of Java,

  • running a flaky release of UNIX / Linux, or

  • you are trying to use some type of file system that is not well supported by your server's OS. (Might it be on a FUSE file system?)

A possibly related Java bug:

Solution 3

So , it is solved. The problem is that, disk is full as a result stream takes long time, I clean up the disk after that there is no problem,

Share:
16,454
Poyraz
Author by

Poyraz

Updated on June 16, 2022

Comments

  • Poyraz
    Poyraz almost 2 years

    I am getting this exception when trying to download a file

    Caused by: java.io.FileNotFoundException: /repository/PWWVFSYWDW0STLHYVEEKHMYBXZTTETGROCQ4FGdsadadaXR1407709207964905350810526.jpg (File too large)
    at java.io.FileOutputStream.open(Native Method)
    

    It is clear that file the exists. In addition to that, the same program works properly on my PC, but there is a problem with the server, which is Unix

    Any ideas what might be causing this?