[keycloak-user] Error while connecting postgres User Storage spi

rohit chaudhary rohitchaudhary95 at gmail.com
Thu Apr 27 06:58:32 EDT 2017


Hi,

I am trying User storage spi with postgres db. It throws following error:

While running command *mvn clean install wildfly:deploy*

*Failed to execute goal
org.wildfly.plugins:wildfly-maven-plugin:1.1.0.Final:deploy (default-cli)
on project user-storage-jpa-example: Failed to execute goal deploy:
{"WFLYCTL0062: Composite operation failed and was rolled back. Steps that
failed:" => {"Operation step-1" => {"WFLYCTL0080: Failed services" =>
{"jboss.persistenceunit.\"user-storage-jpa-example.jar#user-storage-jpa-example\""
=> "org.jboss.msc.service.StartException in service
jboss.persistenceunit.\"user-storage-jpa-example.jar#user-storage-jpa-example\":
javax.persistence.PersistenceException: [PersistenceUnit:
user-storage-jpa-example] Unable to build Hibernate SessionFactory*
*[ERROR] Caused by: javax.persistence.PersistenceException:
[PersistenceUnit: user-storage-jpa-example] Unable to build Hibernate
SessionFactory*
*[ERROR] Caused by:
org.hibernate.tool.schema.spi.SchemaManagementException: Unable to execute
schema management to JDBC target [create table UserEntity (id varchar(255)
not null, email varchar(255), password varchar(255), phone varchar(255),
username varchar(255), primary key (id))]*
*[ERROR] Caused by: org.postgresql.util.PSQLException: ERROR: relation
\"userentity\" already exists"}}}}*


If i drop this table, it will create one but users are not imported.


And do I have to use UserEntity as my tablename or can I have a different
one?


Thanks,
Rohit


More information about the keycloak-user mailing list