Hi,

Could you please append a working testcase which I can reproduce this problem? Also the testcase is very helpful to verify the fix if this is a real bug.

From my first glance this is caused by our opensaml bundle didn't include the necessary conf file.
But I do need your testcase.

Thanks
Freeman
On 2010-4-6, at 上午7:00, jbgill wrote:


Hi,

I'm trying to get SAML token handling working via the CXF WSS4JInInterceptor in my CXF OSGI bundle. (Using a recent SMX 4.1-SNAPSHOT build). It appears that the SAML token is being received by the interceptor, but I get the following exception trace when it tries to construct the OpenSAML assertion
object:

16:23:25,073 | WARN | 7...@qtp-5531913-0 | PhaseInterceptorChain |
ache.cxf.common.logging.LogUtils  361 | Interceptor for
{http://cxf.examples.servicemix.apache.org/}HelloWorldImplService has thrown
exception, unwinding now
java.lang.NullPointerException
at java.util.Properties$LineReader.readLine(Properties.java: 418)
       at java.util.Properties.load0(Properties.java:337)
       at java.util.Properties.load(Properties.java:325)
       at org.opensaml.SAMLConfig.loadProperties(Unknown Source)
       at org.opensaml.SAMLConfig.<init>(Unknown Source)
       at org.opensaml.SAMLConfig.instance(Unknown Source)
       at org.opensaml.SAMLObject.<init>(Unknown Source)
       at org.opensaml.SAMLSignedObject.<init>(Unknown Source)
       at org.opensaml.SAMLAssertion.<init>(Unknown Source)
       at
org .apache .ws .security .processor .SAMLTokenProcessor.handleSAMLToken(SAMLTokenProcessor.java:68)
       at
org .apache .ws .security .processor.SAMLTokenProcessor.handleToken(SAMLTokenProcessor.java:53)
       at
org .apache .ws .security .WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:326)
       at
org .apache .ws .security .WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:243)
       at
org .apache .cxf .ws .security .wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:199)
       at
org .apache .cxf .ws .security .wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:78)
       at
org .apache .cxf .phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java: 243)
       at
org .apache .cxf .transport .ChainInitiationObserver.onMessage(ChainInitiationObserver.java:109)
       at
org .apache .cxf .transport.http_osgi.OsgiDestination.doMessage(OsgiDestination.java: 79)
       at
org .apache .cxf .transport .http_osgi .OsgiServletController.invokeDestination(OsgiServletController.java: 327)
       at
org .apache .cxf .transport .http_osgi.OsgiServletController.invoke(OsgiServletController.java: 151)
       at
org .apache.cxf.transport.http_osgi.OsgiServlet.invoke(OsgiServlet.java: 53)
       at
org .apache .cxf .transport.http_osgi.SpringOsgiServlet.invoke(SpringOsgiServlet.java: 48)
       at
org .apache .cxf .transport .servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java: 179)
       at
org .apache .cxf .transport .servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:103)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)

Looking at OpenSAML 1.1 source, SAMLConfig.class is trying to load
conf/opensaml.properties with the following stream:

     this.getClass().getResourceAsStream("/conf/opensaml.properties")

However, it appears that the opensaml bundle jar in servicemix does not
contain this file where other distributions of the opensaml-1.1.jar DO
contain this file. I've tried adding my own conf/ opensaml.properties, but
it still can't seem to find it.

Is this a bug, or am I doing something wrong?

Thanks,
JB
--
View this message in context: 
http://old.nabble.com/SMX-4%3A--OpenSAML-bundle-missing-opensaml.properties-file--tp28145776p28145776.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.



--
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com

Reply via email to