File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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
Marshal

Joined: Mar 22, 2005
Posts: 39541
    
  27
I suggest you find out which object is null in line 40 of class SalcalMain.


Ping & DNS - updated with new look and Ping home screen widget
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]
 
 
subject: getting Nullpointer exception what to do,
 
Similar Threads
Servlet processing
java.lang.IllegalArgumentException: Cannot invoke UploadForm.setUplaod - argument type mismatch
java.lang.NoSuchMethodError: HandlerMethodResolver
Stack trace of Servlet Error in Tomcat
SQLException: No data found