You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by "Larry McCay (JIRA)" <ji...@apache.org> on 2016/01/30 21:00:41 UTC

[jira] [Created] (KNOX-660) Incompatible Dependencies in Pac4j Provider

Larry McCay created KNOX-660:
--------------------------------

             Summary: Incompatible Dependencies in Pac4j Provider
                 Key: KNOX-660
                 URL: https://issues.apache.org/jira/browse/KNOX-660
             Project: Apache Knox
          Issue Type: Bug
          Components: Server
            Reporter: Larry McCay
            Assignee: Larry McCay
            Priority: Blocker
             Fix For: 0.8.0


>From pac4j github pull request - https://github.com/pac4j/pac4j/pull/445:

"xmltooling is a part of OpenSAML v2, and is incompatible with OpenSAML v3 (see: https://issues.shibboleth.net/jira/browse/OSJ-152). It appears that it worked fine for most users in the demo projects, because the classloader order happened to place xmltooling after the other opensaml libraries (such as opensaml-core), causing the correct default-config.xml to be loaded, instead of the xmltooling version of the same file.

The xmltooling library is only used in the pac4j-saml module for a convenience method, which is also implemented in the OpenSAML v3 java-tooling library. This change replaces the call with that newer method, and also removes the xmltooling dependency from the pom.

This change resolves #444."

>From SSO testing with Ambari 2.2 on centos 6.4:

"2016-01-30 17:05:19,411 ERROR hadoop.gateway (GatewayServlet.java:service(126)) - Gateway processing failed: javax.servlet.ServletException: java.lang.NullPointerException
javax.servlet.ServletException: java.lang.NullPointerException
        at org.apache.hadoop.gateway.filter.AbstractGatewayFilter.doFilter(AbstractGatewayFilter.java:70)
        at org.apache.hadoop.gateway.GatewayFilter$Holder.doFilter(GatewayFilter.java:322)
        at org.apache.hadoop.gateway.GatewayFilter$Chain.doFilter(GatewayFilter.java:222)
        at org.apache.hadoop.gateway.GatewayFilter.doFilter(GatewayFilter.java:129)
        at org.apache.hadoop.gateway.GatewayServlet.service(GatewayServlet.java:121)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
        at org.eclipse.jetty.server.Server.handle(Server.java:370)
        at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
        at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:971)
        at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1033)
        at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644)
        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:667)
        at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
        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:745)
Caused by: java.lang.ExceptionInInitializerError
        at org.pac4j.saml.client.SAML2Client.<clinit>(SAML2Client.java:104)
        at org.pac4j.config.client.PropertiesConfigFactory.tryCreateSaml2Client(PropertiesConfigFactory.java:146)
        at org.pac4j.config.client.PropertiesConfigFactory.build(PropertiesConfigFactory.java:93)
        at org.apache.hadoop.gateway.pac4j.filter.Pac4jDispatcherFilter.init(Pac4jDispatcherFilter.java:139)
        at org.apache.hadoop.gateway.GatewayFilter$Holder.getInstance(GatewayFilter.java:352)
        at org.apache.hadoop.gateway.GatewayFilter$Holder.doFilter(GatewayFilter.java:321)
        at org.apache.hadoop.gateway.GatewayFilter$Chain.doFilter(GatewayFilter.java:222)
        at org.apache.hadoop.gateway.filter.XForwardedHeaderFilter.doFilter(XForwardedHeaderFilter.java:30)
        at org.apache.hadoop.gateway.filter.AbstractGatewayFilter.doFilter(AbstractGatewayFilter.java:61)
        ... 34 more
Caused by: java.lang.ClassCastException: org.opensaml.xml.schema.impl.XSAnyBuilder cannot be cast to org.opensaml.core.xml.XMLObjectBuilder
        at org.opensaml.core.xml.config.XMLConfigurator.initializeObjectProviders(XMLConfigurator.java:238)
        at org.opensaml.core.xml.config.XMLConfigurator.load(XMLConfigurator.java:203)
        at org.opensaml.core.xml.config.XMLConfigurator.load(XMLConfigurator.java:188)
        at org.opensaml.core.xml.config.XMLConfigurator.load(XMLConfigurator.java:162)
        at org.opensaml.core.xml.config.AbstractXMLObjectProviderInitializer.init(AbstractXMLObjectProviderInitializer.java:52)
        at org.opensaml.core.xml.config.XMLObjectProviderInitializer.init(XMLObjectProviderInitializer.java:45)
        at org.opensaml.core.config.InitializationService.initialize(InitializationService.java:56)
        at org.pac4j.saml.util.Configuration.bootstrap(Configuration.java:76)
        at org.pac4j.saml.util.Configuration.<clinit>(Configuration.java:49)
        ... 43 more"




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)