Hi there,
I work on class InfoProvider as an utility class to access database and returns a list of ID. This class has a static method to perform my goal. It works fine in stand alone application. But when I inject it into a
servlet. My servlet throws a Null pointer exception as follows:
"...type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
java.lang.NullPointerException
adserv.pdi.InfoProvider.getDocIDList(InfoProvider.java:42)
adserv.pdi.ADServlet.doGet(ADServlet.java:59)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.12 logs.
..."
and my utility class:
Any suggestion is appreciated. Thanks.
John
[Edit by Dave - code tags added]
[ March 07, 2006: Message edited by: David O'Meara ]