Hi,
There's no possibility to delete users that come with default install?

Thanks

  • No labels

7 Comments

  1. Hi,

    This is the error that occurs when I try to delete a user:

    ERROR 06 Jul 2011 17:36:10 org.joget.directory.dao.UserDaoImpl  - Delete User Error!
    org.springframework.orm.hibernate3.HibernateOptimisticLockingFailureException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1; nested exception is org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
            at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:672)
            at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)
            at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:424)
            at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
            at org.springframework.orm.hibernate3.HibernateTemplate.flush(HibernateTemplate.java:890)
            at org.joget.commons.spring.model.AbstractSpringDao.delete(AbstractSpringDao.java:89)
            at org.joget.directory.dao.UserDaoImpl.deleteUser(UserDaoImpl.java:115)
            at sun.reflect.GeneratedMethodAccessor235.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:616)

    .....

    1. Hi,

      The above error is with respect to the JoGet's data source. I checked the MySQL data source, it is up and running. I also tried to delete the users directly from the database and it throws foreign key constraint error. I think it may be a bug.

      We have to wait to hear back from the JoGet team. In the meantime we can also try analyzing the root cause.

      - Arun

  2. Hi,

    Before to delete users you need to delete all associations, like groups, report to assignments, company's grade and other stuff. I did this but the error remains. I think the problem is that some control of integrity. We can reverse engineer the database and try to find this problem.

    I'll try this using mysql workbech.

  3. Hi,

    The path to delete users is:

    1) delete user employment association:

    delete from dir_employment where userId='tina';

    2) delete user role assigment:

    delete from dir_user_role where userId='tina';

    3) Finally, delete user:

    delete from dir_user where username='tina';

    I think the problem is on application that not remove this associations in correct order.

  4. Hi guys!

    Good morning from this part of the world.

    Appreciate your kind efforts in ironing this issue out. We have taken note of this issue and will be looking into it very soon!

  5. Hi guys, this issue is already fixed in the latest trunk. Please refer to GitHub for details of the code changes.