OpenSAML3.3 Correct way to read (adfs) FederationService.xml?
Brent Putman
putmanb at georgetown.edu
Tue May 23 12:27:20 EDT 2017
On 5/23/17 12:17 PM, Rob Audenaerde wrote:
>
> Actually, I already tried setting an ID just before initialize(). It
> gave me an exception which was ultimately caused by:
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...
>
>
> Caused by:
> net.shibboleth.utilities.java.support.component.UninitializedComponentException:
> Component has not yet been initialized and cannot be used.
> at
> net.shibboleth.utilities.java.support.component.ComponentSupport.ifNotInitializedThrowUninitializedComponentException(ComponentSupport.java:111)
> at
> net.shibboleth.utilities.java.support.xml.BasicParserPool.checkInitializedNotDestroyed(BasicParserPool.java:643)
> at
> net.shibboleth.utilities.java.support.xml.BasicParserPool.parse(BasicParserPool.java:237)
> at
> org.opensaml.saml.metadata.resolver.impl.AbstractMetadataResolver.unmarshallMetadata(AbstractMetadataResolver.java:341)
> ... 7 more
>
As you can see, that's originally being thrown by the BasicParserPool.
That also needs to be initialize()-ed before it can be used.
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().
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/dev/attachments/20170523/cf2a90fd/attachment.html>
More information about the dev
mailing list