首页 > 解决方案 > WSO2 Identity Server 5.10.0 with Samples 4.2.0 继续有 java.lang.ClassCastException: class org.opensaml.saml1.core.impl.ActionBuilder

问题描述

当我尝试 WSO2 Identity Server 的快速入门指南时。

场景 1 - 使用 SAML2 配置单点登录

生成http://localhost.com:8080/saml2-web-app-pickup-dispatch.com/. 当我单击链接应用程序服务器崩溃并显示以下消息时:

HTTP ERROR 500
Problem accessing /saml2-web-app-pickup-dispatch.com/samlsso. Reason:

    Server Error
Caused by:
java.lang.ClassCastException: class org.opensaml.saml1.core.impl.ActionBuilder cannot be cast to class org.opensaml.core.xml.XMLObjectBuilder (org.opensaml.saml1.core.impl.ActionBuilder and org.opensaml.core.xml.XMLObjectBuilder are in unnamed module of loader org.eclipse.jetty.webapp.WebAppClassLoader @4e517165)
    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.wso2.carbon.identity.saml.common.util.SAMLInitializer.doBootstrap(SAMLInitializer.java:55)
    at org.wso2.carbon.identity.sso.agent.util.SSOAgentUtils.doBootstrap(SSOAgentUtils.java:123)
    at org.wso2.carbon.identity.sso.agent.saml.SAML2SSOManager.<init>(SAML2SSOManager.java:163)
    at org.wso2.carbon.identity.sso.agent.SAML2SSOAgentFilter.doFilter(SAML2SSOAgentFilter.java:143)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1602)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:540)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1700)
    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1345)
    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:480)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1667)
    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1247)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:220)
    at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:152)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
    at org.eclipse.jetty.server.Server.handle(Server.java:505)
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:370)
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:267)
    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)
    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
    at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)
    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)
    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)
    at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:132)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:698)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:804)
    at java.base/java.lang.Thread.run(Thread.java:834)

我在 Mac 和 Linux 平台上尝试过,但结果相同。是否有任何环境或配置问题使其工作?

标签: javawso2is

解决方案


这是一个已知问题[1],并在随 samples-is v4.3.0 release[2] 发布的示例中得到修复。您应该能够从 [2] 下载新的 saml2-web-app-pickup-dispatch.com 示例。

[1] - https://github.com/wso2/product-is/issues/7891
[2] - https://github.com/wso2/samples-is/releases/tag/v4.3.0


推荐阅读