You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by geecxf <am...@ge.com> on 2013/03/13 01:55:11 UTC

SamlHeaderInHandler exception

Strangely (or maybe not strangely) the SamlHeaderInHandler that is working
perfectly when hosted on an OSGI container on my mac running OS X Mountain
Lion is throwing an exception when running in windows. Everything is
identical except, of course, the JVM. Furthermore the exception is a bit
obtuse. I would appreciate it if someone could help me make sense of it.
Here it is:

2013-03-12
16:14:26,348[qtp1588543918-62]|WARN|org.apache.cxf.jaxrs.impl.WebApplicationExceptionMapper|173-org.apache.cxf.cxf-rt-frontend-jaxrs-2.7.2|javax.ws.rs.NotAuthorizedException:
java.lang.NullPointerException
                at
org.apache.cxf.rs.security.saml.AbstractSamlInHandler.throwFault(AbstractSamlInHandler.java:161)
                at
org.apache.cxf.rs.security.saml.AbstractSamlInHandler.validateToken(AbstractSamlInHandler.java:127)
                at
org.apache.cxf.rs.security.saml.AbstractSamlInHandler.validateToken(AbstractSamlInHandler.java:91)
                at
org.apache.cxf.rs.security.saml.AbstractSamlBase64InHandler.handleToken(AbstractSamlBase64InHandler.java:53)
                at
org.apache.cxf.rs.security.saml.SamlHeaderInHandler.handleRequest(SamlHeaderInHandler.java:51)
                at
org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processRequest(JAXRSInInterceptor.java:190)
                at
org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessage(JAXRSInInterceptor.java:97)
                at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
                at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
                at
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:355)
                at
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:319)
                at
org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:72)
                at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1040)
                at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:976)
                at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
                at
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
                at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
                at org.eclipse.jetty.server.Server.handle(Server.java:363)
                at
org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:483)
                at
org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:920)
                at
org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:982)
                at
org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:635)
                at
org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
                at
org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
                at
org.eclipse.jetty.io.nio.SslConnection.handle(SslConnection.java:196)
                at
org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:627)
                at
org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:51)
                at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
                at
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
                at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.NullPointerException
                at java.util.Arrays$ArrayList.<init>(Arrays.java:2842)
                at java.util.Arrays.asList(Arrays.java:2828)
                at
com.sun.org.apache.xerces.internal.util.ParserConfigurationSettings.addRecognizedFeatures(ParserConfigurationSettings.java:115)
                at
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.<init>(DocumentBuilderImpl.java:182)
                at
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(DocumentBuilderFactoryImpl.java:76)
                at
org.opensaml.xml.parse.BasicParserPool.createBuilder(BasicParserPool.java:572)
                at
org.opensaml.xml.parse.BasicParserPool.getBuilder(BasicParserPool.java:161)
                at
org.opensaml.xml.parse.BasicParserPool.parse(BasicParserPool.java:213)
                at
org.opensaml.xml.XMLConfigurator.load(XMLConfigurator.java:141)
                at
org.apache.ws.security.saml.ext.OpenSAMLBootstrap.initializeXMLTooling(OpenSAMLBootstrap.java:99)
                at
org.apache.ws.security.saml.ext.OpenSAMLBootstrap.bootstrap(OpenSAMLBootstrap.java:80)
                at
org.apache.ws.security.saml.ext.OpenSAMLUtil.initSamlEngine(OpenSAMLUtil.java:61)
                at
org.apache.ws.security.saml.ext.AssertionWrapper.<init>(AssertionWrapper.java:155)
                at
org.apache.cxf.rs.security.saml.AbstractSamlInHandler.validateToken(AbstractSamlInHandler.java:97)
                ... 28 more




--
View this message in context: http://cxf.547215.n5.nabble.com/SamlHeaderInHandler-exception-tp5724483.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: SamlHeaderInHandler exception

Posted by Colm O hEigeartaigh <co...@apache.org>.
What JDK are you using? Some googling throws up some related bugs in the
JDK...perhaps try a more recent version?

http://bugs.sun.com/view_bug.do?bug_id=7131589
http://netbeans.org/bugzilla/show_bug.cgi?id=223258

Colm.

On Wed, Mar 13, 2013 at 12:55 AM, geecxf <am...@ge.com> wrote:

