Skip to Main Content

Integration

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!

setVariableData() for JSON objects

User_TNWX6Jan 8 2016 — edited Feb 26 2020

SOA version 12.2.1 and BPEL 2.0


I am trying to set the value a bpel variable ‘outputVar’ as below in a java embedding. 'outputVar' is of json object type. I could print ‘obj’ in the logs. But, the setVariableData() is not assigning ‘obj’ to ‘outputVar’.

    String jsonResponse = jsonSoapInvoker.xmlToJson(xmlString);      

    JSONParser parser = new JSONParser();  

    Object obj = parser.parse(jsonResponse);      

    System.out.println("******* obj ********: " + obj);    

    setVariableData("outputVar", obj);

    System.out.println("******* outputVar ********: " + getVariableData("outputVar"));

Output of the last sysout is {}


In the logs, I get the the error


ORABPEL-05222

Type class not found.

cannot find class for type org.json.simple.JSONObject

This was an internal error. The persistence manager for the type named in the error message could not be found in the class path. All required persistence managers should be registered by default.

Contact Oracle Support Services.  Provide the error message and the exception trace in the log files (with logging level set to debug mode).

I have put the dependant jars in sca-inf/lib of the composite. These jars are json_simple_11.jar, jdom-2.0.6.jar, java-json.jar and a custom jar.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 6 2016
Added on Jan 8 2016
5 comments
1,697 views