This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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: 38068
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.
I agree. Here's the link:
subject: NullPointerException
Similar Threads
How to use an event
Nullpointer exception in servlet
I Want to add streamfile like welcome for outbound call
exception error:noclassfound