My Oracle Support Banner

Call To Rest Endpoint Fails With Error "java.lang.ClassCastException: oracle.xml.parser.v2.XMLDocument cannot be cast to java.io.InputStream" (Doc ID 2502130.1)

Last updated on JULY 07, 2020

Applies to:

Integration Cloud Service - Version N/A and later
Information in this document applies to any platform.

Symptoms

On : NA version,

While invoking REST Endpoint on ERP from ICS it fails with below error.

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

2019-01-22T21:25:41.972+00:00] [ics_server2] [NOTIFICATION] [] [oracle.osb.logging.pipeline] [tid: 158254] [userId: <USERID>] [ecid:<ECID>0:1] [APP: Service Bus Logging] [FlowId: <FLOWID>]  [RouteNode1, RouteErrorHandler, faults, ERROR] [ICS Tracing Enabled]: [Code:CONSULT_CLIENT_TEST][Version:01.00.0000][Instance:6800219][Location:Request to Target Service - after payload(post-mapping) ][Operation:execute]: [[
 Fault:
<fault xmlns="http://www.bea.com/wli/sb/context"><errorCode>OSB-380001</errorCode><reason>&lt;genericRestFault&gt;&lt;errorCode&gt;REST_RES_PLD_ERR&lt;/errorCode&gt;&lt;errorPath&gt;&lt;![CDATA[An error occurred while processing the response payload in the target REST endpoint.]]&gt;&lt;/errorPath&gt;&lt;instance&gt;&lt;![CDATA[Target REST endpoint response payload processing failed.[[java.lang.ClassCastException: oracle.xml.parser.v2.XMLDocument cannot be cast to java.io.InputStream]]]]&gt;&lt;/instance&gt;&lt;/genericRestFault&gt;
</reason><location><node>RouteNode1</node><path>response-pipeline</path></location></fault>
 Response:
<Fault xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://schemas.xmlsoap.org/soap/envelope/"><faultcode xmlns="">soap-env:Server</faultcode><faultstring xmlns="">Application Error</faultstring><detail xmlns=""><jca-runtime-fault-detail xmlns="http://www.bea.com/wli/sb/transports/jca"><eis-error-code>APIInvocationError</eis-error-code><eis-error-message>&lt;genericRestFault&gt;&lt;errorCode&gt;REST_RES_PLD_ERR&lt;/errorCode&gt;&lt;errorPath&gt;&lt;![CDATA[An error occurred while processing the response payload in the target REST endpoint.]]&gt;&lt;/errorPath&gt;&lt;instance&gt;&lt;![CDATA[Target REST endpoint response payload processing failed.[[java.lang.ClassCastException: oracle.xml.parser.v2.XMLDocument cannot be cast to java.io.InputStream]]]]&gt;&lt;/instance&gt;&lt;/genericRestFault&gt;</eis-error-message><exception>oracle.tip.adapter.sa.api.JCABindingException: &lt;genericRestFault&gt;&lt;errorCode&gt;REST_RES_PLD_ERR&lt;/errorCode&gt;&lt;errorPath&gt;&lt;![CDATA[An error occurred while processing the response payload in the target REST endpoint.]]&gt;&lt;/errorPath&gt;&lt;instance&gt;&lt;![CDATA[Target REST endpoint response payload processing failed.[[java.lang.ClassCastException: oracle.xml.parser.v2.XMLDocument cannot be cast to java.io.InputStream]]]]&gt;&lt;/instance&gt;&lt;/genericRestFault&gt;
; nested exception is:
    &lt;genericRestFault&gt;&lt;errorCode&gt;REST_RES_PLD_ERR&lt;/errorCode&gt;&lt;errorPath&gt;&lt;![CDATA[An error occurred while processing the response payload in the target REST endpoint.]]&gt;&lt;/errorPath&gt;&lt;instance&gt;&lt;![CDATA[Target REST endpoint response payload processing failed.[[java.lang.ClassCastException: oracle.xml.parser.v2.XMLDocument cannot be cast to java.io.InputStream]]]]&gt;&lt;/instance&gt;&lt;/genericRestFault&gt;

    at oracle.tip.adapter.sa.impl.JCABindingReferenceImpl.request(JCABindingReferenceImpl.java:344)
    at com.bea.wli.sb.transports.jca.binding.JCATransportOutboundOperationBindingServiceImpl.invoke(JCATransportOutboundOperationBindingServiceImpl.java:218)
    at com.bea.wli.sb.transports.jca.JCATransportEndpoint.sendRequestResponse(JCATransportEndpoint.java:320)
    at com.bea.wli.sb.transports.jca.JCATransportEndpoint.access$100(JCATransportEndpoint.java:39)
    at com.bea.wli.sb.transports.jca.JCATransportEndpoint$1.run(JCATransportEndpoint.java:477)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
    at weblogic.security.Security.runAs(Security.java:61)
    at com.bea.wli.sb.util.security.SecurityUtils.executeAs(SecurityUtils.java:70)
    at com.bea.wli.sb.transports.jca.JCATransportEndpoint.send(JCATransportEndpoint.java:269)
    at com.bea.wli.sb.transports.jca.JCATransportProvider.sendMessageAsync(JCATransportProvider.java:617)
    at sun.reflect.GeneratedMethodAccessor3700.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)


STEPS
-----------------------
The issue can be reproduced at will with the following steps:
1. Call an ERP Rest Service from ICS

 

Cause

To view full details, sign in with your My Oracle Support account.

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


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.