ORDS raises "java.io.IOException: Closed connection" intermittently (Doc ID 1946272.1)

Last updated on NOVEMBER 14, 2016

Applies to:

Oracle Application Express (formerly HTML DB) - Version 4.2.4 and later
Oracle REST Data Services - Version 2.0.5 to 2.0.9
Information in this document applies to any platform.

Symptoms


Oracle REST Data Services(ORDS) returns HTTP-500 error intermittently.

ERROR
-----------------------

500 - Internal Server Error
Request Path passes syntax validation
Mapping request to database pool: PoolMap [_failed=false, _lastUpdate=1392735600000, _pattern=/empinfo/, _poolName=apex, _regex=null, _type=BASE_PATH, _workspaceIdentifier=MY_WS, _serviceName=null]

 

The debug trace shows following excetpion:

WebException [statusCode=500]
at oracle.dbtools.rt.web.WebException.webException(WebException.java:343)
at oracle.dbtools.rt.web.WebException.internalError(WebException.java:262)
at oracle.dbtools.rt.resource.templates.jdbc.JDBCResourceTemplates.resourceHandler(JDBCResourceTemplates.java:148)
at oracle.dbtools.rt.resource.templates.v2.ResourceTemplatesDispatcher.dispatch(ResourceTemplatesDispatcher.java:89)
at oracle.dbtools.rt.resource.templates.jdbc.JDBCResourceTemplateDispatcher.dispatch(JDBCResourceTemplateDispatcher.java:90)
at oracle.dbtools.rt.web.RequestDispatchers.dispatch(RequestDispatchers.java:93)
at oracle.dbtools.rt.web.ETags.checkPrecondition(ETags.java:53)
at oracle.dbtools.rt.web.HttpEndpointBase.restfulServices(HttpEndpointBase.java:426)
at oracle.dbtools.rt.web.HttpEndpointBase.service(HttpEndpointBase.java:164)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:844)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:242)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:216)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:132)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:338)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:221)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3284)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3254)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2163)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2089)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2074)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1513)
at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:254)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
Caused by: java.io.IOException: Closed connection
at oracle.jdbc.driver.OracleClobReader.needChars(OracleClobReader.java:206)
at oracle.jdbc.driver.OracleClobReader.read(OracleClobReader.java:142)
at java.io.Reader.read(Reader.java:83)
at oracle.dbtools.common.util.StreamCopy.drain(StreamCopy.java:60)
at oracle.dbtools.common.util.StreamCopy.string(StreamCopy.java:150)
at oracle.dbtools.rt.resource.templates.jdbc.JDBCResourceTemplates.resourceHandler(JDBCResourceTemplates.java:123)
... 24 more
Caused by: java.sql.SQLRecoverableException: Closed connection
at oracle.sql.CLOB.getDBAccess(CLOB.java:1510)
at oracle.sql.CLOB.getChars(CLOB.java:459)
at oracle.jdbc.driver.OracleClobReader.needChars(OracleClobReader.java:187)
... 29 more

 

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