Page 1 of 1
Validation Error java.io.FileNotFoundException-
Posted: Tue Sep 16, 2003 7:32 pm
I have two DB XML files, both validate independantly.
However, if I use an ENTITY reference to include the second file in the first I get:
Validation Error java.io.FileNotFoundException-/path/to/some/file/filename.xml (Too many open files)
Note I do have many ENTITY references in each file. But independantly they validate. Its only when I include the second to the first that the error occurs.
The filename.xml in the error is also not consistantly referencing the same file.
Posted: Tue Sep 16, 2003 9:34 pm
We also got into this problem on Mac OS X trying to edit the oxygen user guide
. This is a Xerces problem, we made a test showing that this problem appears on a simple parsing of a file that includes a lot of external entities and post this in a bugzilla entry for Xerces:
I guess you have this problem in Linux, right ?
A possible workaround will be if it is possible to increase the system allowed number of open files. We will look to see if this is possible.
Posted: Wed Sep 17, 2003 10:52 am
Try the following command:
ulimit -n 2047
This will set the maximum number of files that can be opened at one time by a process to 2047. I had the same problem on Mac OS X and I have put this command in my .bash_profile file.
Posted: Wed Sep 17, 2003 12:42 pm
I still get the same error.
.bash_profile on MACOS = .bashrc on Linux
I added this command to my ~/.bashrc.
Now bash raises the following error message when invoked.
ulimit: open files: cannot modify limit: Operation not permitted.
The validation problem remains.
Posted: Wed Sep 17, 2003 12:58 pm
Sorry, my fault. I have This comand should not be placed in .bashrc
I did not have .bash_profile, but I do have .profile, one of the files bash reads on start.
Added ulimit to .profile
But still the same problem.
When I type ulimit at bash prompt. It returns the word unlimited.
Any ideas where I went wrong or misunderstood.
Posted: Wed Sep 17, 2003 1:09 pm
According to the MAN for bash, not all systems allow ulimit -n to be set
ulimit -a shows open files value to be 1024.
When I try ulimit from prompt I get the same message prev mentioned.
Perhaps there is another way?
Posted: Wed Sep 17, 2003 1:13 pm
Have you tried running that command as root ?
Posted: Wed Sep 17, 2003 2:06 pm
Yes. Under root this works. But not for other users.
Any idea how I can change it for the users?
Posted: Wed Sep 17, 2003 2:13 pm
You can add the
ulimit -n 2047
to the /etc/rc.d/rc.local file.
Edit the file as root. On some Linuxes the name of this file is changed. This is executed each time the system is started. In this way all the users will benefit of the setting.
Posted: Wed Sep 17, 2003 2:31 pm
But for SUSE users see this about the non-existance of rc.local
Posted: Wed Sep 17, 2003 5:03 pm
Sorry, it enables me to set open files, but this does not solve the validation problem.
Even when I run OXY as root the same problem exists.
Posted: Thu Sep 18, 2003 1:48 pm
The problem also extends to XPath, so I think that the problem is to do with Xerces.
Posted: Thu Sep 18, 2003 2:03 pm
Sure it is a Xerces problem, please review my first post.
You can find in the bug attachments the test to reproduce it with a simple parsing.
Posted: Thu Sep 18, 2003 2:18 pm
Yes I did see your first post. I just thought the Mihai's ulimit suggestion may have been a possible the answer.
BTW. I am able to open and validate my documents under XXE and Morphon, which parsers are they using?
Posted: Thu Sep 18, 2003 2:29 pm
Dan's suggestion with ulimit was an workaround that worked for us on Mac OS X. You may try a larger parameter for ulimit.
I do not know what parser they are using, it may be Xerces but a different version. We are using the latest version.