Thanks Brent. What I am trying to do is a simple unit test case:<br>1) Create an SP metadata file with signature.<br>2) Load the metadata and validate couple things including the signature.<br><br>Attached is the metadata file I created. When I try to validate it, I got the exception.<br clear="all">

<br>I have been using createSAMLObject in a lot of places, here is the code:<br><br>public static &lt;T&gt; T createSAMLObject( final Class&lt;T&gt; classVar )<br>    {<br>        XMLObjectBuilderFactory builderFactory = Configuration.getBuilderFactory();  <br>

<br>        QName defaultElementName;<br><br>        T object = null;<br>        try<br>        {<br>            defaultElementName = (QName)classVar.getDeclaredField( &quot;DEFAULT_ELEMENT_NAME&quot; ).get( null );<br><br>

            object = (T)builderFactory.getBuilder(defaultElementName).buildObject( defaultElementName );  <br><br>        }<br>        catch ( Exception e )<br>        {<br>            // TODO Add log to show the error when trying to get DEFAULT_ELEMENT_NAME<br>

            e.printStackTrace();<br>        }<br><br>        return object;<br>    } <br><br><br clear="all">Yaowen<br>
<br><br><div class="gmail_quote">On Wed, Oct 31, 2012 at 3:47 PM, Brent Putman <span dir="ltr">&lt;<a href="mailto:putmanb@georgetown.edu" target="_blank">putmanb@georgetown.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im"><br>
On 10/31/12 5:37 PM, Yaowen Tu wrote:<br>
&gt;<br>
</div><div class="im">&gt;         Signature signature = createSAMLObject( Signature.class );//a<br>
&gt; wrapper to create a saml object easier.<br>
<br>
<br>
</div>This is suspicious.  I don&#39;t know what you&#39;re doing there, but that<br>
might be related to your problem.  You should use a builder to create<br>
the Signature object and I don&#39;t know how you&#39;re doing that based on a<br>
class literal.  A QName would make sense, but not a Signature.class literal.<br>
<div class="HOEnZb"><div class="h5">--<br>
To unsubscribe from this list send an email to <a href="mailto:dev-unsubscribe@shibboleth.net">dev-unsubscribe@shibboleth.net</a><br>
</div></div></blockquote></div><br>