SSO-SAML Request Handler error

2
Hi Everyone, I am using the SAML2.0 module in my application.  It is a 9.2.0 app so I have had to export the SAML module in version 8.*, and then import it into my 9.2 app.  That seemed to go fine, but then when trying to run the app I get an error:  Unable to add RequestHandler to path 'SSO/':  and then when trying to go to the /SSO URL, I get: 404 - file not found for file: SSO/ (obviously because of the first error. Is there anything that I can do?  I really don’t want to take weeks redeveloping my application in 8.*.  Am I able to maybe write a custom Java function that would handle the RequestHandler?  Has anyone else experienced this?   Help!! The full first error is:   java.lang.ClassCastException: class org.opensaml.core.xml.schema.impl.XSAnyBuilder cannot be cast to class org.opensaml.xml.XMLObjectBuilder (org.opensaml.core.xml.schema.impl.XSAnyBuilder and org.opensaml.xml.XMLObjectBuilder are in unnamed module of loader com.mendix.container.deployment.internal.Interpreters$ClassLoaders$$anon$1 @2d778add)     at org.opensaml.xml.XMLConfigurator.initializeObjectProviders(XMLConfigurator.java:236)     at org.opensaml.xml.XMLConfigurator.load(XMLConfigurator.java:182)     at org.opensaml.xml.XMLConfigurator.load(XMLConfigurator.java:166)     at org.opensaml.xml.XMLConfigurator.load(XMLConfigurator.java:143)     at org.opensaml.DefaultBootstrap.initializeXMLTooling(DefaultBootstrap.java:224)     at org.opensaml.DefaultBootstrap.initializeXMLTooling(DefaultBootstrap.java:207)     at org.opensaml.DefaultBootstrap.bootstrap(DefaultBootstrap.java:100)     at saml20.implementation.SAMLRequestHandler.<init>(SAMLRequestHandler.java:62)     at saml20.implementation.SAMLRequestHandler.getInstance(SAMLRequestHandler.java:56)     at saml20.implementation.SSOServerConfiguration.start(SSOServerConfiguration.java:16)     at saml20.actions.StartSSO.executeAction(StartSSO.java:27)     at saml20.actions.StartSSO.executeAction(StartSSO.java:1)     at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:46)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:70)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:48)     at com.mendix.core.actionmanagement.internal.InternalCoreAction.call(InternalCoreAction.scala:25)     at com.mendix.basis.actionmanagement.ActionManager.$anonfun$executeSync$2(ActionManager.scala:80)     at com.mendix.util.classloading.Runner.withContextClassLoader(Runner.java:19)     at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.scala:79)     at com.mendix.basis.actionmanagement.UserActionCallBuilderImpl.execute(UserActionCallBuilderImpl.scala:35)     at com.mendix.modules.microflowengine.actions.actioncall.ForegroundJavaAction.doExecute(ForegroundJavaAction.scala:35)     at com.mendix.modules.microflowengine.actions.actioncall.ForegroundJavaAction.doExecute(ForegroundJavaAction.scala:11)     at com.mendix.modules.microflowengine.actions.actioncall.JavaAction.execute(JavaAction.scala:38)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.$anonfun$execute$1(MicroflowObject.scala:31)     at scala.Option.flatMap(Option.scala:283)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.scala:28)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.$anonfun$executeAfterBreakingIfNecessary$2(MicroflowImpl.scala:167)     at scala.Option.flatMap(Option.scala:283)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAfterBreakingIfNecessary(MicroflowImpl.scala:167)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAction(MicroflowImpl.scala:114)     at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:46)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:70)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:48)     at com.mendix.core.actionmanagement.internal.InternalCoreAction.call(InternalCoreAction.scala:25)     at com.mendix.basis.actionmanagement.ActionManager.$anonfun$executeSync$2(ActionManager.scala:80)     at com.mendix.util.classloading.Runner.withContextClassLoader(Runner.java:19)     at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.scala:79)     at com.mendix.basis.component.ExecutionCore.doExecuteSync(ExecutionCore.scala:142)     at com.mendix.basis.component.ExecutionCore.doExecuteSync$(ExecutionCore.scala:141)     at com.mendix.basis.component.InternalCore.doExecuteSync(InternalCore.scala:21)     at com.mendix.basis.component.ExecutionCore.executeSync(ExecutionCore.scala:88)     at com.mendix.basis.component.ExecutionCore.executeSync$(ExecutionCore.scala:85)     at com.mendix.basis.component.InternalCore.executeSync(InternalCore.scala:21)     at com.mendix.modules.microflowengine.MicroflowExecuter$.executeSync(MicroflowExecuter.scala:19)     at com.mendix.modules.microflowengine.actions.SubMicroflowAction.execute(SubMicroflowAction.scala:36)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.$anonfun$execute$1(MicroflowObject.scala:31)     at scala.Option.flatMap(Option.scala:283)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.scala:28)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.$anonfun$executeAfterBreakingIfNecessary$2(MicroflowImpl.scala:167)     at scala.Option.flatMap(Option.scala:283)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAfterBreakingIfNecessary(MicroflowImpl.scala:167)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAction(MicroflowImpl.scala:114)     at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:46)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:70)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:48)     at com.mendix.core.actionmanagement.internal.InternalCoreAction.call(InternalCoreAction.scala:25)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.$anonfun$runMonitoredAction$1(CoreActionHandlerImpl.scala:59)     at com.mendix.basis.actionmanagement.ActionMonitoring$.$anonfun$monitor$1(ActionMonitoring.scala:50)     at com.mendix.util.classloading.Runner.withContextClassLoader(Runner.java:19)     at com.mendix.basis.actionmanagement.ActionMonitoring$.monitor(ActionMonitoring.scala:50)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.runMonitoredAction(CoreActionHandlerImpl.scala:59)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:46)     at com.mendix.core.actionmanagement.internal.InternalCoreAction.call(InternalCoreAction.scala:25)     at com.mendix.basis.actionmanagement.ActionManager.$anonfun$executeSync$2(ActionManager.scala:80)     at com.mendix.util.classloading.Runner.withContextClassLoader(Runner.java:19)     at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.scala:79)     at com.mendix.basis.actionmanagement.MicroflowCallBuilderImpl.execute(MicroflowCallBuilderImpl.scala:41)     at com.mendix.basis.impl.MxRuntimeImplBase.doFire(MxRuntimeImplBase.java:554)     at com.mendix.basis.impl.MxRuntimeImplBase.fireZeMissiles(MxRuntimeImplBase.java:506)     at com.mendix.basis.impl.MxRuntimeImplBase.start(MxRuntimeImplBase.java:289)     at com.mendix.m2ee.appcontainer.actions.StartAction.startRuntime(StartAction.java:48)     at com.mendix.m2ee.appcontainer.actions.StartAction.execute(StartAction.java:30)     at com.mendix.m2ee.appcontainer.server.handler.HttpAdminHandler.handle(HttpAdminHandler.java:134)     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:277)     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.base/java.lang.Thread.run(Thread.java:834)   Thanks  
asked
2 answers
4

I had the same error migrating from Mx8 to Mx9.2.0 and updating to SAML20 version 3.0.5.

Ultimately I was able to resolve it by deleting "org.apache.servicemix.bundles.opensaml-2.6.0_3.jar". In general: I searched for 'SAML' in the userlib directory. Files were either recent from the app store update or old from earlier version. I cleaned any SAML reference with an old date.

answered
1

That looks like a version conflict to me.

You might have multiple versions of opensaml in your userlib directory. Look for files starting with opensaml and drop all of them that have a version number below 3.4.5 (assuming you’re using the latest released SAML module).

answered