Here are the logs of error for the example of SRC_Carestream (when clickin gon the "Delet" icon after assigning all his systems to another user):
2009-09-29 17:15:01,240 INFO [net.ihe.gazelle.tm.users.action.UserManagerTM] (http-0.0.0.0-8080-2) setSelectedUserForDelete : User(SRC_Carestream)
2009-09-29 17:15:01,240 INFO [net.ihe.gazelle.tm.users.action.UserManagerTM] (http-0.0.0.0-8080-2) setSelectedUser : 11
2009-09-29 17:15:01,240 INFO [net.ihe.gazelle.tm.users.action.UserManagerTM] (http-0.0.0.0-8080-2) setSelectedUser : The Manager of Pix Source Carestream
2009-09-29 17:15:01,271 INFO [net.ihe.gazelle.tm.users.action.UserManagerTM] (http-0.0.0.0-8080-2) Check user before deleting : This user is owner of 0 system(s)
2009-09-29 17:15:01,333 INFO [net.ihe.gazelle.users.action.UserManager] (http-0.0.0.0-8080-2) getSelectedUser : User(SRC_Carestream)
2009-09-29 17:15:01,333 INFO [net.ihe.gazelle.users.action.UserManager] (http-0.0.0.0-8080-2) getSelectedUser : User(SRC_Carestream)
2009-09-29 17:15:01,333 INFO [net.ihe.gazelle.users.action.UserManager] (http-0.0.0.0-8080-2) getSelectedUser : User(SRC_Carestream)
2009-09-29 17:15:07,430 INFO [net.ihe.gazelle.users.action.UserManager] (http-0.0.0.0-8080-2) Selected User to delete : The Manager of Pix Source Carestream
2009-09-29 17:15:07,430 INFO [net.ihe.gazelle.users.action.UserManager] (http-0.0.0.0-8080-2) delete user : User(SRC_Carestream)
2009-09-29 17:15:07,445 INFO [net.ihe.gazelle.users.action.UserManager] (http-0.0.0.0-8080-2) delete user name : The Manager of Pix Source Carestream
2009-09-29 17:15:07,445 INFO [net.ihe.gazelle.users.action.UserManager] (http-0.0.0.0-8080-2) listAllUsers
2009-09-29 17:15:07,445 WARN [org.hibernate.util.JDBCExceptionReporter] (http-0.0.0.0-8080-2) SQL Error: 0, SQLState: 23503
2009-09-29 17:15:07,461 ERROR [org.hibernate.util.JDBCExceptionReporter] (http-0.0.0.0-8080-2) L'élément du batch 0 delete from usr_users where id=11 a été annulé.
Appeler getNextException pour en connaître la cause.
2009-09-29 17:15:07,461 WARN [org.hibernate.util.JDBCExceptionReporter] (http-0.0.0.0-8080-2) SQL Error: 0, SQLState: 23503
2009-09-29 17:15:07,461 ERROR [org.hibernate.util.JDBCExceptionReporter] (http-0.0.0.0-8080-2) ERREUR: UPDATE ou DELETE sur la table « usr_users » viole la
contrainte de clé étrangère
« fk3942132496e9f6ac » de la table « tm_system_in_session_user »
Détail : La clé (id)=(11) est toujours référencée à partir de la table « tm_system_in_session_user ».
2009-09-29 17:15:07,477 ERROR [org.hibernate.event.def.AbstractFlushingEventListener] (http-0.0.0.0-8080-2) Could not synchronize database state with session
org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:94)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:266)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:172)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:64)
at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:996)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1141)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:67)
at net.ihe.gazelle.users.model.User.listAllUsers(User.java:776)
at net.ihe.gazelle.users.action.UserManager.findUsersForCompany(UserManager.java:235)
at net.ihe.gazelle.users.action.UserManager.deleteUser(UserManager.java:1190)
at net.ihe.gazelle.users.action.UserManager.deleteSelectedUser(UserManager.java:1212)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.aop.joinpoint.MethodInvocation.invokeTarget(MethodInvocation.java:122)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)
at org.jboss.ejb3.EJBContainerInvocationWrapper.invokeNext(EJBContainerInvocationWrapper.java:69)
at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor$InvocationContext.proceed(InvocationContextInterceptor.java:138)