HI Team,

Did any one get a chance to look at the issue.

Kindly look into it. 

Looking forward to your positive response.


On Fri, Aug 28, 2015 at 8:31 PM, Satyajit Das <satyajit.das@spire2grow.com> wrote:
Hi Team,

I have configured PathBasedKeycloakConfigResolver in my package: com.demo.util.

The context param has been set on web.xml

I deployed the application on Tomcat. I have registered the context.xml in meta-inf with the required adapter.

Tomcat lib directory has all the required keycloak jar files.

But PathBasedKeycloakConfigResolver never gets called on any request to the url.
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.

After debugging   String configResolverClass = context.getServletContext().getInitParameter("keycloak.config.resolver"); of AbstractKeycloakAuthenticatorValve class

Got the following error: when PathBasedKeycloakConfigResolver  is being instantiated.

java.lang.ClassCastException: org.keycloak.example.PathBasedKeycloakConfigResolver cannot be cast to org.keycloak.adapters.KeycloakConfigResolver

But PathBasedKeycloakConfigResolver implements org.keycloak.adapters.KeycloakConfigResolver.