You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apps-dev@avalon.apache.org by "Peter M. Goldstein" <pe...@yahoo.com> on 2002/10/22 01:31:23 UTC

Baffling Exception

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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Baffling Exception

Posted by "Peter M. Goldstein" <pe...@yahoo.com>.

> Okay - still can't reproduce it. What version of Linux are you ising.
I am
> testing on Mandrake 7.x with kernel 2.4.18-6mdksecure and using
libc-2.2.4
> 
> Theres quite a few problems with RH7.2 and some Sun JDKs. Would this
be
> the
> combo that causes the error?

O/S is RH 6.2 with up-to-date RPM installs.

--Peter





--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Baffling Exception

Posted by Peter Donald <pe...@apache.org>.
Hi,

On Tue, 22 Oct 2002 17:48, Peter M. Goldstein wrote:
> > > > > Version is Sun 1.3.0 on Linux.  What have people been using on
> > >
> > > Linux?
> > >
> > > > I use that version without a hitch.
> > >
> > > Bizarre.  We changed to IBM 1.3.1, and the problem went away.
> >
> > Okay will look into it. Before I do can you make sure that the ext
> > directory
> > does not have any jars in it that it shouldn't and that the phoenix
> > directory
> > is also clean (with no stray jars) and that the kernel.xml is
>
> unmodified
>
> > (or
> > if modified could you send it to me).
>
> Ext is clean, kernel.xml is unmodified.

Okay - still can't reproduce it. What version of Linux are you ising. I am 
testing on Mandrake 7.x with kernel 2.4.18-6mdksecure and using libc-2.2.4

Theres quite a few problems with RH7.2 and some Sun JDKs. Would this be the 
combo that causes the error?

-- 
Cheers,

Peter Donald
------------------------------------------------------------
 militant agnostic: i don't know, and you don't know either.
------------------------------------------------------------ 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Baffling Exception

Posted by "Peter M. Goldstein" <pe...@yahoo.com>.
Peter,

> > > > Version is Sun 1.3.0 on Linux.  What have people been using on
> >
> > Linux?
> >
> > > I use that version without a hitch.
> >
> > Bizarre.  We changed to IBM 1.3.1, and the problem went away.
> 
> Okay will look into it. Before I do can you make sure that the ext
> directory
> does not have any jars in it that it shouldn't and that the phoenix
> directory
> is also clean (with no stray jars) and that the kernel.xml is
unmodified
> (or
> if modified could you send it to me).

Ext is clean, kernel.xml is unmodified.

--Peter



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Baffling Exception

Posted by Peter Donald <pe...@apache.org>.
On Tue, 22 Oct 2002 14:44, Peter M. Goldstein wrote:
> Peter,
>
> > > Version is Sun 1.3.0 on Linux.  What have people been using on
>
> Linux?
>
> > I use that version without a hitch.
>
> Bizarre.  We changed to IBM 1.3.1, and the problem went away.

Okay will look into it. Before I do can you make sure that the ext directory 
does not have any jars in it that it shouldn't and that the phoenix directory 
is also clean (with no stray jars) and that the kernel.xml is unmodified (or 
if modified could you send it to me).

-- 
Cheers,

Peter Donald
Einstein argued that there must be simplified explanations of nature, because
God is not capricious or arbitrary.  No such faith comforts the software
engineer.
- Fred Brooks, Jr.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Baffling Exception

Posted by "Peter M. Goldstein" <pe...@yahoo.com>.
Peter,

> > Version is Sun 1.3.0 on Linux.  What have people been using on
Linux?
> 
> I use that version without a hitch.

Bizarre.  We changed to IBM 1.3.1, and the problem went away.

--Peter



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Baffling Exception

Posted by Peter Donald <pe...@apache.org>.
On Tue, 22 Oct 2002 13:05, Peter M. Goldstein wrote:
> Version is Sun 1.3.0 on Linux.  What have people been using on Linux?

I use that version without a hitch. 

-- 
Cheers,

Peter Donald
------------------------------------------------
 "No. Try not. Do. Or do not. There is no try." 
                                     -- Yoda 
------------------------------------------------ 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Baffling Exception

Posted by "Peter M. Goldstein" <pe...@yahoo.com>.

All,

> >> What JDK on Linux?
> >
> > Will check.  Noel is gone for a couple more hours.  I'll post after
he
> > gets back.  Is there a known JVM issue?
> 
> I don't know of any documented ones... but I had troubles with IBM's
> JDK with Tomcat and Phoenix that I didn't have with Sun's (this was
all
> 1.3.1). Since Sun's didn't work I didn't investigate further (and this
> was over a year ago too).

Version is Sun 1.3.0 on Linux.  What have people been using on Linux?

--Peter



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Baffling Exception

Posted by Peter Royal <pr...@apache.org>.
On Monday, October 21, 2002, at 07:37  PM, Peter M. Goldstein wrote:
>> What JDK on Linux?
>
> Will check.  Noel is gone for a couple more hours.  I'll post after he
> gets back.  Is there a known JVM issue?

I don't know of any documented ones... but I had troubles with IBM's 
JDK with Tomcat and Phoenix that I didn't have with Sun's (this was all 
1.3.1). Since Sun's didn't work I didn't investigate further (and this 
was over a year ago too).
-pete

-- 
peter royal -> proyal@apache.org


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Baffling Exception

Posted by "Peter M. Goldstein" <pe...@yahoo.com>.
> What JDK on Linux?

Will check.  Noel is gone for a couple more hours.  I'll post after he
gets back.  Is there a known JVM issue?

--Peter




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Baffling Exception

Posted by Peter Royal <pr...@apache.org>.
On Monday, October 21, 2002, at 07:31  PM, Peter M. Goldstein wrote:
> 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)?

What JDK on Linux?
-pete

-- 
peter royal -> proyal@apache.org


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>