myyron latorilla wrote:Hi, im also receiving this message in glassfish whenever I create a JSONObject object.
Sample log:
Dispatch[/role] to method 'getUsers' returned an exception
java.lang.reflect.InvocationTargetException
Sample code:
public ActionForward getUsers(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
throws Exception {
response.setContentType("text/html;charset=utf-8");
JSONObject json = new JSONObject(); //HERE IS WHERE THE EXCEPTION IS OCCURRING
json.put("userName", "Juan dela Cruz");
json.put("userID", "12345");
json.put("role", "System Administrator");
json.put("active", "true");
response.getWriter().write((new StringBuilder("[")).append(json.toString()).append("]").toString());
return null;
}
Any idea why this exception is occurring?..Thanks in advance
Vishal Pandya wrote:
But this all looks very ugly.
What's your purpose behind all this exercise? Provide us more detail.Somebody may suggest you some workaround to achieve the same thing.
Vishal Pandya wrote:
Chris Boldon wrote:...it would be 3,1-30 and 2,2-2.
Do you want to calculate which date gets repeated how many times?
I am unclear about the question.