> Strangely (or maybe not strangely) the SamlHeaderInHandler that is working
> perfectly when hosted on an OSGI container on my mac running OS X Mountain
> Lion is throwing an exception when running in windows. Everything is
> identical except, of course, the JVM. Furthermore the exception is a bit
> obtuse. I would appreciate it if someone could help me make sense of it.
> Here it is:
>
> 2013-03-12
>
> 16:14:26,348[qtp1588543918-62]|WARN|org.apache.cxf.jaxrs.impl.WebApplicationExceptionMapper|173-org.apache.cxf.cxf-rt-frontend-jaxrs-2.7.2|javax.ws.rs.NotAuthorizedException:
> java.lang.NullPointerException
>                 at
>
> org.apache.cxf.rs.security.saml.AbstractSamlInHandler.throwFault(AbstractSamlInHandler.java:161)
>                 at
>
> org.apache.cxf.rs.security.saml.AbstractSamlInHandler.validateToken(AbstractSamlInHandler.java:127)
>                 at
>
> org.apache.cxf.rs.security.saml.AbstractSamlInHandler.validateToken(AbstractSamlInHandler.java:91)
>                 at
>
> org.apache.cxf.rs.security.saml.AbstractSamlBase64InHandler.handleToken(AbstractSamlBase64InHandler.java:53)
>                 at
>
> org.apache.cxf.rs.security.saml.SamlHeaderInHandler.handleRequest(SamlHeaderInHandler.java:51)
>                 at
>
> org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processRequest(JAXRSInInterceptor.java:190)
>                 at
>
> org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessage(JAXRSInInterceptor.java:97)
>                 at
>
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271)
>                 at
>
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
>                 at
>
> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:355)
>                 at
>
> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:319)
>                 at
>
> org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:72)
>                 at
>
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1040)
>                 at
>
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:976)
>                 at
>
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
>                 at
>
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
>                 at
>
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
>                 at org.eclipse.jetty.server.Server.handle(Server.java:363)
>                 at
>
> org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:483)
>                 at
>
> org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:920)
>                 at
>
> org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:982)
>                 at
> org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:635)
>                 at
> org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
>                 at
>
> org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
>                 at
> org.eclipse.jetty.io.nio.SslConnection.handle(SslConnection.java:196)
>                 at
>
> org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:627)
>                 at
>
> org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:51)
>                 at
>
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
>                 at
>
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
>                 at java.lang.Thread.run(Thread.java:722)
> Caused by: java.lang.NullPointerException
>                 at java.util.Arrays$ArrayList.<init>(Arrays.java:2842)
>                 at java.util.Arrays.asList(Arrays.java:2828)
>                 at
>
> com.sun.org.apache.xerces.internal.util.ParserConfigurationSettings.addRecognizedFeatures(ParserConfigurationSettings.java:115)
>                 at
>
> com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.<init>(DocumentBuilderImpl.java:182)
>                 at
>
> com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(DocumentBuilderFactoryImpl.java:76)
>                 at
>
> org.opensaml.xml.parse.BasicParserPool.createBuilder(BasicParserPool.java:572)
>                 at
> org.opensaml.xml.parse.BasicParserPool.getBuilder(BasicParserPool.java:161)
>                 at
> org.opensaml.xml.parse.BasicParserPool.parse(BasicParserPool.java:213)
>                 at
> org.opensaml.xml.XMLConfigurator.load(XMLConfigurator.java:141)
>                 at
>
> org.apache.ws.security.saml.ext.OpenSAMLBootstrap.initializeXMLTooling(OpenSAMLBootstrap.java:99)
>                 at
>
> org.apache.ws.security.saml.ext.OpenSAMLBootstrap.bootstrap(OpenSAMLBootstrap.java:80)
>                 at
>
> org.apache.ws.security.saml.ext.OpenSAMLUtil.initSamlEngine(OpenSAMLUtil.java:61)
>                 at
>
> org.apache.ws.security.saml.ext.AssertionWrapper.<init>(AssertionWrapper.java:155)
>                 at
>
> org.apache.cxf.rs.security.saml.AbstractSamlInHandler.validateToken(AbstractSamlInHandler.java:97)
>                 ... 28 more
>
>
>
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/SamlHeaderInHandler-exception-tp5724483.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>



-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com