SAML 1.15.3 Class Cast Exception in Mendix Version 7.23.21

2
Hi Everyone, I am facing issues with SAML Module after Converting Mendix version from 7.14.1 to 7.23.21. Currently we are using SAML Version 1.15.3 in our application. Please find the below error i am facing the application com.mendix.core.CoreException: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: java.lang.ClassCastException: org.opensaml.xml.signature.impl.CryptoBinaryBuilder cannot be cast to org.opensaml.core.xml.XMLObjectBuilder     at com.mendix.basis.component.InternalCoreBase.execute(InternalCoreBase.java:418) Caused by: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: java.lang.ClassCastException: org.opensaml.xml.signature.impl.CryptoBinaryBuilder cannot be cast to org.opensaml.core.xml.XMLObjectBuilder     at com.mendix.basis.actionmanagement.ActionManagerBase.executeSync(ActionManagerBase.java:159) Caused by: com.mendix.systemwideinterfaces.MendixRuntimeException: java.lang.ClassCastException: org.opensaml.xml.signature.impl.CryptoBinaryBuilder cannot be cast to org.opensaml.core.xml.XMLObjectBuilder     at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:36) Caused by: 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:240)     at org.opensaml.core.xml.config.XMLConfigurator.load(XMLConfigurator.java:204)     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:54)     at org.opensaml.core.config.InitializationService.initialize(InitializationService.java:56)     at saml20.implementation.SAMLRequestHandler.<init>(SAMLRequestHandler.java:66)     at saml20.implementation.SAMLRequestHandler.getInstance(SAMLRequestHandler.java:59)     at saml20.actions.ReloadConfiguration.executeAction(ReloadConfiguration.java:29)     at saml20.actions.ReloadConfiguration.executeAction(ReloadConfiguration.java:17)     at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:46)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:79)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:57)     at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:55)     at com.mendix.basis.actionmanagement.ActionManagerBase$1.execute(ActionManagerBase.java:150)     at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32)     at com.mendix.basis.actionmanagement.ActionManagerBase.executeSync(ActionManagerBase.java:155)     at com.mendix.basis.component.InternalCoreBase.execute(InternalCoreBase.java:414)     at com.mendix.modules.microflowengine.actions.actioncall.JavaAction.execute(JavaAction.scala:56)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.java:47)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAfterBreakingIfNecessary(MicroflowImpl.java:201)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAction(MicroflowImpl.java:157)     at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:46)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:79)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:57)     at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:55)     at com.mendix.basis.actionmanagement.ActionManagerBase$1.execute(ActionManagerBase.java:150)     at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32)     at com.mendix.basis.actionmanagement.ActionManagerBase.executeSync(ActionManagerBase.java:155)     at com.mendix.basis.component.InternalCoreBase.execute(InternalCoreBase.java:383)     at com.mendix.basis.component.InternalCoreBase.execute(InternalCoreBase.java:398)     at com.mendix.webui.actions.client.ExecuteMicroflowAction.runMicroflow(ExecuteMicroflowAction.scala:46)     at com.mendix.webui.actions.client.ExecuteMicroflowAction.apply(ExecuteMicroflowAction.scala:32)     at com.mendix.webui.actions.client.ExecuteMicroflowAction.apply(ExecuteMicroflowAction.scala:15)     at com.mendix.webui.actions.client.RegularClientAction.$anonfun$execute$4(RegularClientAction.scala:46)     at com.mendix.webui.requesthandling.helpers.StateHandling.withState(StateHandling.scala:35)     at com.mendix.webui.requesthandling.helpers.StateHandling.withState$(StateHandling.scala:23)     at com.mendix.webui.actions.client.RegularClientAction.withState(RegularClientAction.scala:21)     at com.mendix.webui.actions.client.RegularClientAction.$anonfun$execute$3(RegularClientAction.scala:44)     at scala.util.Try$.apply(Try.scala:213)     at com.mendix.webui.actions.client.RegularClientAction.$anonfun$execute$2(RegularClientAction.scala:44)     at com.mendix.webui.actions.client.RegularClientAction.$anonfun$execute$2$adapted(RegularClientAction.scala:42)     at com.mendix.webui.requesthandling.helpers.ContextHandling.$anonfun$inContext$6(ContextHandling.scala:47)     at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)     at com.mendix.basis.actionmanagement.IMonitoredAction$$anon$1.execute(IMonitoredAction.scala:47)     at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32)     at com.mendix.basis.actionmanagement.IMonitoredAction.monitor(IMonitoredAction.scala:49)     at com.mendix.basis.actionmanagement.IMonitoredAction.monitor$(IMonitoredAction.scala:25)     at com.mendix.webui.requesthandling.helpers.ContextHandling$ClientMonitoredAction.monitor(ContextHandling.scala:59)     at com.mendix.webui.requesthandling.helpers.ContextHandling.inContext(ContextHandling.scala:47)     at com.mendix.webui.requesthandling.helpers.ContextHandling.inContext$(ContextHandling.scala:27)     at com.mendix.webui.actions.client.RegularClientAction.inContext(RegularClientAction.scala:21)     at com.mendix.webui.requesthandling.helpers.ContextHandling.inContext(ContextHandling.scala:24)     at com.mendix.webui.requesthandling.helpers.ContextHandling.inContext$(ContextHandling.scala:19)     at com.mendix.webui.actions.client.RegularClientAction.inContext(RegularClientAction.scala:21)     at com.mendix.webui.actions.client.RegularClientAction.$anonfun$execute$1(RegularClientAction.scala:42)     at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)     at com.mendix.webui.requesthandling.helpers.ProfileHandling.profileRequest(ProfileHandling.scala:14)     at com.mendix.webui.requesthandling.helpers.ProfileHandling.profileRequest$(ProfileHandling.scala:10)     at com.mendix.webui.actions.client.RegularClientAction.profileRequest(RegularClientAction.scala:21)     at com.mendix.webui.actions.client.RegularClientAction.execute(RegularClientAction.scala:39)     at com.mendix.webui.requesthandling.ClientRequestHandler.handleAction(ClientRequestHandler.scala:124)     at com.mendix.webui.requesthandling.ClientRequestHandler.processRequest(ClientRequestHandler.scala:101)     at com.mendix.externalinterface.connector.RequestHandler.doProcessRequest(RequestHandler.java:40)     at com.mendix.external.connector.MxRuntimeConnector$1.execute(MxRuntimeConnector.java:72)     at com.mendix.external.connector.MxRuntimeConnector$1.execute(MxRuntimeConnector.java:69)     at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32)     at com.mendix.external.connector.MxRuntimeConnector.processRequest(MxRuntimeConnector.java:75)     at com.mendix.basis.impl.MxRuntimeImpl.processRequest(MxRuntimeImpl.java:953)     at com.mendix.m2ee.appcontainer.server.handler.RuntimeHandler.service(RuntimeHandler.java:42)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)     at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:791)     at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:550)     at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)     at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1624)     at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)     at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1435)     at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)     at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)     at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1594)     at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)     at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1350)     at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)     at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)     at org.eclipse.jetty.server.Server.handle(Server.java:516)     at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388)     at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633)     at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380)     at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:279)     at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)     at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)     at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)     at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)     at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)     at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)     at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)     at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:383)     at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:882)     at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1036)     at java.lang.Thread.run(Thread.java:748)  
asked
3 answers
18

For me the problem was the userlib “org.apache.servicemix.bundles.opensaml-2.6.0_3.jar”

This was not there in a new test project that has SAML, but we still had it in our userlib folder. After removing this .jar file the problem was solved

answered
1

Hi, Facing the same issue. 

Can you please share how did you resolve this issue

answered
0

Did you clear your userlib of double Jar files? After that clean your deployment directory and try again.

Regards,

Ronald

 

answered