You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by Richard Rowell <ri...@bowmansystems.com> on 2002/10/01 17:45:18 UTC

Re: Null pointer exceptions

On Wed, 2002-09-25 at 12:48, Joseph Kesselman wrote:
> On Wednesday, 09/25/2002 at 09:02 EST, Richard Rowell 
> <ri...@bowmansystems.com> wrote:
> > Just an update.. It seems that the null pointer exception was in my
> > code, and for some reason java was reporting it as coming from Xalan.
> 
> Generally that sort of thing happens when you've got SAX code being driven 
> by Xalan's output, so its exception gets thrown back to/through Xalan. You 
> can get a bit more useful detail about what actually happened by 
> "unwrapping" the exception thrown by Xalan in turn; take a look at how we 
> implemented the -EDUMP switch in Process.java.

I took your advice and looked in Process.java.  I ripped out the
following bit. I have created a new NullPointer bug apparently, but
despite the copied code I'm still getting the NullPointer exception from
Xalan not my code.  Can anyone tell me what I'm doing wrong?

catch( Throwable throwable)
{
    while ( throwable instanceof
org.apache.xml.utils.WrappedRuntimeException)
    {
	throwable = ((org.apache.xml.utils.WrappedRuntimeException)
throwable).getException();
    }
           System.out.println( throwable.toString() );
           throwable.printStackTrace();
}