[keycloak-user] Exception while executing example security question required action
Bruno Oliveira
bruno at abstractj.org
Mon Dec 12 14:09:24 EST 2016
Why you have keycloak-services using 1.8.1 version while other
dependencies have 2.4.0 Final?
Have you tried to change it? See:
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-services</artifactId>
<version>2.4.0.Final</version>
</dependency>
On 2016-12-09, abhishek raghav wrote:
> Hi
>
> I have implemented the example security question authenticator custom
> authenticator independently. I am able to register it as a required action.
> But when I am trying to login with the user for whom I set it as a
> required action, I am facing this exception at run time. my pom.xml is also
> attached.
>
> 16:16:49,916 ERROR [io.undertow.request] (default task-25) UT005023:
> Exception handling request to
> /auth/realms/DCI/login-actions/required-action:
> org.jboss.resteasy.spi.UnhandledException: java.lang.NoSuchMethodError:
> org.keycloak.authentication.RequiredActionContext.form()Lorg/keycloak/login/LoginFormsProvider;
> at
> org.jboss.resteasy.core.ExceptionHandler.handleApplicationException(ExceptionHandler.java:76)
> at
> org.jboss.resteasy.core.ExceptionHandler.handleException(ExceptionHandler.java:212)
> at
> org.jboss.resteasy.core.SynchronousDispatcher.writeException(SynchronousDispatcher.java:168)
> at
> org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:411)
> at
> org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:202)
> at
> org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:221)
> at
> org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)
> at
> org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
> at
> io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
> at
> io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
> at
> org.keycloak.services.filters.KeycloakSessionServletFilter.doFilter(KeycloakSessionServletFilter.java:90)
> at
> io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
> at
> io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
> at
> io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
> at
> io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
> at
> io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
> at
> org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
> at
> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at
> io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
> at
> io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
> at
> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at
> io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
> at
> io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
> at
> io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
> at
> io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
> at
> io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
> at
> io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
> at
> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at
> org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
> at
> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at
> io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
> at
> io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:284)
> at
> io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:263)
> at
> io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
> at
> io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:174)
> at
> io.undertow.server.Connectors.executeRootHandler(Connectors.java:202)
> at
> io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:793)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.NoSuchMethodError:
> org.keycloak.authentication.RequiredActionContext.form()Lorg/keycloak/login/LoginFormsProvider;
> at
> com.dci.examples.providers.events.SecretQuestionRequiredAction.requiredActionChallenge(SecretQuestionRequiredAction.java:40)
> at
> org.keycloak.services.managers.AuthenticationManager.executionActions(AuthenticationManager.java:619)
> at
> org.keycloak.services.managers.AuthenticationManager.actionRequired(AuthenticationManager.java:542)
> at
> org.keycloak.services.managers.AuthenticationManager.nextActionAfterAuthentication(AuthenticationManager.java:464)
> at
> org.keycloak.services.resources.LoginActionsService$Checks.verifyRequiredAction(LoginActionsService.java:299)
> at
> org.keycloak.services.resources.LoginActionsService.processRequireAction(LoginActionsService.java:860)
> at
> org.keycloak.services.resources.LoginActionsService.requiredActionGET(LoginActionsService.java:853)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at
> org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:139)
> at
> org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:295)
> at
> org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:249)
> at
> org.jboss.resteasy.core.ResourceLocatorInvoker.invokeOnTargetObject(ResourceLocatorInvoker.java:138)
> at
> org.jboss.resteasy.core.ResourceLocatorInvoker.invoke(ResourceLocatorInvoker.java:101)
> at
> org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:395)
> ... 37 more
>
> pom.xml :
> <!--
> ~ Copyright 2016 Red Hat, Inc. and/or its affiliates
> ~ and other contributors as indicated by the @author tags.
> ~
> ~ Licensed under the Apache License, Version 2.0 (the "License");
> ~ you may not use this file except in compliance with the License.
> ~ You may obtain a copy of the License at
> ~
> ~ http://www.apache.org/licenses/LICENSE-2.0
> ~
> ~ Unless required by applicable law or agreed to in writing, software
> ~ distributed under the License is distributed on an "AS IS" BASIS,
> ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> ~ See the License for the specific language governing permissions and
> ~ limitations under the License.
> -->
>
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/maven-v4_0_0.xsd">
> <name>Authenticator Example</name>
> <description/>
> <modelVersion>4.0.0</modelVersion>
>
> <artifactId>SampleAuthenticator-listener-provider</artifactId>
> <groupId>org.keycloak</groupId>
> <version>2.5.0.Final-SNAPSHOT</version>
> <packaging>jar</packaging>
>
> <dependencies>
> <!--
> https://mvnrepository.com/artifact/org.keycloak/keycloak-authentication-api
> -->
> <dependency>
> <groupId>org.keycloak</groupId>
> <artifactId>keycloak-authentication-api</artifactId>
> <version>1.0-beta-3</version>
> </dependency>
> <dependency>
> <groupId>org.keycloak</groupId>
> <artifactId>keycloak-services</artifactId>
> <version>1.8.1.Final</version>
> </dependency>
>
>
> <dependency>
> <groupId>org.keycloak</groupId>
> <artifactId>keycloak-server-spi</artifactId>
> <version>2.4.0.Final</version>
> </dependency>
> <!-- https://mvnrepository.com/artifact/org.keycloak/keycloak-core -->
> <dependency>
> <groupId>org.keycloak</groupId>
> <artifactId>keycloak-core</artifactId>
> <version>2.4.0.Final</version>
> </dependency>
> <dependency>
> <groupId>org.json</groupId>
> <artifactId>json</artifactId>
> <version>20140107</version>
> </dependency>
> <dependency>
> <groupId>org.jboss.resteasy</groupId>
> <artifactId>resteasy-client</artifactId>
> <version>3.0.6.Final</version>
> <scope>provided</scope>
> </dependency>
> <dependency>
> <groupId>javax</groupId>
> <artifactId>javaee-web-api</artifactId>
> <version>6.0</version>
> <scope>provided</scope>
> </dependency>
>
>
> </dependencies>
>
>
> <build>
> <finalName>SampleAuthenticator-listener-provider</finalName>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-compiler-plugin</artifactId>
> <configuration>
> <source>1.8</source>
> <target>1.8</target>
> </configuration>
> </plugin>
> <plugin>
> <groupId>org.wildfly.plugins</groupId>
> <artifactId>wildfly-maven-plugin</artifactId>
> <configuration>
> <skip>false</skip>
> </configuration>
> </plugin>
> </plugins>
> </build>
>
> </project>
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user
--
abstractj
PGP: 0x84DC9914
More information about the keycloak-user
mailing list