Skip to Content.
Sympa Menu

mace-opensaml-users - Re: NullPointerException in SAMLAssertion

Subject: OpenSAML user discussion

List archive

Re: NullPointerException in SAMLAssertion


Chronological Thread 
  • From: W Strater <>
  • To: Scott Cantor <>,
  • Subject: Re: NullPointerException in SAMLAssertion
  • Date: Mon, 27 Feb 2006 15:28:24 -0800 (PST)
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=HpdanSKu2h8X4Pr1W89d8yb8lwNUoVz2IbnCs1TYHa53SXLu1KsnzTPgFEQrrp5GZxKscYNH5DyQLe6lG1PP/35cDEOWO8+Eclk2s2iUG/Ihb39ZQInBYxYAGTXM+xwXGY1GUoE17P7BCdLfe4Fh0Q2KnQ6xT/iy9sYatE2vESE= ;

I do have xerces in the endorsed directory but believe that my problem stems from the MessageFactory that I use to create the SOAPMessage. I need to do some more research on other options creating the message so I can avoid the problem. Of course there is the simple solution of not logging the Assertion but this is just avoiding the problem and not fixing it.

Thanks, Wes.

----- Original Message ----
From: Scott Cantor <>
To: W Strater <>;
Sent: Sunday, February 26, 2006 10:19:52 PM
Subject: RE: NullPointerException in SAMLAssertion

> I tried your suggestion but have yet been able to get it to
> work. I did find out where root was beeing set to null and
> causing the null pointer exception. The
> SAMLObject.toDOM(Document, boolean) method makes a call to
> Document.adoptNode. This method is returning null and so root
> is set to null.

That was my suspicion, I couldn't see any other way for it to be set to
null. That's a very interesting result. The 2.0 code is definitely relying
on adoptNode, so if that method is broken, we'll have to bypass it.

Are you endorsing Xerces or using Sun's parser?

As far as your program, if you pass the same document that WSS4J is passing
and prime it, then there is no reason for adopt to ever be called. So if
calling toDOM doesn't fix it, then WSS4J must not be passing the same
document as the one you have access to from the SOAP envelope.

There is no other way to fix the code, as it assumes adoptNode works. It
would take a complete redesign to bypass it.

-- Scott




Archive powered by MHonArc 2.6.16.

Top of Page