Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

File handle leak?

avromMar 31 2008 — edited Apr 2 2008
Hi all,

I'm not even 100% sure the following is a JHS issue; apologies if this is in the wrong place.

I have a JHS 10.1.3.2 application running on Oracle AS 10.1.2 (10.1.3.2 ADF libraries are installed on the container). Other applications--both plain JDev and JHS--have been running in this container for months (over a year in a few cases) with no obvious problems.

This application runs fine in the container for several hours, but eventually, the following message shows up in the log:

08/03/25 15:56:16 oracle.core.ojdl.LoggingException
...
08/03/25 15:56:16 Caused by:
08/03/25 15:56:16 java.io.IOException: Cannot create a file when that file already exists
08/03/25 15:56:16 at java.io.FileOutputStream.openAppend(Native Method)
08/03/25 15:56:16 at java.io.FileOutputStream.<init>(FileOutputStream.java:177)
08/03/25 15:56:16 at java.io.FileOutputStream.<init>(FileOutputStream.java:102)
08/03/25 15:56:16 at oracle.core.ojdl.BusStopLogWriter.writeBytes(BusStopLogWriter.java:240)
08/03/25 15:56:16 at oracle.core.ojdl.BufferedLogWriter.flush(BufferedLogWriter.java:159)
08/03/25 15:56:16 at oracle.core.ojdl.BufferedLogWriter$Flusher.run(BufferedLogWriter.java:396)

(No classes from ADF, JSF, JHeadstart, or my application show up anywhere in the stack trace).

Then, after a little while longer, the application stops working entirely. Firefox shows the following stack trace (although this error never shows up in the server logs):

java.io.IOException: Too many open files
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpApplication.include(HttpApplication.java:4023)
at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.FileRequestDispatcher.forwardInternal(FileRequestDispatcher.java:198)
at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:825)
at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:224)
at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:133)
at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
at java.lang.Thread.run(Thread.java:534)

I never directly perform file I/O in my application. The above looks like an app server error, but it only occurs in this one application. Other apps in the same container continue to work fine even after this error starts appearing, and I've never seen the error show up with any of them.

Is there any chance that I've misconfigured some JHS property in such a way that it causes a file handle leak?

Thanks much,
Avrom
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 30 2008
Added on Mar 31 2008
1 comment
2,733 views