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.

Reply via email to