java.lang.ClassCastException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • 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 KnoxSSO 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"
    via by Larry McCay,
    • java.lang.ClassCastException: org.opensaml.xml.signature.impl.CryptoBinaryBuilder 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.config.InitializationService.initialize(InitializationService.java:56)
    No Bugmate found.