"java.io.IOException: failed to read 'X' bytes from InputStream" even with <resource-reload-check-secs> Set to 0 (Doc ID 1436012.1)

Last updated on NOVEMBER 05, 2016

Applies to:

Oracle WebLogic Server - Version 10.3.1 to 12.1.1.0
Information in this document applies to any platform.

Symptoms

The following exception is seen on the log file while navigating to a page that accesses a file which size has been recently modified. Specifically, this error is shown if the particular file has decreased its size:


####<Dec 14, 2011 4:42:35 PM CLST> <Error> <HTTP> <fmc-pc> <AdminServer> <[ACTIVE] ExecuteThread: '20' for queue: 'weblogic.kernel.Default (self-tuning)'> <> <> <> <1323891755069> <BEA-101019> <[ServletContext@2017534326[app:BC_S module:BC_S path:/BC_S spec-version:2.5]] Servlet failed with IOException
java.io.IOException: failed to read '6' bytes from InputStream; clen: 208425 remaining: 6 count: 747
at weblogic.servlet.internal.ChunkOutput.writeStream(ChunkOutput.java:417)
at weblogic.servlet.internal.ChunkOutputWrapper.writeStream(ChunkOutputWrapper.java:178)
at weblogic.servlet.internal.ServletOutputStreamImpl.writeStream(ServletOutputStreamImpl.java:523)
at weblogic.servlet.internal.ServletOutputStreamImpl.writeStream(ServletOutputStreamImpl.java:511)
at weblogic.servlet.FileServlet.sendFile(FileServlet.java:410)
at weblogic.servlet.FileServlet.doGetHeadPost(FileServlet.java:234)
at weblogic.servlet.FileServlet.service(FileServlet.java:173)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:502)
at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:248)
at Test.service(Test.java:36)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3590)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2200)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2106)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1428)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
>


On the other hand, if the file is modified but it increases its size, no error is seen but the file gets truncated and only the amount of bytes of the older file is shown.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms