Getting nullpointer exception while invoking a method from different class
public ArrayList<String> getSelectionTableView(String recievedToDate, String recievedFromDate) {
ArrayList<String> response = new ArrayList<String>();
SelectionTable sobj = null;
response= sobj.selectionTableValue(recievedToDate, recievedFromDate);
return response;
}
In this SelectionTable class is just making a JDBC connection and processing a Select query and returning the result in an array list. SelectionTable class is working fine(I have tested it separately ). I am getting nullpointer exception in method call. While debugging ,as the iteration reaches the method call, it is getting directed to below java method:
public InvocationTargetException(Throwable target) {
super((Throwable)null); // Disallow initCause
this.target = target;
}
and I am getting below Errors:
com.iti.gwtproject.pcmaintenancelog.client.service.CustomService.getSelectionTableView(java.lang.String,java.lang.String)' threw an unexpected exception: java.lang.NullPointerException
FYI: getSelectionTableView method is getting invoked by a RPC call.