This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Servlets and the fly likes getting Nullpointer exception what to do, Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "getting Nullpointer exception what to do," Watch "getting Nullpointer exception what to do," New topic
Author

getting Nullpointer exception what to do,

Ravii Bhai
Greenhorn

Joined: Dec 13, 2008
Posts: 10
First time its executing after deployment... but second or 3rd time i am getting exception by say... what to do.......???











came to DBConnection package111111111111
java.lang.NullPointerException
at SalcalMain.processRequest(SalcalMain.java:40)
at SalcalMain.doPost(SalcalMain.java:74)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)
Build Salary values Starts from here.............
came to DBConnection package111111111111
came to DBConnection package111111111111
came to DBConnection package111111111111
came to DBConnection package111111111111
came to DBConnection package111111111111
came to DBConnection package111111111111
came to DBConnection package111111111111
Build Salary values Starts from here.............
came to DBConnection package111111111111
java.lang.NullPointerException
at SalcalMain.processRequest(SalcalMain.java:40)
at SalcalMain.doPost(SalcalMain.java:74)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)
Ulf Dittmer
Rancher

Joined: Mar 22, 2005
Posts: 42956
    
  73
I suggest you find out which object is null in line 40 of class SalcalMain.
sudhir nim
Ranch Hand

Joined: Aug 29, 2007
Posts: 212

Can you post the code of SalcalMain.java file? It will help in identifying the root cause of the NPE.


[Servlet tutorial] [Servlet 3.0 Cook Book]
 
wood burning stoves
 
subject: getting Nullpointer exception what to do,
 
jQuery in Action, 3rd edition