By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,823 Members | 730 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,823 IT Pros & Developers. It's quick & easy.

Null Pointer Exception

P: 1
In The Following Code I am Getting Null Pointer Exception

try{
ClientBean[] clientInfo = clientManager.getClientList();

System.out.println("richa2"+clientInfo);

if (clientInfo != null ) {
form.setClientInfo(clientInfo);
// form.getClientInfo();
System.out.println("if");

//System.out.println("form.getClientInfo() "+form.getClientInfo());

System.out.println("set all info's");
forward = findMapping(context, "success");
System.out.println("After success");
} else
{ System.out.println("else");
// message = "AutoCostingInterfaceDisplayAction" ;
//context.setAttribute("message", message);
System.out.println("going in failure page");
//forward = findMapping(context, "failure");
}
}catch(Exception ex){
System.out.println("inside catch"+ex);
}

return forward;
}


Can you help me regarding this ?
Jul 9 '07 #1
Share this Question
Share on Google+
1 Reply


10K+
P: 13,264
In The Following Code I am Getting Null Pointer Exception

try{
ClientBean[] clientInfo = clientManager.getClientList();

System.out.println("richa2"+clientInfo);

if (clientInfo != null ) {
form.setClientInfo(clientInfo);
// form.getClientInfo();
System.out.println("if");

//System.out.println("form.getClientInfo() "+form.getClientInfo());

System.out.println("set all info's");
forward = findMapping(context, "success");
System.out.println("After success");
} else
{ System.out.println("else");
// message = "AutoCostingInterfaceDisplayAction" ;
//context.setAttribute("message", message);
System.out.println("going in failure page");
//forward = findMapping(context, "failure");
}
}catch(Exception ex){
System.out.println("inside catch"+ex);
}

return forward;
}


Can you help me regarding this ?
The exception trace also tells you the exact line number that threw that exception. Which line does it say?
Jul 9 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.