www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Wygand <...@wygand.com>
Subject mod_jserv/4102: calling getServerContext() in init causes null pointer exception
Date Mon, 22 Mar 1999 23:00:45 GMT

>Number:         4102
>Category:       mod_jserv
>Synopsis:       calling getServerContext() in init causes null pointer exception
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    jserv
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Mon Mar 22 15:10:01 PST 1999
>Last-Modified:
>Originator:     rob@wygand.com
>Organization:
apache
>Release:        Apache 1.3.3 + JServ 1.0b2
>Environment:
Apache with JServ on Linux.  JServ classes on NT.
JDK 1.2. JSDK 2.0
>Description:
I am attempting to call log() in an init function.  This actually results 
in a call to getServerContext().log().  Apparently the ServerContext is 
null during init, thereby causing the exception.

I don't know if this is the expected behaviour, but it seems odd.
>How-To-Repeat:
Call log() from within a servlets init routine.
>Fix:
Initialize a servlet context object before calling init on a servlet?
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <apbugs@Apache.Org> in the Cc line ]
[and leave the subject line UNCHANGED.  This is not done]
[automatically because of the potential for mail loops. ]
[If you do not include this Cc, your reply may be ig-   ]
[nored unless you are responding to an explicit request ]
[from a developer.                                      ]
[Reply only with text; DO NOT SEND ATTACHMENTS!         ]




Mime
View raw message