[keycloak-user] Attempting to build authenticator example and failing.
Mark Henkelis
mark.henkelis at atos.net
Mon Mar 27 13:58:26 EDT 2017
I should add that though it installs with mvn wildfly:deploy, I get the
NoClassDefFound exception when running it. If I install it manually
(including jboss-deployment-structure.xml) that doesn't occur.
Mark Henkelis wrote
> Hi,
>
> I'm getting the same error with Keycloak version 2.5.5.Final.
>
> Installing it manually to standalone/deployments made no difference.
>
> I have to add a jboss-deployment-structure.xml file to META-INF,
> containing a dependancy on
> "org.keycloak.keycloak-server-spi-private" to fix it.
>
> Mark.
> Salvatore Incandela wrote
>> Hi Reed, I cannot reproduce the same error, I've installed the
>> authenticator without problems, could you try to install manually ?
>>
>> On Tue, Feb 14, 2017 at 6:12 PM, Reed Lewis <
>> RLewis@
>> > wrote:
>>
>>> I downloaded Keycloak version 2.5.1 example file. Extracted it onto a
>>> CentOS 7 machine, and installed Java-1.8.0 and java-devel.
>>>
>>> When I attempted to use the example file: /examples/providers/
>>> authenticator
>>>
>>> By typing: mvn clean install wildfly:deploy
>>> I got the following error on the terminal where I was executing mvn:
>>>
>>> ERROR] Failed to execute goal org.wildfly.plugins:wildfly-
>>> maven-plugin:1.1.0.Beta1:deploy (default-cli) on project
>>> authenticator-required-action-example: Failed to execute goal deploy:
>>> {"WFLYCTL0062: Composite operation failed and was rolled back. Steps
>>> that
>>> failed:" => {"Operation step-1" => {"WFLYCTL0080: Failed services" =>
>>> {"jboss.deployment.unit.\"authenticator-required-action-example.jar\".POST_MODULE"
>>> => "org.jboss.msc.service.StartException in service
>>> jboss.deployment.unit.\"authenticator-required-action-example.jar\".POST_MODULE:
>>> WFLYSRV0153: Failed to process phase POST_MODULE of deployment
>>> \"authenticator-required-action-example.jar\"
>>> [ERROR] Caused by: java.lang.NoClassDefFoundError: Failed to link
>>> org/keycloak/examples/authenticator/SecretQuestionAuthenticatorFactory
>>> (Module \"deployment.authenticator-required-action-example.jar:main\"
>>> from Service Module Loader): org/keycloak/authentication/
>>> AuthenticatorFactory"}}}}
>>> [ERROR] -> [Help 1]
>>> [ERROR]
>>> [ERROR] To see the full stack trace of the errors, re-run Maven with the
>>> -e switch.
>>> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
>>> [ERROR]
>>> [ERROR] For more information about the errors and possible solutions,
>>> please read the following articles:
>>> [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/
>>> MojoExecutionException
>>> [root at localhost authenticator]# pwd
>>> /root/keycloak-demo-2.5.1.Final/examples/providers/authenticator
>>>
>>>
>>> Thank you,
>>>
>>> Reed Lewis
>>>
>>> This was what was displayed on the Keycloak server.
>>>
>>> 12:06:20,685 INFO [org.jboss.as.server.deployment] (MSC service thread
>>> 1-1) WFLYSRV0027: Starting deployment of
>>> "authenticator-required-action-example.jar"
>>> (runtime-name: "authenticator-required-action-example.jar")
>>> 12:06:20,761 INFO [org.keycloak.subsystem.server.extension.
>>> KeycloakProviderDeploymentProcessor] (MSC service thread 1-4) Deploying
>>> Keycloak provider: {0}
>>> 12:06:20,767 WARN [org.jboss.modules] (MSC service thread 1-4) Failed
>>> to
>>> define class org.keycloak.examples.authenticator.
>>> SecretQuestionAuthenticatorFactory in Module "deployment.authenticator-
>>> required-action-example.jar:main" from Service Module Loader:
>>> java.lang.NoClassDefFoundError:
>>> Failed to link org/keycloak/examples/authenticator/
>>> SecretQuestionAuthenticatorFactory (Module "deployment.authenticator-
>>> required-action-example.jar:main" from Service Module Loader):
>>> org/keycloak/authentication/AuthenticatorFactory
>>> at
>>> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
>>> Method)
>>> at
>>> sun.reflect.NativeConstructorAccessorImpl.newInstance(
>>> NativeConstructorAccessorImpl.java:62)
>>> at sun.reflect.DelegatingConstructorAccessorI
>>> mpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>>> at java.lang.reflect.Constructor.
>>> newInstance(Constructor.java:423)
>>> at org.jboss.modules.ModuleClassLoader.defineClass(
>>> ModuleClassLoader.java:446)
>>> at org.jboss.modules.ModuleClassLoader.loadClassLocal(
>>> ModuleClassLoader.java:274)
>>> at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(
>>> ModuleClassLoader.java:78)
>>> at org.jboss.modules.Module.loadModuleClass(Module.java:
>>> 605)
>>> at org.jboss.modules.ModuleClassLoader.findClass(
>>> ModuleClassLoader.java:190)
>>> at org.jboss.modules.ConcurrentClassLoader.
>>> performLoadClassUnchecked(ConcurrentClassLoader.java:363)
>>> at org.jboss.modules.ConcurrentClassLoader.
>>> performLoadClass(ConcurrentClassLoader.java:351)
>>> at org.jboss.modules.ConcurrentClassLoader.loadClass(
>>> ConcurrentClassLoader.java:93)
>>> at java.lang.Class.forName0(Native Method)
>>> at java.lang.Class.forName(Class.java:348)
>>> at java.util.ServiceLoader$LazyIterator.nextService(
>>> ServiceLoader.java:370)
>>> at java.util.ServiceLoader$LazyIterator.next(
>>> ServiceLoader.java:404)
>>> at
>>> java.util.ServiceLoader$1.next(ServiceLoader.java:480)
>>> at org.keycloak.provider.DefaultProviderLoader.load(
>>> DefaultProviderLoader.java:47)
>>> at org.keycloak.provider.ProviderManager.load(
>>> ProviderManager.java:93)
>>> at org.keycloak.services.DefaultKeycloakSessionFactory.
>>> loadFactories(DefaultKeycloakSessionFactory.java:206)
>>> at org.keycloak.services.DefaultKeycloakSessionFactory.
>>> deploy(DefaultKeycloakSessionFactory.java:112)
>>> at org.keycloak.provider.ProviderManagerRegistry.deploy(
>>> ProviderManagerRegistry.java:42)
>>> at org.keycloak.subsystem.server.extension.
>>> KeycloakProviderDeploymentProcessor.deploy(KeycloakProviderDeploymentProc
>>> essor.java:54)
>>> at org.jboss.as.server.deployment.
>>> DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)
>>> at org.jboss.msc.service.ServiceControllerImpl$
>>> StartTask.startService(ServiceControllerImpl.java:1948)
>>> at org.jboss.msc.service.ServiceControllerImpl$
>>> StartTask.run(ServiceControllerImpl.java:1881)
>>> 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)
>>>
>>> 12:06:20,768 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4)
>>> MSC000001: Failed to start service jboss.deployment.unit."
>>> authenticator-required-action-example.jar".POST_MODULE:
>>> org.jboss.msc.service.StartException in service jboss.deployment.unit."
>>> authenticator-required-action-example.jar".POST_MODULE: WFLYSRV0153:
>>> Failed to process phase POST_MODULE of deployment
>>> "authenticator-required-
>>> action-example.jar"
>>> at org.jboss.as.server.deployment.
>>> DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:154)
>>> at org.jboss.msc.service.ServiceControllerImpl$
>>> StartTask.startService(ServiceControllerImpl.java:1948)
>>> at org.jboss.msc.service.ServiceControllerImpl$
>>> StartTask.run(ServiceControllerImpl.java:1881)
>>> 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.NoClassDefFoundError: Failed to link
>>> org/keycloak/examples/authenticator/SecretQuestionAuthenticatorFactory
>>> (Module "deployment.authenticator-required-action-example.jar:main" from
>>> Service Module Loader): org/keycloak/authentication/AuthenticatorFactory
>>> at
>>> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
>>> Method)
>>> at
>>> sun.reflect.NativeConstructorAccessorImpl.newInstance(
>>> NativeConstructorAccessorImpl.java:62)
>>> at sun.reflect.DelegatingConstructorAccessorI
>>> mpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>>> at java.lang.reflect.Constructor.
>>> newInstance(Constructor.java:423)
>>> at org.jboss.modules.ModuleClassLoader.defineClass(
>>> ModuleClassLoader.java:446)
>>> at org.jboss.modules.ModuleClassLoader.loadClassLocal(
>>> ModuleClassLoader.java:274)
>>> at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(
>>> ModuleClassLoader.java:78)
>>> at org.jboss.modules.Module.loadModuleClass(Module.java:
>>> 605)
>>> at org.jboss.modules.ModuleClassLoader.findClass(
>>> ModuleClassLoader.java:190)
>>> at org.jboss.modules.ConcurrentClassLoader.
>>> performLoadClassUnchecked(ConcurrentClassLoader.java:363)
>>> at org.jboss.modules.ConcurrentClassLoader.
>>> performLoadClass(ConcurrentClassLoader.java:351)
>>> at org.jboss.modules.ConcurrentClassLoader.loadClass(
>>> ConcurrentClassLoader.java:93)
>>> at java.lang.Class.forName0(Native Method)
>>> at java.lang.Class.forName(Class.java:348)
>>> at java.util.ServiceLoader$LazyIterator.nextService(
>>> ServiceLoader.java:370)
>>> at java.util.ServiceLoader$LazyIterator.next(
>>> ServiceLoader.java:404)
>>> at
>>> java.util.ServiceLoader$1.next(ServiceLoader.java:480)
>>> at org.keycloak.provider.DefaultProviderLoader.load(
>>> DefaultProviderLoader.java:47)
>>> at org.keycloak.provider.ProviderManager.load(
>>> ProviderManager.java:93)
>>> at org.keycloak.services.DefaultKeycloakSessionFactory.
>>> loadFactories(DefaultKeycloakSessionFactory.java:206)
>>> at org.keycloak.services.DefaultKeycloakSessionFactory.
>>> deploy(DefaultKeycloakSessionFactory.java:112)
>>> at org.keycloak.provider.ProviderManagerRegistry.deploy(
>>> ProviderManagerRegistry.java:42)
>>> at org.keycloak.subsystem.server.extension.
>>> KeycloakProviderDeploymentProcessor.deploy(KeycloakProviderDeploymentProc
>>> essor.java:54)
>>> at org.jboss.as.server.deployment.
>>> DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)
>>> ... 5 more
>>>
>>> 12:06:20,769 ERROR [org.jboss.as.controller.management-operation]
>>> (management-handler-thread - 4) WFLYCTL0013: Operation ("add") failed -
>>> address: ([("deployment" =>
>>> "authenticator-required-action-example.jar")])
>>> - failure description: {"WFLYCTL0080: Failed services" =>
>>> {"jboss.deployment.unit.\"authenticator-required-action-example.jar\".POST_MODULE"
>>> => "org.jboss.msc.service.StartException in service
>>> jboss.deployment.unit.\"authenticator-required-action-example.jar\".POST_MODULE:
>>> WFLYSRV0153: Failed to process phase POST_MODULE of deployment
>>> \"authenticator-required-action-example.jar\"
>>> Caused by: java.lang.NoClassDefFoundError: Failed to link
>>> org/keycloak/examples/authenticator/SecretQuestionAuthenticatorFactory
>>> (Module \"deployment.authenticator-required-action-example.jar:main\"
>>> from Service Module Loader): org/keycloak/authentication/
>>> AuthenticatorFactory"}}
>>> 12:06:20,769 ERROR [org.jboss.as.server] (management-handler-thread - 4)
>>> WFLYSRV0021: Deploy of deployment
>>> "authenticator-required-action-example.jar"
>>> was rolled back with the following failure message:
>>> {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"
>>> authenticator-required-action-example.jar\".POST_MODULE" =>
>>> "org.jboss.msc.service.StartException in service
>>> jboss.deployment.unit.\"
>>> authenticator-required-action-example.jar\".POST_MODULE: WFLYSRV0153:
>>> Failed to process phase POST_MODULE of deployment
>>> \"authenticator-required-
>>> action-example.jar\"
>>> Caused by: java.lang.NoClassDefFoundError: Failed to link
>>> org/keycloak/examples/authenticator/SecretQuestionAuthenticatorFactory
>>> (Module \"deployment.authenticator-required-action-example.jar:main\"
>>> from Service Module Loader): org/keycloak/authentication/
>>> AuthenticatorFactory"}}
>>> 12:06:20,772 INFO [org.jboss.as.server.deployment] (MSC service thread
>>> 1-1) WFLYSRV0028: Stopped deployment
>>> authenticator-required-action-example.jar
>>> (runtime-name: authenticator-required-action-example.jar) in 2ms
>>> 12:06:20,773 INFO [org.jboss.as.controller] (management-handler-thread
>>> -
>>> 4) WFLYCTL0183: Service status report
>>> WFLYCTL0186: Services which failed to start: service
>>> jboss.deployment.unit."authenticator-required-action-
>>> example.jar".POST_MODULE
>>> _______________________________________________
>>> keycloak-user mailing list
>>>
>> keycloak-user at .jboss
>>> https://lists.jboss.org/mailman/listinfo/keycloak-user
>>>
>>
>>
>>
>> --
>> Salvatore Incandela
>> Middleware Consultant
>> ------------------------------
>> Red Hat - www.redhat.com
>> Via Andrea Doria 41M
>> 00192 Roma (Italy)
>> Mobile +39 349 6196615
>> Fax +39 06 39728535
>> E-mail
>> salvatore.incandela@
>> _______________________________________________
>> keycloak-user mailing list
>> keycloak-user at .jboss
>> https://lists.jboss.org/mailman/listinfo/keycloak-user
--
View this message in context: http://keycloak-user.88327.x6.nabble.com/keycloak-user-Attempting-to-build-authenticator-example-and-failing-tp2737p3342.html
Sent from the keycloak-user mailing list archive at Nabble.com.
More information about the keycloak-user
mailing list