Why would ConfigurationService.get(XMLObjectProviderRegistry.class) return null ?
Brent Putman
putmanb at georgetown.edu
Mon Mar 9 17:04:41 EDT 2015
On 3/9/15 3:16 PM, Tom Zeller wrote:
> Happened to notice that
> net.shibboleth.idp.saml.session.SAML2SPSessionTest throws an NPE for
> me from Eclipse or via Maven on the command line in a clean dev
> environment. Probably PEBKAC as Rod would say. Obviously tests pass on
> Jenkins. It looks like XMLObjectProviderRegistry getProviderRegistry()
> which calls ConfigurationService.get(XMLObjectProviderRegistry.class)
> returns null, what do I need to do to fix this ? Is there a missing
> runtime dependency or something ?
Nothing is being done in the test to ensure that OpenSAML is
initialized. If you run the test alone, it's absolutely always going to
fail. If you run it as part of many tests in a suite, then it may or
may not succeed depending on whether some other test has previously run
that inited OpenSAML.
The best way to fix is to just have it extend OpenSAMLInitBaseTestCase,
which is just a simple base class with a @BeforeSuite that inits OpenSAML.
This is in general a requirement for any test that needs OpenSAML to be
initialized before it can run.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://shibboleth.net/pipermail/dev/attachments/20150309/3744d488/attachment-0001.html
More information about the dev
mailing list