>Number: 5267
>Category: mod_jserv
>Synopsis: potential null pointer exception in JServ.start()
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: jserv
>State: open
>Class: sw-bug
>Submitter-Id: apache
>Arrival-Date: Sun Nov 7 16:10:01 PST 1999
>Last-Modified:
>Originator: [EMAIL PROTECTED]
>Organization:
apache
>Release: Apache/1.3.9 (Unix) ApacheJServ/1.1b3
>Environment:
SunOS 5.7 Generic_106541-08 sun4u sparc SUNW,Ultra-2
java version "1.1.7"
>Description:
If start() gets an IOException it'll invoke the fail() method which tests
log.active. However, log is not assigned until after the code that causes
the IOException. See code segment below:
static synchronized void start() {
// Load configuration parameters
try {
confs = new Configurations(new ExtendedProperties(confFile));
} catch (IOException e) {
fail("Error while reading configuration file", e);
}
// Create log/trace writer
log = new JServLog("log", confs);
>How-To-Repeat:
Remove the configuration file and restart the server.
>Fix:
Initialize log before confs is read. Then reiintialize afterwards.
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, you need]
[to include <[EMAIL PROTECTED]> in the Cc line and make sure the]
[subject line starts with the report component and number, with ]
[or without any 'Re:' prefixes (such as "general/1098:" or ]
["Re: general/1098:"). If the subject doesn't match this ]
[pattern, your message will be misfiled and ignored. The ]
["apbugs" address is not added to the Cc line of messages from ]
[the database 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! ]