You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by barnetti <ia...@lmco.com> on 2012/06/27 22:46:40 UTC

wss4j 1.6.6 and OpenSAML 2.5 null inputstream

I am using CXF 2.6.1 inside of Karaf 2.2.7.  I have configured the CXF STS,
and whenever I hit one of its endpoints I get the following error:

Caused by: java.lang.IllegalArgumentException: InputStream cannot be null
	at
javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:120)[:1.6.0_31]
	at
org.opensaml.xml.parse.BasicParserPool$DocumentBuilderProxy.parse(BasicParserPool.java:671)
	at org.opensaml.xml.parse.BasicParserPool.parse(BasicParserPool.java:215)
	at
org.opensaml.xml.XMLConfigurator.load(XMLConfigurator.java:141)[143:org.apache.servicemix.bundles.opensaml:2.5.1.2]
	at
org.opensaml.DefaultBootstrap.initializeXMLTooling(DefaultBootstrap.java:199)[143:org.apache.servicemix.bundles.opensaml:2.5.1.2]
	at
org.apache.ws.security.saml.ext.OpenSAMLBootstrap.bootstrap(OpenSAMLBootstrap.java:77)[149:org.apache.ws.security.wss4j:1.6.6]
	at
org.apache.ws.security.saml.ext.OpenSAMLUtil.initSamlEngine(OpenSAMLUtil.java:61)[149:org.apache.ws.security.wss4j:1.6.6]
	at
org.apache.ws.security.saml.ext.AssertionWrapper.<init>(AssertionWrapper.java:214)[149:org.apache.ws.security.wss4j:1.6.6]
	at
org.apache.cxf.sts.token.provider.SAMLTokenProvider.createSamlToken(SAMLTokenProvider.java:328)[234:org.apache.cxf.services.sts.core:2.6.1]
	at
org.apache.cxf.sts.token.provider.SAMLTokenProvider.createToken(SAMLTokenProvider.java:126)[234:org.apache.cxf.services.sts.core:2.6.1]
	... 58 more

The wss4j 1.6.6 bundle contains saml2-xacml2-profile.xml at the jar's root
level.  When the STS endpoints are invoked, eventually wss4j gets called. 
This, in turn, calls the OpenSAML Bootstrap class which loads the
saml2-xacml2-profile.xml.  Eventually the wss4j calls into OpenSAML's
DefaultBootstrap.  The DefaultBootstrap then tries to load the
saml2-xacml2-profile.xml, but since that XML file is in the wss4j jar, it
cannot find it when trying to do getResourceAsStream.  

Am I missing some import or export in my Manifest, or is there a workaround
or fix for this?  Currently, to work around this we created a fragment
bundle which attaches itself to the Apache ServiceMix OpenSAML 2.5.1.2
bundle adding that xml file.  

Thanks for the help.  


--
View this message in context: http://cxf.547215.n5.nabble.com/wss4j-1-6-6-and-OpenSAML-2-5-null-inputstream-tp5710381.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: wss4j 1.6.6 and OpenSAML 2.5 null inputstream

Posted by barnetti <ia...@lmco.com>.
Thanks Dan.  I will do that.

--
View this message in context: http://cxf.547215.n5.nabble.com/wss4j-1-6-6-and-OpenSAML-2-5-null-inputstream-tp5710381p5710385.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: wss4j 1.6.6 and OpenSAML 2.5 null inputstream

Posted by Daniel Kulp <dk...@apache.org>.
We discovered this and fixed this earlier this week.  The only workaround 
right now is to grab the 1.6.7-SNAPSHOT of wss4j.  :-(

Dan


On Wednesday, June 27, 2012 01:46:40 PM barnetti wrote:
> I am using CXF 2.6.1 inside of Karaf 2.2.7.  I have configured the CXF
> STS, and whenever I hit one of its endpoints I get the following error:
> 
> Caused by: java.lang.IllegalArgumentException: InputStream cannot be null
> 	at
> javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:120)[:1.6.0_3
> 1] at
> org.opensaml.xml.parse.BasicParserPool$DocumentBuilderProxy.parse(BasicPar
> serPool.java:671) at
> org.opensaml.xml.parse.BasicParserPool.parse(BasicParserPool.java:215) at
> org.opensaml.xml.XMLConfigurator.load(XMLConfigurator.java:141)[143:org.ap
> ache.servicemix.bundles.opensaml:2.5.1.2] at
> org.opensaml.DefaultBootstrap.initializeXMLTooling(DefaultBootstrap.java:1
> 99)[143:org.apache.servicemix.bundles.opensaml:2.5.1.2] at
> org.apache.ws.security.saml.ext.OpenSAMLBootstrap.bootstrap(OpenSAMLBootst
> rap.java:77)[149:org.apache.ws.security.wss4j:1.6.6] at
> org.apache.ws.security.saml.ext.OpenSAMLUtil.initSamlEngine(OpenSAMLUtil.j
> ava:61)[149:org.apache.ws.security.wss4j:1.6.6] at
> org.apache.ws.security.saml.ext.AssertionWrapper.<init>(AssertionWrapper.j
> ava:214)[149:org.apache.ws.security.wss4j:1.6.6] at
> org.apache.cxf.sts.token.provider.SAMLTokenProvider.createSamlToken(SAMLTo
> kenProvider.java:328)[234:org.apache.cxf.services.sts.core:2.6.1] at
> org.apache.cxf.sts.token.provider.SAMLTokenProvider.createToken(SAMLTokenP
> rovider.java:126)[234:org.apache.cxf.services.sts.core:2.6.1] ... 58 more
> 
> The wss4j 1.6.6 bundle contains saml2-xacml2-profile.xml at the jar's root
> level.  When the STS endpoints are invoked, eventually wss4j gets called.
> This, in turn, calls the OpenSAML Bootstrap class which loads the
> saml2-xacml2-profile.xml.  Eventually the wss4j calls into OpenSAML's
> DefaultBootstrap.  The DefaultBootstrap then tries to load the
> saml2-xacml2-profile.xml, but since that XML file is in the wss4j jar, it
> cannot find it when trying to do getResourceAsStream.
> 
> Am I missing some import or export in my Manifest, or is there a
> workaround or fix for this?  Currently, to work around this we created a
> fragment bundle which attaches itself to the Apache ServiceMix OpenSAML
> 2.5.1.2 bundle adding that xml file.
> 
> Thanks for the help.
> 
> 
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/wss4j-1-6-6-and-OpenSAML-2-5-null-inputst
> ream-tp5710381.html Sent from the cxf-user mailing list archive at
> Nabble.com.
-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com