Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

Problem accessing /system/console/configMgr/com.adobe.granite.auth.saml.SamlAuthenticationHandler

Avatar

Level 1

Hi everybody.

So we have this script that is run when we deploy aem. But at some point it fails when it tries to do this :

curl -fsu $credential http://$host:$port/system/console/configMgr/com.adobe.granite.auth.saml.SamlAuthenticationHandler \

    -d apply=true \

    -d factoryPid=com.adobe.granite.auth.saml.SamlAuthenticationHandler \

    -d action=ajaxConfigManager \

    -d idpUrl=$idpUrl \

    -d idpCertAlias=$idpAlias \

    -d idpHttpRedirect=true \

    -d serviceProviderEntityId=logon_identifier \

    -d spPrivateKeyAlias=key \

    -d keyStorePassword=$password \

    -d groupMembershipAttribute=http://schemas.xmlsoap.org/claims/Group \

    -d handleLogout=true \

    -d logoutUrl=$idpUrl

And i'm getting this error

<html>

<head>

<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>

<title>Error 500 </title>

</head>

<body>

<h2>HTTP ERROR: 500</h2>

<p>Problem accessing /system/console/configMgr/com.adobe.granite.auth.saml.SamlAuthenticationHandler. Reason:

<pre>    java.lang.ClassCastException: org.apache.sling.i18n.impl.I18NFilter$I18NHttpServletRequest cannot be cast to org.apache.sling.api.SlingHttpServletRequest</pre></p>

<hr /><i><small>Powered by Jetty://</small></i>

</body>

</html>

Any ideas as to why this is happening?

Thank you.

5 Replies

Avatar

Level 1

no, i can not. multiple things are set up before aem starts and it's all done by scripts.

Avatar

Community Advisor

Dear Sir,

Have a read through this answer: cURL command to update service config property

It details how you should record your curl requests.

My expectation is that you do not have correct parameters sent with your request. Therefore, OSGi config manager fails.

Regards,

Peter

Avatar

Level 1

If you're reffering at the way the parameters are fed to the request:  https://curl.haxx.se/docs/manpage.html#-d

it's very legal.

Avatar

Employee Advisor

This exceptions seem to be caused at around [1] (you might want to choose the right version as a tag in github); I wonder why the cast fails, because at least in trunk the type check is done.

Can you provide the version of the sling i18n bundle you are using?

Jörg

[1] sling-org-apache-sling-i18n/I18NFilter.java at master · apache/sling-org-apache-sling-i18n · GitHub