I have a Main class:
public class Retrigger {
public static void main(String[] args){
Long i= 97944605L;
com.armus.flow.Implement rdf = new com.armus.flow.Implement();
try {
rdf.retrfail(i);
}
catch(Throwable e){
System.out.println("In exception a = "+e+" "+i);
e.printStackTrace();
return;
}
}
}
I am calling method retrfail
of the Implement
class and passing a long value:
import com.armus.common.Dsessionservice;
public class Implement
extends Remote
implements DMSer, Ajaxser {
private Dsessionservice flowservice;
private Dsession getDsession(long sessionId)
throws ServiceException {
try {
dss = this.flowservice.getprocessname(Long.valueOf(sessionId));
}
catch (ServerException e) {
//some code
}
//some code
}
public void retrfail(long sessionId) {
Dsession dss = getDsession(sessionId);
// some code
}
}
The implementing class passes the id to other Dsessionservice interface to get the process name.
public abstract interface Dsessionservice
{
public abstract Dsessionservice getprocessname(Long paramLong)
throws ServerException;
}
The program compiles fine. But I am getting java.lang.nullpointerexception
when running the program at the below line
dss = this.flowservice.getprocessname(Long.valueOf(sessionId));
What am I doing wrong here.
Can someone please help?