java.lang.IllegalArgumentException: username cannot be null or empty

Atlassian JIRA | Ben Stuart [Atlassian] | 7 months ago
  1. 0

    h3. Summary Application links fail with "username cannot be null or empty" when trying to enable 'user impersonation through 2-Legged OAuth'. This is a result of an empty Execute as user. We throw this stack trace because we try to check the group membership of an empty user, since it isn't filled in. h3. Environment Jira 6.4.3, 7.0.10 h3. Steps to Reproduce # Create application link with 2LO Authentication between JIRA and FishEye # Leave "The servers have the same set of users and usernames" unchecked. # Allow user impersonation through 2-Legged OAuth from FishEye > Incoming Authentication > OAuth h3. Expected Results This application link should be valid and the local instance will accept OAuth requests from the remote instance that do not have a user associated with them. Without an executing user these are essentially anonymous requests sent over a secure, trusted connection. These requests have no associated permissions and so cannot access information that is restricted by user permissions. h3. Actual Results The below exception is thrown in the atlassian-fisheye.log file: {noformat} 2016-05-11 09:13:46,265 ERROR [qtp2017797638-328 ] fisheye TotalityFilter-logExceptionDetails - Exception "username cannot be null or empty" (java.lang.IllegalArgumentException) while processing "/crucible/plugins/servlet/applinks/auth/conf/oauth/add-consumer-by-url/61b6191d-d412-3043-a96c-75b7bceaed1f" (Referer:"https://localhost:8446/crucible/plugins/servlet/applinks/auth/conf/oauth/add-consumer-by-url/61a6191d-d412-3043-a96c-75b7bceaed1f") java.lang.IllegalArgumentException: username cannot be null or empty at org.apache.commons.lang3.Validate.notEmpty(Validate.java:398) [commons-lang3-3.3.2.jar:3.3.2] at com.atlassian.crowd.directory.AbstractInternalDirectory.isUserDirectGroupMember(AbstractInternalDirectory.java:892) [crowd-persistence-2.8.5-m1.jar:?] at com.atlassian.crowd.directory.DbCachingRemoteDirectory.isUserDirectGroupMember(DbCachingRemoteDirectory.java:787) [crowd-core-2.8.5-m1.jar:?] at com.atlassian.crowd.manager.directory.RemoteDirectorySearcher.isUserDirectGroupMember(RemoteDirectorySearcher.java:54) [crowd-core-2.8.5-m1.jar:?] at com.atlassian.crowd.manager.directory.RemoteDirectorySearcher.isUserNestedGroupMember(RemoteDirectorySearcher.java:105) [crowd-core-2.8.5-m1.jar:?] at com.atlassian.crowd.manager.directory.DirectoryManagerGeneric.isUserNestedGroupMember(DirectoryManagerGeneric.java:862) [crowd-core-2.8.5-m1.jar:?] at sun.reflect.GeneratedMethodAccessor390.invoke(Unknown Source) [?:?] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [?:1.8.0_66] at java.lang.reflect.Method.invoke(Method.java:497) [?:1.8.0_66] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) [spring-aop-4.0.9.RELEASE.jar:4. {noformat} h3.Workaround # Setting the option 'servers have the same set of users'. # Fill in the "execute as" field on the JIRA side.

    Atlassian JIRA | 7 months ago | Ben Stuart [Atlassian]
    java.lang.IllegalArgumentException: username cannot be null or empty
  2. 0

    h3. Summary Application links fail with "username cannot be null or empty" when trying to enable 'user impersonation through 2-Legged OAuth'. This is a result of an empty Execute as user. We throw this stack trace because we try to check the group membership of an empty user, since it isn't filled in. h3. Environment Jira 6.4.3, 7.0.10 h3. Steps to Reproduce # Create application link with 2LO Authentication between JIRA and FishEye # Leave "The servers have the same set of users and usernames" unchecked. # Allow user impersonation through 2-Legged OAuth from FishEye > Incoming Authentication > OAuth h3. Expected Results This application link should be valid and the local instance will accept OAuth requests from the remote instance that do not have a user associated with them. Without an executing user these are essentially anonymous requests sent over a secure, trusted connection. These requests have no associated permissions and so cannot access information that is restricted by user permissions. h3. Actual Results The below exception is thrown in the atlassian-fisheye.log file: {noformat} 2016-05-11 09:13:46,265 ERROR [qtp2017797638-328 ] fisheye TotalityFilter-logExceptionDetails - Exception "username cannot be null or empty" (java.lang.IllegalArgumentException) while processing "/crucible/plugins/servlet/applinks/auth/conf/oauth/add-consumer-by-url/61b6191d-d412-3043-a96c-75b7bceaed1f" (Referer:"https://localhost:8446/crucible/plugins/servlet/applinks/auth/conf/oauth/add-consumer-by-url/61a6191d-d412-3043-a96c-75b7bceaed1f") java.lang.IllegalArgumentException: username cannot be null or empty at org.apache.commons.lang3.Validate.notEmpty(Validate.java:398) [commons-lang3-3.3.2.jar:3.3.2] at com.atlassian.crowd.directory.AbstractInternalDirectory.isUserDirectGroupMember(AbstractInternalDirectory.java:892) [crowd-persistence-2.8.5-m1.jar:?] at com.atlassian.crowd.directory.DbCachingRemoteDirectory.isUserDirectGroupMember(DbCachingRemoteDirectory.java:787) [crowd-core-2.8.5-m1.jar:?] at com.atlassian.crowd.manager.directory.RemoteDirectorySearcher.isUserDirectGroupMember(RemoteDirectorySearcher.java:54) [crowd-core-2.8.5-m1.jar:?] at com.atlassian.crowd.manager.directory.RemoteDirectorySearcher.isUserNestedGroupMember(RemoteDirectorySearcher.java:105) [crowd-core-2.8.5-m1.jar:?] at com.atlassian.crowd.manager.directory.DirectoryManagerGeneric.isUserNestedGroupMember(DirectoryManagerGeneric.java:862) [crowd-core-2.8.5-m1.jar:?] at sun.reflect.GeneratedMethodAccessor390.invoke(Unknown Source) [?:?] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [?:1.8.0_66] at java.lang.reflect.Method.invoke(Method.java:497) [?:1.8.0_66] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) [spring-aop-4.0.9.RELEASE.jar:4. {noformat} h3.Workaround # Setting the option 'servers have the same set of users'. # Fill in the "execute as" field on the JIRA side.

    Atlassian JIRA | 7 months ago | Ben Stuart [Atlassian]
    java.lang.IllegalArgumentException: username cannot be null or empty
  3. 0

    String constants (months and day of week) not working as expected

    GitHub | 1 year ago | michaelknigge
    java.lang.IllegalArgumentException: Values must not be empty
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    GitHub comment 27#117922987

    GitHub | 1 year ago | michaelknigge
    java.lang.IllegalArgumentException: Values must not be empty
  6. 0

    Illegal question mark value on cron pattern assumed valid.

    GitHub | 9 months ago | DanoOM
    java.lang.IllegalArgumentException: Values must not be empty

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      username cannot be null or empty

      at org.apache.commons.lang3.Validate.notEmpty()
    2. Commons Lang
      Validate.notEmpty
      1. org.apache.commons.lang3.Validate.notEmpty(Validate.java:398)[commons-lang3-3.3.2.jar:3.3.2]
      1 frame
    3. com.atlassian.crowd
      DirectoryManagerGeneric.isUserNestedGroupMember
      1. com.atlassian.crowd.directory.AbstractInternalDirectory.isUserDirectGroupMember(AbstractInternalDirectory.java:892)[crowd-persistence-2.8.5-m1.jar:?]
      2. com.atlassian.crowd.directory.DbCachingRemoteDirectory.isUserDirectGroupMember(DbCachingRemoteDirectory.java:787)[crowd-core-2.8.5-m1.jar:?]
      3. com.atlassian.crowd.manager.directory.RemoteDirectorySearcher.isUserDirectGroupMember(RemoteDirectorySearcher.java:54)[crowd-core-2.8.5-m1.jar:?]
      4. com.atlassian.crowd.manager.directory.RemoteDirectorySearcher.isUserNestedGroupMember(RemoteDirectorySearcher.java:105)[crowd-core-2.8.5-m1.jar:?]
      5. com.atlassian.crowd.manager.directory.DirectoryManagerGeneric.isUserNestedGroupMember(DirectoryManagerGeneric.java:862)[crowd-core-2.8.5-m1.jar:?]
      5 frames
    4. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor390.invoke(Unknown Source)[?:?]
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[?:1.8.0_66]
      3. java.lang.reflect.Method.invoke(Method.java:497)[?:1.8.0_66]
      3 frames