Validation Error java.io.FileNotFoundException-

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
seanwhe
Posts: 27
Location: South Africa

Validation Error java.io.FileNotFoundException-

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.

Any ideas?
Sean Wheller
Technical Writer
sean@inwords.co.za
http://www.inwords.co.za
george
Site Admin
Posts: 2100

Tue Sep 16, 2003 9:34 pm

Hi Sean,

We also got into this problem on Mac OS X trying to edit the oxygen user guide :wink: . 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:
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19152

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.


Best Regards,
George
Dan
Posts: 304

Wed Sep 17, 2003 10:52 am

Hello Sean,

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.
seanwhe
Posts: 27
Location: South Africa

Wed Sep 17, 2003 12:42 pm

Hello Mihai,

I still get the same error.
.bash_profile on MACOS = .bashrc on Linux

I added this command to my ~/.bashrc.
logoff/logon.
Now bash raises the following error message when invoked.
ulimit: open files: cannot modify limit: Operation not permitted.

The validation problem remains.
Sean Wheller

Technical Writer

sean@inwords.co.za

http://www.inwords.co.za
seanwhe
Posts: 27
Location: South Africa

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.
Sean Wheller

Technical Writer

sean@inwords.co.za

http://www.inwords.co.za
seanwhe
Posts: 27
Location: South Africa

Wed Sep 17, 2003 1:09 pm

According to the MAN for bash, not all systems allow ulimit -n to be set
http://www.die.net/doc/linux/man/man1/bash.1.html

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?
Sean Wheller

Technical Writer

sean@inwords.co.za

http://www.inwords.co.za
george
Site Admin
Posts: 2100

Wed Sep 17, 2003 1:13 pm

Hi Sean,

Have you tried running that command as root ?

Best Regards,
George
seanwhe
Posts: 27
Location: South Africa

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?
Sean Wheller

Technical Writer

sean@inwords.co.za

http://www.inwords.co.za
Dan
Posts: 304

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.
seanwhe
Posts: 27
Location: South Africa

Wed Sep 17, 2003 2:31 pm

That works.

But for SUSE users see this about the non-existance of rc.local

http://www.luci.org/luci-discuss/199912/msg00110.html
Sean Wheller

Technical Writer

sean@inwords.co.za

http://www.inwords.co.za
seanwhe
Posts: 27
Location: South Africa

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.
Sean Wheller

Technical Writer

sean@inwords.co.za

http://www.inwords.co.za
seanwhe
Posts: 27
Location: South Africa

Thu Sep 18, 2003 1:48 pm

The problem also extends to XPath, so I think that the problem is to do with Xerces.
Sean Wheller

Technical Writer

sean@inwords.co.za

http://www.inwords.co.za
george
Site Admin
Posts: 2100

Thu Sep 18, 2003 2:03 pm

Sean,

Sure it is a Xerces problem, please review my first post.
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:
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19152


You can find in the bug attachments the test to reproduce it with a simple parsing.

Regards,
George
seanwhe
Posts: 27
Location: South Africa

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?
Sean Wheller

Technical Writer

sean@inwords.co.za

http://www.inwords.co.za
george
Site Admin
Posts: 2100

Thu Sep 18, 2003 2:29 pm

Hi Sean,

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.

Best Regards,
George

Return to “Common Problems”

Who is online

Users browsing this forum: No registered users and 0 guests