----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files. Don't make us guess your problem!!!
----------------------------------------------------------------
I think the best thing is to find out the answer by yourself. And I have
got the answer to my own question. The exception was generated because I
defined "log.channel.servletLog" as true twice in jserv.properties.
After I removed the duplicate one and restarted Apache/JServ, this
exception just goes away.
I've checked the codes, the problem exists in ExtendedProperties.load
function where properties will be loaded from a file into a hashtable.
If you have duplicate definitions of log.channel.servletLog, the load
function will first add this key and the value (true/false) into the
hashtable as a (string, boolean) pair; then "load" function try to add
the second definition as a (string, vector) pair. This will cause the
exception I got before.
Check the following codes in ExtendedProperties.load:
while (true) {
String line = reader.readProperty();
int equalSign = line.indexOf('=');
if (equalSign > 0) {
String key = line.substring(0, equalSign).trim();
String value = line.substring(equalSign + 1).trim();
if ("".equals(value)) /* configure produces lines */
continue; /* like this ... just ignore it. */
PropertiesTokenizer tokenizer = new PropertiesTokenizer(value);
while (tokenizer.hasMoreTokens()) {
String token = tokenizer.nextToken();
Object o = this.get(key);
if (o instanceof String) {
Vector v = new Vector(2);
v.addElement(o);
v.addElement(token);
this.put(key, v);
} else if (o instanceof Vector) {
((Vector) o).addElement(token);
} else {
this.put(key, token);
}
}
}
}
Li
Carsten Heyl wrote:
>
> ----------------------------------------------------------------
> BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
> WHEN YOU POST, include all relevant version numbers, log files,
> and configuration files. Don't make us guess your problem!!!
> ----------------------------------------------------------------
>
> >
> >The following exception can be found in the error.log file when starting
> >a JSP page. Can anyone tell me why I got this exception?
> >
> >----------------------------------------------------------------------
> >
> >[Mon Nov 01 16:42:43 1999] [info] Parent: Created child process 82
> >[Mon Nov 01 16:42:43 1999] [info] Parent: Duplicating socket 172 and
> >sending it to child process 82
> >GNUJSP: Detected JSDK version 2.0
> >java.lang.ClassCastException: log.channel.servletLog doesn't map to a
> >Boolean object
>
> So what is the value of
>
> log.channel.servletLog
>
> in your apache jserv config?
>
> > at org.apache.java.util.Configurations.getBoolean(Configurations.java,
> >Compiled Code)
> > at org.apache.java.util.Configurations.getBoolean(Configurations.java,
> >Compiled Code)
> > at org.apache.java.io.LogWriter.isActive(LogWriter.java:332)
> > at org.apache.java.io.LogWriter$Agent.write(LogWriter.java:454)
> > at org.apache.java.io.LogWriter$Agent.run(LogWriter.java, Compiled
> >Code)
> >
> >--------------------------------------------------------------------
> >Thanks.
> >
> >Li
> >
> >PS. Environment: Windows NT4.0/SP4 + Apache1.3.9 + Apache JServ 1.1b3 +
> >GNUJSP 1.0
> >
> >
> >--
> >--------------------------------------------------------------
> >Please read the FAQ! <http://java.apache.org/faq/>
> >To subscribe: [EMAIL PROTECTED]
> >To unsubscribe: [EMAIL PROTECTED]
> >Archives and Other: <http://java.apache.org/main/mail.html>
> >Problems?: [EMAIL PROTECTED]
> >
>
> Ciao,
> Carsten Heyl
>
> Carsten Heyl [EMAIL PROTECTED]
> NADS - Solutions on Nets http://www.nads.de/
> NADS GmbH http://www.pixelboxx.de/
> Hildebrandtstr. 4E Tel.: +49 211 933 02-90
> D-40215 Duesseldorf Fax.: +49 211 933 02-93
>
> --
> --------------------------------------------------------------
> Please read the FAQ! <http://java.apache.org/faq/>
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> Archives and Other: <http://java.apache.org/main/mail.html>
> Problems?: [EMAIL PROTECTED]
--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html>
Problems?: [EMAIL PROTECTED]