NPE while marshalling an object

Stephen.CTR.Chappell at faa.gov Stephen.CTR.Chappell at faa.gov
Thu Jun 18 10:28:53 EDT 2015


No, I'm sorry I wasn't clear, it is a web service, and there is no main. I meant that this was the primary implementing class for my web service; which isn't really entirely accurate either, I was working two similar issues at once and cited the wrong one. Sorry about that. But it looks like I may have solved this issue (and possibly created others, but that is another story) - my project also uses CXF and WSS4J, and it looks like the WSS4J initialization code doesn't properly initialize everything in OpenSAML, particularly the parser pools. They've put a fix in their bootstrapping code, which for the moment I've cribbed and stuck in my own code; that's gotten me past the immediate issue.

I'll look at adding the -impl dependencies as well; it wasn't really clear how everything was broken up, and what I would really need to include. I try to run a bit lean if I can; just sucking in everything seemed a bit excessive.

Stephen W. Chappell

From: dev [mailto:dev-bounces at shibboleth.net] On Behalf Of Brent Putman
Sent: Thursday, June 18, 2015 10:14 AM
To: dev at shibboleth.net
Subject: Re: NPE while marshalling an object


On 6/18/15 7:59 AM, Stephen.CTR.Chappell at faa.gov<mailto: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/5d897f74/attachment.html>


More information about the dev mailing list