Hi
I found there would be an error "error parsing result" while call by
JSON-RPC and we could not get the actual error message if the java code
threw a exception, which results from the error message is not valid JSON
string, for example:
{"error":com.ibm.iq.innovation.marketplace.biz.exception.BizException: A
Group named Jacky's team already exists.,"id":2}
So I think it would be better to fix it like this:
=>Line 246 in org.apache.tuscany.sca.binding.jsonrpc.provider.
JSONRPCServiceServlet:
Change the following code: =>
jsonResponse.put("error", e.getCause());
to the code as follows: =>
/**********************************************************
* add json error object into error so that
* the client javascript can parse them correctly.
*/
Throwable t=e.getCause();
JSONObject jsonError = new JSONObject();
jsonError.put("code", HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
jsonError.put("msg", t.getMessage());
jsonError.put(;"trace", t.getClass().getName()););
jsonResponse.put("error", jsonError);
/************************************************/
Best regards!
Jacky Mao , Software Engineer
IBM GPSG Wuhan Perform Center
Tel : 0086-027-87406266-1212
E-Mail: [EMAIL PROTECTED]