com.cenqua.fisheye.rep.DbException: User named "djdch" already exists.

Atlassian JIRA | Tom Davies [Atlassian] | 5 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    If a user logs in with a username containing upper case characters, but the external auth system is case independent, they may get an error like: com.cenqua.fisheye.rep.DbException: User named "djdch" already exists. at com.cenqua.fisheye.user.DefaultUserManager$19.write(DefaultUserManager.java:1251) at com.cenqua.fisheye.user.DefaultUserManager$19.write(DefaultUserManager.java:1245) at com.cenqua.fisheye.config.DB0Handle.write(DB0Handle.java:96) at com.cenqua.fisheye.user.DefaultUserManager.addUserImpl(DefaultUserManager.java:1245) at com.cenqua.fisheye.user.DefaultUserManager.importUser(DefaultUserManager.java:634) at com.cenqua.fisheye.user.DefaultUserManager.getOrImportUser(DefaultUserManager.java:614) at com.cenqua.fisheye.user.DefaultUserManager.loginWithSanitizedUserName(DefaultUserManager.java:432) at com.cenqua.fisheye.user.DefaultUserManager.login(DefaultUserManager.java:407) at sun.reflect.GeneratedMethodAccessor412.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:196) at $Proxy40.login(Unknown Source) at com.cenqua.fisheye.web.LoginServlet.login(LoginServlet.java:108) when they login. This is because the initial check to see if the user exists uses the mixed case name, and FeCru is case sensitive, but the name used to create the user is that returned by the external auth, which is mapped to lower case. We should always use the name provided by the user to create the local user, not the name returned by the external auth system, or should always map user names to lower case when external auth is used (which would probably not be backward compatible).

    Atlassian JIRA | 5 years ago | Tom Davies [Atlassian]
    com.cenqua.fisheye.rep.DbException: User named "djdch" already exists.
  2. 0

    If a user logs in with a username containing upper case characters, but the external auth system is case independent, they may get an error like: com.cenqua.fisheye.rep.DbException: User named "djdch" already exists. at com.cenqua.fisheye.user.DefaultUserManager$19.write(DefaultUserManager.java:1251) at com.cenqua.fisheye.user.DefaultUserManager$19.write(DefaultUserManager.java:1245) at com.cenqua.fisheye.config.DB0Handle.write(DB0Handle.java:96) at com.cenqua.fisheye.user.DefaultUserManager.addUserImpl(DefaultUserManager.java:1245) at com.cenqua.fisheye.user.DefaultUserManager.importUser(DefaultUserManager.java:634) at com.cenqua.fisheye.user.DefaultUserManager.getOrImportUser(DefaultUserManager.java:614) at com.cenqua.fisheye.user.DefaultUserManager.loginWithSanitizedUserName(DefaultUserManager.java:432) at com.cenqua.fisheye.user.DefaultUserManager.login(DefaultUserManager.java:407) at sun.reflect.GeneratedMethodAccessor412.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:196) at $Proxy40.login(Unknown Source) at com.cenqua.fisheye.web.LoginServlet.login(LoginServlet.java:108) when they login. This is because the initial check to see if the user exists uses the mixed case name, and FeCru is case sensitive, but the name used to create the user is that returned by the external auth, which is mapped to lower case. We should always use the name provided by the user to create the local user, not the name returned by the external auth system, or should always map user names to lower case when external auth is used (which would probably not be backward compatible).

    Atlassian JIRA | 5 years ago | Tom Davies [Atlassian]
    com.cenqua.fisheye.rep.DbException: User named "djdch" already exists.

    Root Cause Analysis

    1. com.cenqua.fisheye.rep.DbException

      User named "djdch" already exists.

      at com.cenqua.fisheye.user.DefaultUserManager$19.write()
    2. com.cenqua.fisheye
      DefaultUserManager.login
      1. com.cenqua.fisheye.user.DefaultUserManager$19.write(DefaultUserManager.java:1251)
      2. com.cenqua.fisheye.user.DefaultUserManager$19.write(DefaultUserManager.java:1245)
      3. com.cenqua.fisheye.config.DB0Handle.write(DB0Handle.java:96)
      4. com.cenqua.fisheye.user.DefaultUserManager.addUserImpl(DefaultUserManager.java:1245)
      5. com.cenqua.fisheye.user.DefaultUserManager.importUser(DefaultUserManager.java:634)
      6. com.cenqua.fisheye.user.DefaultUserManager.getOrImportUser(DefaultUserManager.java:614)
      7. com.cenqua.fisheye.user.DefaultUserManager.loginWithSanitizedUserName(DefaultUserManager.java:432)
      8. com.cenqua.fisheye.user.DefaultUserManager.login(DefaultUserManager.java:407)
      8 frames
    3. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor412.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      3. java.lang.reflect.Method.invoke(Unknown Source)
      3 frames
    4. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
      2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:196)
      2 frames
    5. Unknown
      $Proxy40.login
      1. $Proxy40.login(Unknown Source)
      1 frame
    6. com.cenqua.fisheye
      LoginServlet.login
      1. com.cenqua.fisheye.web.LoginServlet.login(LoginServlet.java:108)
      1 frame