Wednesday, February 4, 2015

Oracle OSB 12c: ORABPEL-15235, "Failed to translate JSON to XML" when processing a JSON Message

As we know in Oracle OSB 12c we got a new rest adapter to build and expose rest service from osb. So I was working on Rest adapter in osb and expose one of the rest service which is accepting the request in JSON format and sending the response in the same format. In rest service there are many parameters to be passed as request. So while testing this service from the osb console I am getting the following exception:

Translation Failure.
Failed to translate JSON to XML. 
The incoming data does not conform to the NXSD schema. Please correct the problem.

 ORABPEL-15235

Caused by: java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at de.odysseus.staxon.base.AbstractXMLStreamReader.getTextCharacters(AbstractXMLStreamReader.java:529)
at oracle.tip.pc.services.translation.xlators.json.JsonSaxEventsGenerator.generateEvents(JsonSaxEventsGenerator.java:241)
at oracle.tip.pc.services.translation.xlators.json.JsonTranslator.translateFromNative(JsonTranslator.java:139)

Solution:

Well for this error I have found a document in oracle support which says that this is the bug in Oracle OSB 12.1.3.0 that when processing the JSON message if the size of the request is greater than 4096 then this error is thrown.
So oracle support has issued a patch to resolve this issue. Patch number is 18692809 and for more information on this please follow the Document ID 1948201.1 on Oracle Support.

No comments:

Post a Comment