Ok folks, I've got a doozy of an error.
When one of our developers starts Phoenix 4.0.1 running James, he gets
the following:
INFO 2002-10-21 18:52:09.222 [Phoenix ] (): Logger started
WARN 2002-10-21 18:52:09.612 [Phoenix ] (): Phoenix was not started
by the daemon thus it will not be possible to restart the JVM via the
Management interface.
INFO 2002-10-21 18:52:10.669 [Phoenix.] (): Work directory does not
exist, attempting to create directory /opt/james-2.1a1-cvs/work.
FATAL_E 2002-10-21 18:52:10.702 [Phoenix ] (): There was a fatal error
while starting Embeddor.
java.lang.NullPointerException
at java.lang.String.trim(String.java:1884)
at
org.apache.avalon.framework.configuration.AbstractConfiguration.getValue
AsInteger(AbstractConfiguration.java:46)
at
org.apache.avalon.framework.configuration.AbstractConfiguration.getValue
AsInteger(AbstractConfiguration.java:87)
at
org.apache.avalon.phoenix.components.manager.MX4JSystemManager.configure
(MX4JSystemManager.java:63)
at
org.apache.avalon.framework.container.ContainerUtil.configure(ContainerU
til.java:192)
at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.setupCompo
nent(DefaultEmbeddor.java:530)
at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.setupCompo
nents(DefaultEmbeddor.java:507)
This exception trace starts with a NPE, to a standard call to
getValueAsInteger on an AbstractConfiguration subclass. Tracing the
code in AbstractConfiguration we see something that looks like:
String value = getValue().trim();
Which will obviously produce an exception if getValue() is null. All
good so far.
Now, getValue() should, according to the implementation of
DefaultConfiguration, throw a ConfigurationException if the value to be
returned is null. Because of the code in AbstractConfiguration, this
seems to be a requirement for subclasses of AbstractConfiguration, lest
you generate NPEs.
Ok, here's the baffling part - is there another subclass of
AbstractConfiguration being used? I can't find one - the only one in
use seems to be DefaultConfiguration. But DefaultConfiguration throws a
ConfigurationException upon encountering a null value. So there
certainly shouldn't be an NPE.
Here's more of the baffling part - I don't see this problem when I start
the server on Windows. So on Windows there is no NPE, while on Linux we
see a seemingly impossible NPE. Any thoughts? Anyone who knows the
internals of Phoenix wish to comment (Peter D., perhaps)?
--Peter
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>