My Oracle Support Banner

WLS All - Servlet is receiving a NullPointerException (Doc ID 766960.1)

Last updated on AUGUST 08, 2023

Applies to:

Oracle WebLogic Server - Version 6.1 and later
Information in this document applies to any platform.
Information in this document applies to any platform


The problem is encountered when running a servlet.  The servlet will run fine until a null pointer exception is thrown.
 The servlet is taking parameters from the file via the ServletConfig object.

When the servlet fails the following error is given:

<ServletContext-General> Servlet failed with Exception
 at javax.servlet.GenericServlet.getServletContext(
 at javax.servlet.GenericServlet.log(
 at javax.servlet.GenericServlet.destroy(
 at weblogic.servlet.internal.ServletStubImpl.destroyServlet(
 at weblogic.servlet.internal.ServletStubImpl.prepareServlet(
 at weblogic.servlet.internal.ServletStubImpl.checkForReload(
 at weblogic.servlet.internal.ServletStubImpl.getServlet(
 at weblogic.servlet.internal.ServletStubImpl.invokeServlet(
 at weblogic.servlet.internal.ServletContextImpl.invokeServlet(
 at weblogic.servlet.internal.ServletContextImpl.invokeServlet(
 at weblogic.servlet.internal.ServletContextManager.invokeServlet(
 at weblogic.socket.MuxableSocketHTTP.invokeServlet(
 at weblogic.socket.MuxableSocketHTTP.execute(


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.