I have the jboss-deployment-structure.xml:
<?xml version="1.0" ?
<jboss-deployment-structure
<!-- Core module --
<module
name="deployment.extensions.core"
<resources
<resource-root
path="lib/core.jar" /
</resources
<dependencies
<module
name="org.jboss.logging" export="true" /
<module
name="org.apache.commons.io" export="true" /
<module
name="javax.ws.rs.api" export="true" /
<module
name="org.keycloak.keycloak-common" export="true" /
<module
name="org.keycloak.keycloak-core" export="true" /
<module
name="org.keycloak.keycloak-server-spi" export="true" /
<module
name="org.keycloak.keycloak-server-spi-private"
export="true" /
<module
name="org.keycloak.keycloak-services" export="true" /
</dependencies
</module
<!-- Define dependency on core module for all
sub-deployments --
<deployment
<dependencies
<module
name="deployment.extensions.core" export="true" /
</dependencies
</deployment
</jboss-deployment-structure
The persistence.xml:
<?xml version="1.0" encoding="UTF-8"?
<persistence version="2.1"
xmlns="http://xmlns.jcp.org/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence
http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd<http://xml...
<persistence-unit
name="login-provider-ear"
<jta-data-source>java:jboss/datasources/KeycloakDS</jta-data-source
<properties
<property
name="hibernate.hbm2ddl.auto" value="update" /
<property
name="hibernate.show_sql" value="true" /
<property
name="toplink.ddl-generation" value="create-tables" /
</properties
</persistence-unit
</persistence
The services/org.keycloak.storage.UserStorageProviderFactory:
gcs.fds.focusoc.keycloak.spi.LoginStorageProviderFactory
And I have the same error
12:41:03,035 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed
to start service
jboss.deployment.unit."login-provider-ear-module-0.0.1-SNAPSHOT.jar".POST_MODULE:
org.jboss.msc.service.StartException in service
jboss.deployment.unit."login-provider-ear-module-0.0.1-SNAPSHOT.jar".POST_MODULE:
WFLYSRV0153: Failed to process phase POST_MODULE of deployment
"login-provider-ear-module-0.0.1-SNAPSHOT.jar"
at
org.jboss.as.server@9.0.2.Final//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:183)<mailto:org.jboss.as.server@9.0.2.Final//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:183)
at
org.jboss.msc@1.4.8.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1737)<mailto:org.jboss.msc@1.4.8.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1737)
at
org.jboss.msc@1.4.8.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1699)<mailto:org.jboss.msc@1.4.8.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1699)
at
org.jboss.msc@1.4.8.Final//org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1557)<mailto:org.jboss.msc@1.4.8.Final//org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1557)
at
org.jboss.threads@2.3.3.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)<mailto:org.jboss.threads@2.3.3.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at
org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)<mailto:org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
at
org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)<mailto:org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at
org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1363)<mailto:org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1363)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.util.ServiceConfigurationError:
org.keycloak.storage.UserStorageProviderFactory: Provider
gcs.fds.focusoc.keycloak.spi.LoginStorageProviderFactory not found
at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:588)
at
java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.nextProviderClass(ServiceLoader.java:1211)
at
java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1220)
at
java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1264)
at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1299)
at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1384)
at
org.keycloak.keycloak-services@7.0.0//org.keycloak.provider.DefaultProviderLoader.load(DefaultProviderLoader.java:60)<mailto:org.keycloak.keycloak-services@7.0.0//org.keycloak.provider.DefaultProviderLoader.load(DefaultProviderLoader.java:60)
at
org.keycloak.keycloak-services@7.0.0//org.keycloak.provider.ProviderManager.load(ProviderManager.java:92)<mailto:org.keycloak.keycloak-services@7.0.0//org.keycloak.provider.ProviderManager.load(ProviderManager.java:92)
at
org.keycloak.keycloak-services@7.0.0//org.keycloak.services.DefaultKeycloakSessionFactory.loadFactories(DefaultKeycloakSessionFactory.java:214)<mailto:org.keycloak.keycloak-services@7.0.0//org.keycloak.services.DefaultKeycloakSessionFactory.loadFactories(DefaultKeycloakSessionFactory.java:214)
at
org.keycloak.keycloak-services@7.0.0//org.keycloak.services.DefaultKeycloakSessionFactory.deploy(DefaultKeycloakSessionFactory.java:115)<mailto:org.keycloak.keycloak-services@7.0.0//org.keycloak.services.DefaultKeycloakSessionFactory.deploy(DefaultKeycloakSessionFactory.java:115)
at
org.keycloak.keycloak-services@7.0.0//org.keycloak.provider.ProviderManagerRegistry.deploy(ProviderManagerRegistry.java:42)<mailto:org.keycloak.keycloak-services@7.0.0//org.keycloak.provider.ProviderManagerRegistry.deploy(ProviderManagerRegistry.java:42)
at
org.keycloak.keycloak-wildfly-server-subsystem@7.0.0//org.keycloak.subsystem.server.extension.KeycloakProviderDeploymentProcessor.deploy(KeycloakProviderDeploymentProcessor.java:55)<mailto:org.keycloak.keycloak-wildfly-server-subsystem@7.0.0//org.keycloak.subsystem.server.extension.KeycloakProviderDeploymentProcessor.deploy(KeycloakProviderDeploymentProcessor.java:55)
at
org.jboss.as.server@9.0.2.Final//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:176)<mailto:org.jboss.as.server@9.0.2.Final//org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:176)
And my project organization
[cid:image001.png@01D58296.E1433100]
WHAT AM I MISSING? I AM DESESPERATED.
I am deploying with mvn wildfly:deploy.
-----Original Message-----
From: Marek Posolda [mailto:mposolda@redhat.com]
Sent: Monday, September 30, 2019 10:08 AM
To: Alfonso Vidal García <avidal@gmv.com<mailto:avidal@gmv.com>>;
keycloak-user@lists.jboss.org<mailto:keycloak-user@lists.jboss.org
Subject: Re: [keycloak-user] Keycloak does not found SPI User Storage provider
I suppose that mentioned class
"gcs.fds.focusoc.keycloak.spi.LoginStorageProvide" is available in your
module?
If yes, I suppose that issue is, that your provider uses some dependencies, which are not
declared in jboss-deployment-structure.xml file or as dependencies of your module. You may
take a look at quickstarts or documentation for more details.
Marek
On 30. 09. 19 8:43, Alfonso Vidal García wrote:
Good morning,
I have configured a Spring Boot project with connection to Keycloak,
and also I want to install a Custom SPI User Provider external to Keycloak.
I did all the steps to do the Provider and ProviderFactory, and also
the file in META-INF/services, and when I try to deploy on Wildfly
to
connect with Keycloak, fails,
12:52:26,079 ERROR [org.jboss.msc.service.fail] (MSC service thread
1-1) MSC000001: Failed to start service
jboss.deployment.unit."focusoc-0.0.1-SNAPSHOT.jar".POST_MODULE:
org.jboss.msc.service.StartException in service
jboss.deployment.unit."focusoc-0.0.1-SNAPSHOT.jar".POST_MODULE: WFLYSRV0153:
Failed to process phase POST_MODULE of deployment "focusoc-0.0.1-SNAPSHOT.jar"
at
>
org.jboss.as.server@9.0.2.Final//org.jboss.as.server.deployment.Deploy<mailto:org.jboss.as.server@9.0.2.Final//org.jboss.as.server.deployment.Deploy
mentUnitPhaseService.start(DeploymentUnitPhaseService.java:183)<mailto
:org.jboss.as.server@9.0.2.Final//org.jboss.as.server.deployment.Deplo
> ymentUnitPhaseService.start(DeploymentUnitPhaseService.java:183)
at
>
org.jboss.msc@1.4.8.Final//org.jboss.msc.service.ServiceControllerImpl<mailto:org.jboss.msc@1.4.8.Final//org.jboss.msc.service.ServiceControllerImpl
$StartTask.startService(ServiceControllerImpl.java:1737)<mailto:org.jb
>
oss.msc@1.4.8.Final//org.jboss.msc.service.ServiceControllerImpl$Start<mailto:oss.msc@1.4.8.Final//org.jboss.msc.service.ServiceControllerImpl$Start
> Task.startService(ServiceControllerImpl.java:1737)
at
>
org.jboss.msc@1.4.8.Final//org.jboss.msc.service.ServiceControllerImpl<mailto:org.jboss.msc@1.4.8.Final//org.jboss.msc.service.ServiceControllerImpl
$StartTask.execute(ServiceControllerImpl.java:1699)<mailto:org.jboss.m
sc@1.4.8.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask<mailto:sc@1.4.8.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask>.
> execute(ServiceControllerImpl.java:1699)
at
>
org.jboss.msc@1.4.8.Final//org.jboss.msc.service.ServiceControllerImpl<mailto:org.jboss.msc@1.4.8.Final//org.jboss.msc.service.ServiceControllerImpl
$ControllerTask.run(ServiceControllerImpl.java:1557)<mailto:org.jboss.
>
msc@1.4.8.Final//org.jboss.msc.service.ServiceControllerImpl$Controlle<mailto:msc@1.4.8.Final//org.jboss.msc.service.ServiceControllerImpl$Controlle
> rTask.run(ServiceControllerImpl.java:1557)
at
>
org.jboss.threads@2.3.3.Final//org.jboss.threads.ContextClassLoaderSav<mailto:org.jboss.threads@2.3.3.Final//org.jboss.threads.ContextClassLoaderSav
ingRunnable.run(ContextClassLoaderSavingRunnable.java:35)<mailto:org.j
>
boss.threads@2.3.3.Final//org.jboss.threads.ContextClassLoaderSavingRu<mailto:boss.threads@2.3.3.Final//org.jboss.threads.ContextClassLoaderSavingRu
> nnable.run(ContextClassLoaderSavingRunnable.java:35)
at
>
org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor<mailto:org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor
.safeRun(EnhancedQueueExecutor.java:1982)<mailto:org.jboss.threads@2.3
.3.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueu
> eExecutor.java:1982)
at
>
org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor<mailto:org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor
$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)<mailto:org.jbos
>
s.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadB<mailto:s.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadB
> ody.doRunTask(EnhancedQueueExecutor.java:1486)
at
>
org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor<mailto:org.jboss.threads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor
$ThreadBody.run(EnhancedQueueExecutor.java:1377)<mailto:org.jboss.thre
>
ads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.ru<mailto:ads@2.3.3.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.ru
> n(EnhancedQueueExecutor.java:1377)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by:
org.jboss.as.server.deployment.DeploymentUnitProcessingException:
java.lang.ClassNotFoundException:
gcs.fds.focusoc.keycloak.spi.LoginStorageProvider from [Module
"deployment.focusoc-0.0.1-SNAPSHOT.jar" from Service Module
Loader]
at
>
org.jboss.as.ejb3@17.0.1.Final//org.jboss.as.ejb3.deployment.processor<mailto:org.jboss.as.ejb3@17.0.1.Final//org.jboss.as.ejb3.deployment.processor
s.BusinessViewAnnotationProcessor.getEjbClass(BusinessViewAnnotationPr
ocessor.java:240)<mailto:org.jboss.as.ejb3@17.0.1.Final//org.jboss.as.
ejb3.deployment.processors.BusinessViewAnnotationProcessor.getEjbClass
> (BusinessViewAnnotationProcessor.java:240)
at
>
org.jboss.as.ejb3@17.0.1.Final//org.jboss.as.ejb3.deployment.processor<mailto:org.jboss.as.ejb3@17.0.1.Final//org.jboss.as.ejb3.deployment.processor
s.BusinessViewAnnotationProcessor.deploy(BusinessViewAnnotationProcess
or.java:89)<mailto:org.jboss.as.ejb3@17.0.1.Final//org.jboss.as.ejb3.d
eployment.processors.BusinessViewAnnotationProcessor.deploy(BusinessVi
> ewAnnotationProcessor.java:89)
at
>
org.jboss.as.server@9.0.2.Final//org.jboss.as.server.deployment.Deploy<mailto:org.jboss.as.server@9.0.2.Final//org.jboss.as.server.deployment.Deploy
mentUnitPhaseService.start(DeploymentUnitPhaseService.java:176)<mailto
:org.jboss.as.server@9.0.2.Final//org.jboss.as.server.deployment.Deplo
> ymentUnitPhaseService.start(DeploymentUnitPhaseService.java:176)
... 8 more
Caused by: java.lang.ClassNotFoundException:
gcs.fds.focusoc.keycloak.spi.LoginStorageProvider from [Module
"deployment.focusoc-0.0.1-SNAPSHOT.jar" from Service Module
Loader]
at
org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:2
55)
at
org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(Conc
urrentClassLoader.java:410)
at
org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentCla
ssLoader.java:398)
at
org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoade
r.java:116)
at
>
org.jboss.as.ejb3@17.0.1.Final//org.jboss.as.ejb3.deployment.processor<mailto:org.jboss.as.ejb3@17.0.1.Final//org.jboss.as.ejb3.deployment.processor
s.BusinessViewAnnotationProcessor.getEjbClass(BusinessViewAnnotationPr
ocessor.java:238)<mailto:org.jboss.as.ejb3@17.0.1.Final//org.jboss.as.
ejb3.deployment.processors.BusinessViewAnnotationProcessor.getEjbClass
> (BusinessViewAnnotationProcessor.java:238)
... 10 more
12:52:26,081 ERROR [org.jboss.as.controller.management-operation]
(management-handler-thread - 8) WFLYCTL0013: Operation ("add") failed - address:
([("deployment" => "focusoc-0.0.1-SNAPSHOT.jar")]) - failure
description: {"WFLYCTL0080: Failed services" =>
{"jboss.deployment.unit.\"focusoc-0.0.1-SNAPSHOT.jar\".POST_MODULE"
=> "WFLYSRV0153: Failed to process phase POST_MODULE of deployment
\"focusoc-0.0.1-SNAPSHOT.jar\"
Caused by:
org.jboss.as.server.deployment.DeploymentUnitProcessingException:
java.lang.ClassNotFoundException:
gcs.fds.focusoc.keycloak.spi.LoginStorageProvider from [Module
\"deployment.focusoc-0.0.1-SNAPSHOT.jar\" from Service
Module Loader]
Caused by: java.lang.ClassNotFoundException:
gcs.fds.focusoc.keycloak.spi.LoginStorageProvider from [Module
\"deployment.focusoc-0.0.1-SNAPSHOT.jar\" from Service
Module
Loader]"}}
12:52:26,082 ERROR [org.jboss.as.server] (management-handler-thread -
8) WFLYSRV0021: Deploy of deployment "focusoc-0.0.1-SNAPSHOT.jar" was rolled
back with the following failure message:
{"WFLYCTL0080: Failed services" =>
{"jboss.deployment.unit.\"focusoc-0.0.1-SNAPSHOT.jar\".POST_MODULE"
=> "WFLYSRV0153: Failed to process phase POST_MODULE of deployment
\"focusoc-0.0.1-SNAPSHOT.jar\"
Caused by:
org.jboss.as.server.deployment.DeploymentUnitProcessingException:
java.lang.ClassNotFoundException:
gcs.fds.focusoc.keycloak.spi.LoginStorageProvider from [Module
\"deployment.focusoc-0.0.1-SNAPSHOT.jar\" from Service
Module Loader]
Caused by: java.lang.ClassNotFoundException:
gcs.fds.focusoc.keycloak.spi.LoginStorageProvider from [Module
\"deployment.focusoc-0.0.1-SNAPSHOT.jar\" from Service
Module
Loader]"}}
I try to search in all internet about solutions about that, and I am
blocked, so If you could tell if anything is missing.
Thank you. Alfonso Vidal.
P Please consider the environment before printing this e-mail.
_______________________________________________
keycloak-user mailing list
> keycloak-user@lists.jboss.org<mailto:keycloak-user@lists.jboss.org
ailman_listinfo_keycloak-2Duser&d=DwIFaQ&c=CIoxZ4z5BqFvKvSGFOTo726QZIi
NTc_M9CmngT-Pla4&r=F6SAryNNUdjEYGb6lSnLGg&m=evbIMalPg_Vdnbkm-dkm2FOZuC
q3rpUJou89wpSzNBs&s=K_Dshihykr3bfV6bjl96vh7UROM0mFoFqftXPeS9vuA&e=
P Please consider the environment before printing this e-mail.