NPE while marshalling an object

Brent Putman putmanb at georgetown.edu
Thu Jun 18 10:13:58 EDT 2015



On 6/18/15 7:59 AM, Stephen.CTR.Chappell at faa.gov wrote:
>
> InitializationService.initialize() is being called in the constructor
> of my service’s main class; the marshalling code is called from a
> method in the class. I don’t have any weird or non-standard
> classloading anywhere, so I’m pretty sure it is not an
> order-of-operations thing.
>

Ok, since you mention a main() class, I assume this isn't a webapp, and
so is a simple, flat classloader hierarchy.


>  
>
> What I do think it could be is that I’m missing dependencies. In v2,
> I only needed a single opensaml dependency in my pom file. Is the
> same true in v3? I had only opensaml-core listed, and have just added
> opensaml-xmlsec-api, opensaml-profile-api, opensaml-security-api,
> opensaml-storage-api, and opensaml-saml-api, but I’m still having the
> same issue. Did I miss a library?
>


Yes, you definitely need to add the corresponding -impl modules.  For
SAML and the other schemas (XML Signature, Encryption, etc) that's
where all the object provider impls are located.  You can't do much
SAML without those.

That begs the question: It seems like you were trying to marshall an
Assertion, and I don't see how you could actually an actual instance
(as opposed to a null reference to the Assertion inteface) without e.g.
opensaml-saml-impl.


> Or am I going up the wrong tree here?
>
>

If you don't have any -impls, that would definitely be a problem. 
However, I'm not immediately connecting that to the error you
reported.  The global ParserPool is inited as a part of opensaml-core,
so that should be there with just opensaml-core as a dependency.  But
maybe it's a non-obvious issue.  Try adding the -impl's as deps and see
how far that gets you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/dev/attachments/20150618/7c1f5c7f/attachment-0001.html>


More information about the dev mailing list