<div dir="ltr">HI Team,<div><br></div><div>Did any one get a chance to look at the issue.</div><div><br></div><div>Kindly look into it. </div><div><br></div><div>Looking forward to your positive response.</div><div><br></div><div>Regards,</div><div>Satya</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 28, 2015 at 8:31 PM, Satyajit Das <span dir="ltr"><<a href="mailto:satyajit.das@spire2grow.com" target="_blank">satyajit.das@spire2grow.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><span style="font-size:12.8000001907349px">Hi Team,</span><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">I have configured PathBasedKeycloakConfigResolver in my package: com.demo.util.</div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">The context param has been set on web.xml</div><div style="font-size:12.8000001907349px"><div><context-param></div><div> <param-name>keycloak.config.resolver</param-name></div><div> <param-value>org.keycloak.example.PathBasedKeycloakConfigResolver</param-value></div><div> </context-param></div></div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">I deployed the application on Tomcat. I have registered the context.xml in meta-inf with the required adapter.</div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">Tomcat lib directory has all the required keycloak jar files.</div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">But PathBasedKeycloakConfigResolver never gets called on any request to the url.</div><div style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">One strange thing i find that in eclipse if I remove the maven dependency from deployment assembly(right click on project-> properties->deployment assembly) it works But if i put it back it fails. Maven dependency is a must.</span></div></div></blockquote><div><br></div><div>After debugging String configResolverClass = context.getServletContext().getInitParameter("keycloak.config.resolver"); of AbstractKeycloakAuthenticatorValve class</div><div><br></div><div style="font-size:12.8000001907349px">Got the following error: when PathBasedKeycloakConfigResolver is being instantiated.</div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">java.lang.ClassCastException: org.keycloak.example.PathBasedKeycloakConfigResolver cannot be cast to org.keycloak.adapters.KeycloakConfigResolver<br></div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">But PathBasedKeycloakConfigResolver implements org.keycloak.adapters.KeycloakConfigResolver.</div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">Regards,</div><div style="font-size:12.8000001907349px">Satya.</div></div>
</blockquote></div><br></div>