Hai,
In LS sometimes it display the NullPointerException.
Exception in thread "Thread-168" java.lang.NullPointerException
at com.chellasoft.activetrader.utils.OrderUtilities.run(OrderUtilities.j
ava:72)
The run function of Order Utilities as follows,
public void run() {
//send order request/modify/cancel message
if (user != null) {
try {
OrderRequestMessage orderRequestMessage = new OrderRequestMessage();
orderRequestMessage.setOrderValue(message);
String jsonString = orderRequestMessage.toJSON();
JsonSingleUserMessage jsonSingleUserMessage = new JsonSingleUserMessage(user.getUserId(), jsonString.length(), jsonString, CustomConstants.JSONMessageTypes_OrderRequestMessage); ProcessBrowserMessages.getInstance().sendJSONSingleUserMessage(jsonSingleUserMessage);
}catch(JSONException e) {
logger.severe("Error getting when parse order request message : " + e.getMessage() + "......");
}
} else {
logger.info("Invalid user: " + user.getUserName() + " to place Order");
}
/*PrepareOrderArgs prepareOrderArgs = new PrepareOrderArgs(user, message);
orderArgs = prepareOrderArgs.getOrderArgs();
placeOrder();*/
}
Please give suggestion for this issue.
Thanks in advance.