WSO2 Identity Server 5.10.0 with Samples 4.2.0 keep on having java.lang.ClassCastException: class org.opensaml.saml1.core.impl.ActionBuilder

huangapple go评论115阅读模式
英文:

WSO2 Identity Server 5.10.0 with Samples 4.2.0 keep on having 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错误500
访问/saml2-web-app-pickup-dispatch.com/samlsso时出现问题。原因:

    服务器错误
原因:
java.lang.ClassCastException: 无法将类org.opensaml.saml1.core.impl.ActionBuilder强制转换为类org.opensaml.core.xml.XMLObjectBuilder(org.opensaml.saml1.core.impl.ActionBuilder和org.opensaml.core.xml.XMLObjectBuilder在加载器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平台上,但结果相同。是否存在任何环境或配置问题以使其正常工作?

英文:

When I try Quick Start Guide of WSO2 Identity Server.

Scenario 1 - Configuring Single-Sign-On with SAML2

generate http://localhost.com:8080/saml2-web-app-pickup-dispatch.com/.
When I click the link app server crash with following messages:

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.&lt;init&gt;(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)

I tried on Mac and Linux platform but same result. Is there any env or config issue to make it work?

答案1

得分: 2

这是一个已知问题[1],并且在随 samples-is v4.3.0 发布的示例中已经修复[2]。您可以从[2]下载新的 saml2-web-app-pickup-dispatch.com 示例。

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

英文:

This is a known issue[1] and is fixed in the samples released with samples-is v4.3.0 release[2]. You should be able to download the new saml2-web-app-pickup-dispatch.com sample from [2].

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

huangapple
  • 本文由 发表于 2020年4月7日 23:31:03
  • 转载请务必保留本文链接:https://go.coder-hub.com/61083688.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定