<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p><br>
</p>
<br>
<div class="moz-cite-prefix">On 5/23/17 12:17 PM, Rob Audenaerde
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAPz8bx1Uk8LKLzcP2VBXczHhte2TruDX0poMegzb_LQYU+tW6w@mail.gmail.com">
<div dir="ltr"><br>
<div>Actually, I already tried setting an ID just before
initialize(). It gave me an exception which was ultimately
caused by:</div>
</div>
</blockquote>
<br>
Well, that's not what was giving you the exception. You do
definitely need to set that ID. That has just allowed the code to
proceed past that point, leading you to another issue...<br>
<br>
<blockquote type="cite"
cite="mid:CAPz8bx1Uk8LKLzcP2VBXczHhte2TruDX0poMegzb_LQYU+tW6w@mail.gmail.com">
<div dir="ltr"><br>
<div><br>
<div>Caused by:
net.shibboleth.utilities.java.support.component.UninitializedComponentException:
Component has not yet been initialized and cannot be used.</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>at
net.shibboleth.utilities.java.support.component.ComponentSupport.ifNotInitializedThrowUninitializedComponentException(ComponentSupport.java:111)</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>at
net.shibboleth.utilities.java.support.xml.BasicParserPool.checkInitializedNotDestroyed(BasicParserPool.java:643)</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>at
net.shibboleth.utilities.java.support.xml.BasicParserPool.parse(BasicParserPool.java:237)</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>at
org.opensaml.saml.metadata.resolver.impl.AbstractMetadataResolver.unmarshallMetadata(AbstractMetadataResolver.java:341)</div>
<div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>...
7 more</div>
</div>
<div><br>
</div>
</div>
</blockquote>
<br>
As you can see, that's originally being thrown by the
BasicParserPool. That also needs to be initialize()-ed before it
can be used.<br>
<br>
Generally, you don't want to new() a new parser pool every time you
need one. You create 1 instance (and initialize() it), and reuse
it. If you were using dependency injection/IoC, you'd just wire 1
instance up and inject it where needed. If you aren't using that
development style, and don't have any special requirements for the
parser pool, then you can just use the global instance that exists
after InitializationService.initialize() is called. It will be
available from
org.opensaml.core.xml.config.XMLObjectProviderRegistrySupport.getParserPool().<br>
<br>
<br>
<br>
<br>
</body>
</html>