<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">It seems that you're trying to add
user, which already exists in DB. Can it be the case? <br>
<br>
If you want to update user, which already exists, you can instead
use something like:<br>
<br>
UserModel user =
session.userStorage().getUserByUsername("krenfro", realm);<br>
user.setFirstName("anything");<br>
...<br>
<br>
<br>
Marek<br>
<br>
On 27.5.2015 23:08, Kyle Renfro wrote:<br>
</div>
<blockquote
cite="mid:CAH8m7o_HPoYtKgKQsj8aU+KkdShPGfB=fkUZCSjn0EPB6MC5Bg@mail.gmail.com"
type="cite">
<div dir="ltr">I've deleted the db and started over. In my custom
federation provider, I changed the method I was using to add the
user to the keycloak database from:
<div>
<div class="gmail_extra"> UserModel addUser(RealmModel
realm, String id, String username, boolean addDefaultRoles);<br>
</div>
<div class="gmail_extra">to:<br>
</div>
<div class="gmail_extra"> UserModel addUser(RealmModel
realm, String username); <br>
</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">Reference: <a moz-do-not-send="true"
href="https://github.com/keycloak/keycloak/blob/1a433093339e40ec0272c827f8d4327fa7dbcae2/model/api/src/main/java/org/keycloak/models/UserProvider.java">https://github.com/keycloak/keycloak/blob/1a433093339e40ec0272c827f8d4327fa7dbcae2/model/api/src/main/java/org/keycloak/models/UserProvider.java</a></div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">This didn't make a significant
difference, but the error message is a bit different:</div>
<div class="gmail_extra">
<div class="gmail_extra">15:43:53,989 WARN
[org.hibernate.engine.jdbc.spi.SqlExceptionHelper]
(default task-96) SQL Error: 1062, SQLState: 23000</div>
<div class="gmail_extra">15:43:53,989 ERROR
[org.hibernate.engine.jdbc.spi.SqlExceptionHelper]
(default task-96) Duplicate entry
'872ff877-eea2-4d37-942e-e066690b136b-krenfro' for key
'UK_RU8TT6T700S9V50BU18WS5HA6'</div>
<div>...</div>
<div><br>
</div>
<div>The UK_RU8TT6T700S9V50BU18WS5HA6 key is only defined in
the USER_ENTITY table. </div>
<div><br>
</div>
<div>
<div>mysql> show indexes from USER_ENTITY;</div>
<div>+-------------+------------+------------------------------+--------------+------------------+-----------+-------------+----------+--------+------+------------+---------+---------------+</div>
<div>| Table | Non_unique | Key_name
| Seq_in_index | Column_name | Collation |
Cardinality | Sub_part | Packed | Null | Index_type |
Comment | Index_comment |</div>
<div>+-------------+------------+------------------------------+--------------+------------------+-----------+-------------+----------+--------+------+------------+---------+---------------+</div>
<div>| USER_ENTITY | 0 | PRIMARY
| 1 | ID | A |
885 | NULL | NULL | | BTREE |
| |</div>
<div>| USER_ENTITY | 0 |
UK_DYKN684SL8UP1CRFEI6ECKHD7 | 1 | REALM_ID
| A | NULL | NULL | NULL |
YES | BTREE | | |</div>
<div>| USER_ENTITY | 0 |
UK_DYKN684SL8UP1CRFEI6ECKHD7 | 2 |
EMAIL_CONSTRAINT | A | NULL | NULL |
NULL | YES | BTREE | | |</div>
<div>| USER_ENTITY | 0 |
UK_RU8TT6T700S9V50BU18WS5HA6 | 1 | REALM_ID
| A | NULL | NULL | NULL |
YES | BTREE | | |</div>
<div>| USER_ENTITY | 0 |
UK_RU8TT6T700S9V50BU18WS5HA6 | 2 | USERNAME
| A | NULL | NULL | NULL |
YES | BTREE | | |</div>
<div>+-------------+------------+------------------------------+--------------+------------------+-----------+-------------+----------+--------+------+------------+---------+---------------+</div>
</div>
<div><br>
</div>
<div>The 872ff877-eea2-4d37-942e-e066690b136b is the
realm_id in the 'krenfro' record.<br>
</div>
</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">thanks,</div>
<div class="gmail_extra">Kyle</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, May 27, 2015 at 9:31 AM,
Kyle Renfro <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:krenfro@real-comp.com" target="_blank">krenfro@real-comp.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr">
<div>
<div>
<div
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Keycloak
1.2.0-Final</div>
<div
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br>
</div>
<div
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">I
am evaluating Keycloak, and so far I am very
impressed. I have made good progress
implementing a custom federation provider. I
have full and periodic syncing implemented and
all is working except password recovery using an
e-mail address. Password recovery with a
username works. I'm not sure if my custom
provider is getting in the way.</div>
<div
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br>
</div>
<div
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">From
the logs:</div>
<div
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">...</div>
<div
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Caused
by:
com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException:
Duplicate entry '1' for key 'PRIMARY'<br>
</div>
<div
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br>
</div>
<div
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Here
is the the record from the keycloak SQL database
I am attempting pw recovery on:<br>
</div>
<div
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br>
</div>
<div style="background-color:rgb(255,255,255)">
<div><b>mysql> select * from USER_ENTITY
where id = 1;</b></div>
<div>+----+-----------------------+-----------------------+----------------+---------+--------------------------------------+------------+-------------+--------------------------------------+------+----------+</div>
<div>| ID | EMAIL |
EMAIL_CONSTRAINT | EMAIL_VERIFIED |
ENABLED | FEDERATION_LINK
| FIRST_NAME | LAST_NAME | REALM_ID
| TOTP | USERNAME |</div>
<div>+----+-----------------------+-----------------------+----------------+---------+--------------------------------------+------------+-------------+--------------------------------------+------+----------+</div>
<div>| 1 | <a moz-do-not-send="true"
href="mailto:krenfro@real-comp.com"
target="_blank">krenfro@real-comp.com</a> |
<a moz-do-not-send="true"
href="mailto:krenfro@real-comp.com"
target="_blank">krenfro@real-comp.com</a> |
| |
7675cab9-ad38-420c-aa1f-df7a869c50bb | NULL
| Kyle Renfro |
893a55ff-7aac-448f-b7b6-704a26997dfe | |
krenfro |</div>
<div>+----+-----------------------+-----------------------+----------------+---------+--------------------------------------+------------+-------------+--------------------------------------+------+----------+</div>
<div>1 row in set, 1 warning (0.00 sec)</div>
<div><br>
</div>
<div><br>
</div>
<div>There is a SQL warning, not sure if it is
related:</div>
<div><b>mysql> show warnings;</b></div>
<div>+---------+------+--------------------------------------------------------------------------+</div>
<div>| Level | Code | Message
|</div>
<div>+---------+------+--------------------------------------------------------------------------+</div>
<div>| Warning | 1292 | Truncated incorrect
DOUBLE value:
'7cd31fee-2398-46cc-92d9-58eae6b32fb2' |</div>
<div>+---------+------+--------------------------------------------------------------------------+</div>
<div>1 row in set (0.00 sec)</div>
<div
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><br>
</div>
<div
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><br>
</div>
<div
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">If
deleting the db and starting from scratch is
recommended, that is fine.</div>
<div
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><br>
</div>
<div
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">Thanks
in advance!</div>
<div
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">Kyle</div>
<div
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px"><br>
</div>
</div>
<div
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br>
</div>
<div
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br>
</div>
<div
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br>
</div>
<div
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><b>Here
is full stack trace and keycloak logs:</b></div>
<div
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<div>09:14:13,886 WARN
[org.hibernate.engine.jdbc.spi.SqlExceptionHelper]
(default task-109) SQL Error: 1062, SQLState:
23000</div>
<div>09:14:13,887 ERROR
[org.hibernate.engine.jdbc.spi.SqlExceptionHelper]
(default task-109) Duplicate entry '1' for key
'PRIMARY'</div>
<div>09:14:13,887 INFO
[org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl]
(default task-109) HHH000010: On release of
batch it still contained JDBC statements</div>
<div>09:14:13,888 ERROR [io.undertow.request]
(default task-109) UT005023: Exception
handling request to
/auth/realms/test/login-actions/password-reset:
java.lang.RuntimeException: request path:
/auth/realms/test/login-actions/password-reset</div>
<div><span style="white-space:pre-wrap"> </span>at
org.keycloak.services.filters.KeycloakSessionServletFilter.doFilter(KeycloakSessionServletFilter.java:54)
[keycloak-services-1.2.0.Final.jar:1.2.0.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
[undertow-servlet-1.1.0.Final.jar:1.1.0.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132)
[undertow-servlet-1.1.0.Final.jar:1.1.0.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:85)
[undertow-servlet-1.1.0.Final.jar:1.1.0.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61)
[undertow-servlet-1.1.0.Final.jar:1.1.0.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
[undertow-servlet-1.1.0.Final.jar:1.1.0.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)</div>
<div><span style="white-space:pre-wrap"> </span>at
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
[undertow-core-1.1.0.Final.jar:1.1.0.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
[undertow-servlet-1.1.0.Final.jar:1.1.0.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56)
[undertow-servlet-1.1.0.Final.jar:1.1.0.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
[undertow-core-1.1.0.Final.jar:1.1.0.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45)
[undertow-core-1.1.0.Final.jar:1.1.0.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:63)
[undertow-servlet-1.1.0.Final.jar:1.1.0.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58)
[undertow-core-1.1.0.Final.jar:1.1.0.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70)
[undertow-servlet-1.1.0.Final.jar:1.1.0.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76)
[undertow-core-1.1.0.Final.jar:1.1.0.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
[undertow-core-1.1.0.Final.jar:1.1.0.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)</div>
<div><span style="white-space:pre-wrap"> </span>at
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
[undertow-core-1.1.0.Final.jar:1.1.0.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
[undertow-core-1.1.0.Final.jar:1.1.0.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:261)
[undertow-servlet-1.1.0.Final.jar:1.1.0.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:247)
[undertow-servlet-1.1.0.Final.jar:1.1.0.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:76)
[undertow-servlet-1.1.0.Final.jar:1.1.0.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:166)
[undertow-servlet-1.1.0.Final.jar:1.1.0.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
io.undertow.server.Connectors.executeRootHandler(Connectors.java:197)
[undertow-core-1.1.0.Final.jar:1.1.0.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:759)
[undertow-core-1.1.0.Final.jar:1.1.0.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[rt.jar:1.7.0_80]</div>
<div><span style="white-space:pre-wrap"> </span>at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[rt.jar:1.7.0_80]</div>
<div><span style="white-space:pre-wrap"> </span>at
java.lang.Thread.run(Thread.java:745)
[rt.jar:1.7.0_80]</div>
<div>Caused by:
org.jboss.resteasy.spi.UnhandledException:
org.keycloak.models.ModelDuplicateException:
javax.persistence.PersistenceException:
org.hibernate.exception.ConstraintViolationException:
could not execute statement</div>
<div><span style="white-space:pre-wrap"> </span>at
org.jboss.resteasy.core.ExceptionHandler.handleApplicationException(ExceptionHandler.java:76)
[resteasy-jaxrs-3.0.10.Final.jar:]</div>
<div><span style="white-space:pre-wrap"> </span>at
org.jboss.resteasy.core.ExceptionHandler.handleException(ExceptionHandler.java:212)
[resteasy-jaxrs-3.0.10.Final.jar:]</div>
<div><span style="white-space:pre-wrap"> </span>at
org.jboss.resteasy.core.SynchronousDispatcher.writeException(SynchronousDispatcher.java:149)
[resteasy-jaxrs-3.0.10.Final.jar:]</div>
<div><span style="white-space:pre-wrap"> </span>at
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:372)
[resteasy-jaxrs-3.0.10.Final.jar:]</div>
<div><span style="white-space:pre-wrap"> </span>at
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179)
[resteasy-jaxrs-3.0.10.Final.jar:]</div>
<div><span style="white-space:pre-wrap"> </span>at
org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220)
[resteasy-jaxrs-3.0.10.Final.jar:]</div>
<div><span style="white-space:pre-wrap"> </span>at
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)
[resteasy-jaxrs-3.0.10.Final.jar:]</div>
<div><span style="white-space:pre-wrap"> </span>at
org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)
[resteasy-jaxrs-3.0.10.Final.jar:]</div>
<div><span style="white-space:pre-wrap"> </span>at
javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
[jboss-servlet-api_3.1_spec-1.0.0.Final.jar:1.0.0.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
[undertow-servlet-1.1.0.Final.jar:1.1.0.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:130)
[undertow-servlet-1.1.0.Final.jar:1.1.0.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
org.keycloak.services.filters.ClientConnectionFilter.doFilter(ClientConnectionFilter.java:41)
[keycloak-services-1.2.0.Final.jar:1.2.0.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60)
[undertow-servlet-1.1.0.Final.jar:1.1.0.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132)
[undertow-servlet-1.1.0.Final.jar:1.1.0.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
org.keycloak.services.filters.KeycloakSessionServletFilter.doFilter(KeycloakSessionServletFilter.java:40)
[keycloak-services-1.2.0.Final.jar:1.2.0.Final]</div>
<div><span style="white-space:pre-wrap"> </span>...
28 more</div>
<div>Caused by:
org.keycloak.models.ModelDuplicateException:
javax.persistence.PersistenceException:
org.hibernate.exception.ConstraintViolationException:
could not execute statement</div>
<div><span style="white-space:pre-wrap"> </span>at
org.keycloak.connections.jpa.PersistenceExceptionConverter.convert(PersistenceExceptionConverter.java:40)
[keycloak-connections-jpa-1.2.0.Final.jar:1.2.0.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
org.keycloak.connections.jpa.PersistenceExceptionConverter.invoke(PersistenceExceptionConverter.java:34)
[keycloak-connections-jpa-1.2.0.Final.jar:1.2.0.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
com.sun.proxy.$Proxy52.flush(Unknown Source)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.keycloak.models.jpa.JpaUserProvider.addUser(JpaUserProvider.java:57)
[keycloak-model-jpa-1.2.0.Final.jar:1.2.0.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
org.keycloak.models.cache.DefaultCacheUserProvider.addUser(DefaultCacheUserProvider.java:254)
[keycloak-invalidation-cache-model-1.2.0.Final.jar:1.2.0.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
com.realcomp.keycloak.UserServiceFederationProvider.importUser(UserServiceFederationProvider.java:249)</div>
<div><span style="white-space:pre-wrap"> </span>at
com.realcomp.keycloak.UserServiceFederationProvider.getUserByUsername(UserServiceFederationProvider.java:276)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.keycloak.models.UserFederationManager.getUserByUsername(UserFederationManager.java:155)
[keycloak-model-api-1.2.0.Final.jar:1.2.0.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
org.keycloak.services.resources.LoginActionsService.sendPasswordReset(LoginActionsService.java:908)
[keycloak-services-1.2.0.Final.jar:1.2.0.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method) [rt.jar:1.7.0_80]</div>
<div><span style="white-space:pre-wrap"> </span>at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[rt.jar:1.7.0_80]</div>
<div><span style="white-space:pre-wrap"> </span>at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[rt.jar:1.7.0_80]</div>
<div><span style="white-space:pre-wrap"> </span>at
java.lang.reflect.Method.invoke(Method.java:606)
[rt.jar:1.7.0_80]</div>
<div><span style="white-space:pre-wrap"> </span>at
org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137)
[resteasy-jaxrs-3.0.10.Final.jar:]</div>
<div><span style="white-space:pre-wrap"> </span>at
org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:296)
[resteasy-jaxrs-3.0.10.Final.jar:]</div>
<div><span style="white-space:pre-wrap"> </span>at
org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:250)
[resteasy-jaxrs-3.0.10.Final.jar:]</div>
<div><span style="white-space:pre-wrap"> </span>at
org.jboss.resteasy.core.ResourceLocatorInvoker.invokeOnTargetObject(ResourceLocatorInvoker.java:140)
[resteasy-jaxrs-3.0.10.Final.jar:]</div>
<div><span style="white-space:pre-wrap"> </span>at
org.jboss.resteasy.core.ResourceLocatorInvoker.invoke(ResourceLocatorInvoker.java:103)
[resteasy-jaxrs-3.0.10.Final.jar:]</div>
<div><span style="white-space:pre-wrap"> </span>at
org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)
[resteasy-jaxrs-3.0.10.Final.jar:]</div>
<div><span style="white-space:pre-wrap"> </span>...
39 more</div>
<div>Caused by:
javax.persistence.PersistenceException:
org.hibernate.exception.ConstraintViolationException:
could not execute statement</div>
<div><span style="white-space:pre-wrap"> </span>at
org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1763)
[hibernate-entitymanager-4.3.7.Final.jar:4.3.7.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1677)
[hibernate-entitymanager-4.3.7.Final.jar:4.3.7.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1683)
[hibernate-entitymanager-4.3.7.Final.jar:4.3.7.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
org.hibernate.jpa.spi.AbstractEntityManagerImpl.flush(AbstractEntityManagerImpl.java:1338)
[hibernate-entitymanager-4.3.7.Final.jar:4.3.7.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method) [rt.jar:1.7.0_80]</div>
<div><span style="white-space:pre-wrap"> </span>at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[rt.jar:1.7.0_80]</div>
<div><span style="white-space:pre-wrap"> </span>at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[rt.jar:1.7.0_80]</div>
<div><span style="white-space:pre-wrap"> </span>at
java.lang.reflect.Method.invoke(Method.java:606)
[rt.jar:1.7.0_80]</div>
<div><span style="white-space:pre-wrap"> </span>at
org.keycloak.connections.jpa.PersistenceExceptionConverter.invoke(PersistenceExceptionConverter.java:32)
[keycloak-connections-jpa-1.2.0.Final.jar:1.2.0.Final]</div>
<div><span style="white-space:pre-wrap"> </span>...
56 more</div>
<div>Caused by:
org.hibernate.exception.ConstraintViolationException:
could not execute statement</div>
<div><span style="white-space:pre-wrap"> </span>at
org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:72)
[hibernate-core-4.3.7.Final.jar:4.3.7.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49)
[hibernate-core-4.3.7.Final.jar:4.3.7.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:126)
[hibernate-core-4.3.7.Final.jar:4.3.7.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:112)
[hibernate-core-4.3.7.Final.jar:4.3.7.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:211)
[hibernate-core-4.3.7.Final.jar:4.3.7.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:62)
[hibernate-core-4.3.7.Final.jar:4.3.7.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3124)
[hibernate-core-4.3.7.Final.jar:4.3.7.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3581)
[hibernate-core-4.3.7.Final.jar:4.3.7.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:104)
[hibernate-core-4.3.7.Final.jar:4.3.7.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:463)
[hibernate-core-4.3.7.Final.jar:4.3.7.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:349)
[hibernate-core-4.3.7.Final.jar:4.3.7.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:350)
[hibernate-core-4.3.7.Final.jar:4.3.7.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:56)
[hibernate-core-4.3.7.Final.jar:4.3.7.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1222)
[hibernate-core-4.3.7.Final.jar:4.3.7.Final]</div>
<div><span style="white-space:pre-wrap"> </span>at
org.hibernate.jpa.spi.AbstractEntityManagerImpl.flush(AbstractEntityManagerImpl.java:1335)
[hibernate-entitymanager-4.3.7.Final.jar:4.3.7.Final]</div>
<div><span style="white-space:pre-wrap"> </span>...
61 more</div>
<div>Caused by:
com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException:
Duplicate entry '1' for key 'PRIMARY'</div>
<div><span style="white-space:pre-wrap"> </span>at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method) [rt.jar:1.7.0_80]</div>
<div><span style="white-space:pre-wrap"> </span>at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
[rt.jar:1.7.0_80]</div>
<div><span style="white-space:pre-wrap"> </span>at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[rt.jar:1.7.0_80]</div>
<div><span style="white-space:pre-wrap"> </span>at
java.lang.reflect.Constructor.newInstance(Constructor.java:526)
[rt.jar:1.7.0_80]</div>
<div><span style="white-space:pre-wrap"> </span>at
com.mysql.jdbc.Util.handleNewInstance(Util.java:411)</div>
<div><span style="white-space:pre-wrap"> </span>at
com.mysql.jdbc.Util.getInstance(Util.java:386)</div>
<div><span style="white-space:pre-wrap"> </span>at
com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1039)</div>
<div><span style="white-space:pre-wrap"> </span>at
com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3609)</div>
<div><span style="white-space:pre-wrap"> </span>at
com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3541)</div>
<div><span style="white-space:pre-wrap"> </span>at
com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2002)</div>
<div><span style="white-space:pre-wrap"> </span>at
com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2163)</div>
<div><span style="white-space:pre-wrap"> </span>at
com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2624)</div>
<div><span style="white-space:pre-wrap"> </span>at
com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2127)</div>
<div><span style="white-space:pre-wrap"> </span>at
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2427)</div>
<div><span style="white-space:pre-wrap"> </span>at
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2345)</div>
<div><span style="white-space:pre-wrap"> </span>at
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2330)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:493)</div>
<div><span style="white-space:pre-wrap"> </span>at
org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:208)
[hibernate-core-4.3.7.Final.jar:4.3.7.Final]</div>
<div><span style="white-space:pre-wrap"> </span>...
71 more</div>
<div><br>
</div>
</div>
<div
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br>
</div>
<div
style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
keycloak-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:keycloak-user@lists.jboss.org">keycloak-user@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/keycloak-user">https://lists.jboss.org/mailman/listinfo/keycloak-user</a></pre>
</blockquote>
<br>
</body>
</html>