File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes NullPointerException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "NullPointerException" Watch "NullPointerException" New topic


preethi Ayyappan
Ranch Hand

Joined: Oct 04, 2007
Posts: 518
Hi, i am getting the following error when i run my code.
I think i am using null where the object is required.but i dont know how to solve it.Anyone help me please.

The following is the error.

at com.example.servlets.OutboundServlet1.doGet(
at javax.servlet.http.HttpServlet.service(
at javax.servlet.http.HttpServlet.service(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at org.apache.catalina.core.StandardWrapperValve.invoke(
at org.apache.catalina.core.StandardContextValve.invoke(
at org.apache.catalina.core.StandardHostValve.invoke(
at org.apache.catalina.valves.ErrorReportValve.invoke(
at org.apache.catalina.core.StandardEngineValve.invoke(
at org.apache.catalina.connector.CoyoteAdapter.service(
at org.apache.coyote.http11.Http11Processor.process(
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(
at org.apache.tomcat.util.threads.ThreadPool$

[ April 03, 2008: Message edited by: preethi Ayyappan ]

[ April 03, 2008: Message edited by: preethi Ayyappan ]
[ April 03, 2008: Message edited by: preethi Ayyappan ]
Nitesh Kant

Joined: Feb 25, 2007
Posts: 1638

Line number 67 of your servlet is throwing the exception.
Just check whatever objects you have there, can they be null?
If yes, then either do a null check or make sure they are non null.

apigee, a better way to API!
preethi Ayyappan
Ranch Hand

Joined: Oct 04, 2007
Posts: 518
Thanks.The below line is line no:67.


getMeetMe() is the method of the abstract class AbstractMeetMeEvent.In the definition for the, the following is given.

protected AbstractMeetMeEvent(Object source)

Now what i have to do in my code.If it needs an object,what should i do there?please guide me.
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 45307
It would appear that you have no object associated with the variable abstractMeetMe. Check carefully where that object is supposed to be initialised.

If that doesn't help, make sure the meetMe variable is not null.
subject: NullPointerException
It's not a secret anymore!