java - Nullpointer exception in method call by RPC -


getting nullpointer exception while invoking method 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 selectiontable class making jdbc connection , processing select query , returning result in array list. selectiontable class working fine(i have tested separately ). getting nullpointer exception in method call. while debugging ,as iteration reaches method call, getting directed below java method:

public invocationtargetexception(throwable target) {     super((throwable)null);  // disallow initcause     this.target = target; } 

and getting below errors:

com.iti.gwtproject.pcmaintenancelog.client.service.customservice.getselectiontableview(java.lang.string,java.lang.string)' threw unexpected exception: java.lang.nullpointerexception

fyi: getselectiontableview method getting invoked rpc call.

    selectiontable sobj = null;     response= sobj.selectiontablevalue(recievedtodate, recievedfromdate); 

there go. sobj null when try call selectiontablevalue on it...


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -