java.lang.RuntimeException: Could not find a user <username>.

Atlassian JIRA | Gurleen Anand [Atlassian] | 4 years ago
  1. 0

    Branch permissions fail for those external users (user management delegated to JIRA), who have been not yet logged into Stash. After synchronization, the users are fetched successfully into Stash, but since they haven't logged in yet, branch permissions for all such users fails with "... is not a valid user" error. Does not effect local users. Logs: {noformat} 2013-01-25 13:50:58,773 ERROR [scheduler_Worker-3] c.a.e.i.AsynchronousAbleEventDispatcher There was an exception thrown trying to dispatch event 'com.atlassian.crowd.event.user.UserCreatedFromDirectorySynchronisationEvent@327ef53d' from the invoker 'SingleParameterMethodListenerInvoker{method=public void com.atlassian.stash.internal.crowd.UserCreatedAttributeBootstrapper.handleEvent(com.atlassian.crowd.event.user.UserCreatedEvent), listener=com.atlassian.stash.internal.crowd.UserCreatedAttributeBootstrapper@7407bedc}'. java.lang.RuntimeException: Could not find a user <username>. at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:54) ~[atlassian-event-2.2.1.jar:na] at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$2.run(AsynchronousAbleEventDispatcher.java:66) ~[atlassian-event-2.2.1.jar:na] at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$1.execute(AsynchronousAbleEventDispatcher.java:32) [atlassian-event-2.2.1.jar:na] at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.dispatch(AsynchronousAbleEventDispatcher.java:60) [atlassian-event-2.2.1.jar:na] at com.atlassian.event.internal.LockFreeEventPublisher$Publisher.dispatch(LockFreeEventPublisher.java:227) [atlassian-event-2.2.1.jar:na] at com.atlassian.event.internal.LockFreeEventPublisher.publish(LockFreeEventPublisher.java:82) [atlassian-event-2.2.1.jar:na] at com.atlassian.stash.internal.event.EventPublisherImpl.publish(EventPublisherImpl.java:74) [stash-platform-2.0.2.jar:na] at com.atlassian.crowd.directory.DbCachingRemoteChangeOperations.publishEvent(DbCachingRemoteChangeOperations.java:945) [crowd-core-2.5.3-m1.jar:na] at com.atlassian.crowd.directory.DbCachingRemoteChangeOperations.addUsers(DbCachingRemoteChangeOperations.java:178) [crowd-core-2.5.3-m1.jar:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_33] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_33] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_33] at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_33] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) [spring-tx-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at com.atlassian.crowd.directory.$Proxy829.addUsers(Unknown Source) [na:na] at com.atlassian.crowd.directory.DirectoryCacheImplUsingChangeOperations.addOrUpdateCachedUsers(DirectoryCacheImplUsingChangeOperations.java:56) [crowd-core-2.5.3-m1.jar:na] at com.atlassian.crowd.directory.ldap.cache.RemoteDirectoryCacheRefresher.synchroniseAllUsers(RemoteDirectoryCacheRefresher.java:65) [crowd-ldap-2.5.3-m1.jar:na] at com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseAll(AbstractCacheRefresher.java:83) [crowd-ldap-2.5.3-m1.jar:na] at com.atlassian.crowd.directory.ldap.cache.EventTokenChangedCacheRefresher.synchroniseAll(EventTokenChangedCacheRefresher.java:60) [crowd-ldap-2.5.3-m1.jar:na] at com.atlassian.crowd.directory.DbCachingRemoteDirectory.synchroniseCache(DbCachingRemoteDirectory.java:620) [crowd-core-2.5.3-m1.jar:na] at com.atlassian.crowd.manager.directory.DirectorySynchroniserImpl.synchronise(DirectorySynchroniserImpl.java:63) [crowd-core-2.5.3-m1.jar:na] at com.atlassian.crowd.directory.DbCachingDirectoryPoller.pollChanges(DbCachingDirectoryPoller.java:50) [crowd-core-2.5.3-m1.jar:na] at com.atlassian.crowd.manager.directory.monitor.poller.DirectoryPollerJobBean.executeInternal(DirectoryPollerJobBean.java:29) [crowd-core-2.5.3-m1.jar:na] at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:113) [spring-context-support-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.quartz.core.JobRunShell.run(JobRunShell.java:223) [quartz-1.8.6.jar:na] at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549) [quartz-1.8.6.jar:na] Caused by: com.atlassian.stash.exception.NoSuchUserException: Could not find a user <username>. at com.atlassian.stash.internal.crowd.RiotPolice.unknownUser(RiotPolice.java:627) ~[stash-service-impl-2.0.2.jar:na] at com.atlassian.stash.internal.crowd.RiotPolice.execute(RiotPolice.java:590) ~[stash-service-impl-2.0.2.jar:na] at com.atlassian.stash.internal.crowd.RiotPolice.setUserAttribute(RiotPolice.java:485) ~[stash-service-impl-2.0.2.jar:na] at com.atlassian.stash.internal.crowd.UserCreatedAttributeBootstrapper.handleEvent(UserCreatedAttributeBootstrapper.java:26) ~[stash-service-impl-2.0.2.jar:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_33] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_33] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_33] at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_33] at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:36) ~[atlassian-event-2.2.1.jar:na] ... 30 common frames omitted {noformat}

    Atlassian JIRA | 4 years ago | Gurleen Anand [Atlassian]
    java.lang.RuntimeException: Could not find a user <username>.
  2. 0

    Branch permissions fail for those external users (user management delegated to JIRA), who have been not yet logged into Stash. After synchronization, the users are fetched successfully into Stash, but since they haven't logged in yet, branch permissions for all such users fails with "... is not a valid user" error. Does not effect local users. Logs: {noformat} 2013-01-25 13:50:58,773 ERROR [scheduler_Worker-3] c.a.e.i.AsynchronousAbleEventDispatcher There was an exception thrown trying to dispatch event 'com.atlassian.crowd.event.user.UserCreatedFromDirectorySynchronisationEvent@327ef53d' from the invoker 'SingleParameterMethodListenerInvoker{method=public void com.atlassian.stash.internal.crowd.UserCreatedAttributeBootstrapper.handleEvent(com.atlassian.crowd.event.user.UserCreatedEvent), listener=com.atlassian.stash.internal.crowd.UserCreatedAttributeBootstrapper@7407bedc}'. java.lang.RuntimeException: Could not find a user <username>. at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:54) ~[atlassian-event-2.2.1.jar:na] at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$2.run(AsynchronousAbleEventDispatcher.java:66) ~[atlassian-event-2.2.1.jar:na] at com.atlassian.event.internal.AsynchronousAbleEventDispatcher$1.execute(AsynchronousAbleEventDispatcher.java:32) [atlassian-event-2.2.1.jar:na] at com.atlassian.event.internal.AsynchronousAbleEventDispatcher.dispatch(AsynchronousAbleEventDispatcher.java:60) [atlassian-event-2.2.1.jar:na] at com.atlassian.event.internal.LockFreeEventPublisher$Publisher.dispatch(LockFreeEventPublisher.java:227) [atlassian-event-2.2.1.jar:na] at com.atlassian.event.internal.LockFreeEventPublisher.publish(LockFreeEventPublisher.java:82) [atlassian-event-2.2.1.jar:na] at com.atlassian.stash.internal.event.EventPublisherImpl.publish(EventPublisherImpl.java:74) [stash-platform-2.0.2.jar:na] at com.atlassian.crowd.directory.DbCachingRemoteChangeOperations.publishEvent(DbCachingRemoteChangeOperations.java:945) [crowd-core-2.5.3-m1.jar:na] at com.atlassian.crowd.directory.DbCachingRemoteChangeOperations.addUsers(DbCachingRemoteChangeOperations.java:178) [crowd-core-2.5.3-m1.jar:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_33] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_33] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_33] at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_33] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) [spring-tx-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) [spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at com.atlassian.crowd.directory.$Proxy829.addUsers(Unknown Source) [na:na] at com.atlassian.crowd.directory.DirectoryCacheImplUsingChangeOperations.addOrUpdateCachedUsers(DirectoryCacheImplUsingChangeOperations.java:56) [crowd-core-2.5.3-m1.jar:na] at com.atlassian.crowd.directory.ldap.cache.RemoteDirectoryCacheRefresher.synchroniseAllUsers(RemoteDirectoryCacheRefresher.java:65) [crowd-ldap-2.5.3-m1.jar:na] at com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseAll(AbstractCacheRefresher.java:83) [crowd-ldap-2.5.3-m1.jar:na] at com.atlassian.crowd.directory.ldap.cache.EventTokenChangedCacheRefresher.synchroniseAll(EventTokenChangedCacheRefresher.java:60) [crowd-ldap-2.5.3-m1.jar:na] at com.atlassian.crowd.directory.DbCachingRemoteDirectory.synchroniseCache(DbCachingRemoteDirectory.java:620) [crowd-core-2.5.3-m1.jar:na] at com.atlassian.crowd.manager.directory.DirectorySynchroniserImpl.synchronise(DirectorySynchroniserImpl.java:63) [crowd-core-2.5.3-m1.jar:na] at com.atlassian.crowd.directory.DbCachingDirectoryPoller.pollChanges(DbCachingDirectoryPoller.java:50) [crowd-core-2.5.3-m1.jar:na] at com.atlassian.crowd.manager.directory.monitor.poller.DirectoryPollerJobBean.executeInternal(DirectoryPollerJobBean.java:29) [crowd-core-2.5.3-m1.jar:na] at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:113) [spring-context-support-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.quartz.core.JobRunShell.run(JobRunShell.java:223) [quartz-1.8.6.jar:na] at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549) [quartz-1.8.6.jar:na] Caused by: com.atlassian.stash.exception.NoSuchUserException: Could not find a user <username>. at com.atlassian.stash.internal.crowd.RiotPolice.unknownUser(RiotPolice.java:627) ~[stash-service-impl-2.0.2.jar:na] at com.atlassian.stash.internal.crowd.RiotPolice.execute(RiotPolice.java:590) ~[stash-service-impl-2.0.2.jar:na] at com.atlassian.stash.internal.crowd.RiotPolice.setUserAttribute(RiotPolice.java:485) ~[stash-service-impl-2.0.2.jar:na] at com.atlassian.stash.internal.crowd.UserCreatedAttributeBootstrapper.handleEvent(UserCreatedAttributeBootstrapper.java:26) ~[stash-service-impl-2.0.2.jar:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_33] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_33] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_33] at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_33] at com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:36) ~[atlassian-event-2.2.1.jar:na] ... 30 common frames omitted {noformat}

    Atlassian JIRA | 4 years ago | Gurleen Anand [Atlassian]
    java.lang.RuntimeException: Could not find a user <username>.

    Root Cause Analysis

    1. com.atlassian.stash.exception.NoSuchUserException

      Could not find a user <username>.

      at com.atlassian.stash.internal.crowd.RiotPolice.unknownUser()
    2. com.atlassian.stash
      UserCreatedAttributeBootstrapper.handleEvent
      1. com.atlassian.stash.internal.crowd.RiotPolice.unknownUser(RiotPolice.java:627)[stash-service-impl-2.0.2.jar:na]
      2. com.atlassian.stash.internal.crowd.RiotPolice.execute(RiotPolice.java:590)[stash-service-impl-2.0.2.jar:na]
      3. com.atlassian.stash.internal.crowd.RiotPolice.setUserAttribute(RiotPolice.java:485)[stash-service-impl-2.0.2.jar:na]
      4. com.atlassian.stash.internal.crowd.UserCreatedAttributeBootstrapper.handleEvent(UserCreatedAttributeBootstrapper.java:26)[stash-service-impl-2.0.2.jar:na]
      4 frames
    3. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.6.0_33]
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[na:1.6.0_33]
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[na:1.6.0_33]
      4. java.lang.reflect.Method.invoke(Method.java:597)[na:1.6.0_33]
      4 frames
    4. com.atlassian.event
      LockFreeEventPublisher.publish
      1. com.atlassian.event.internal.SingleParameterMethodListenerInvoker.invoke(SingleParameterMethodListenerInvoker.java:36)[atlassian-event-2.2.1.jar:na]
      2. com.atlassian.event.internal.AsynchronousAbleEventDispatcher$2.run(AsynchronousAbleEventDispatcher.java:66)[atlassian-event-2.2.1.jar:na]
      3. com.atlassian.event.internal.AsynchronousAbleEventDispatcher$1.execute(AsynchronousAbleEventDispatcher.java:32)[atlassian-event-2.2.1.jar:na]
      4. com.atlassian.event.internal.AsynchronousAbleEventDispatcher.dispatch(AsynchronousAbleEventDispatcher.java:60)[atlassian-event-2.2.1.jar:na]
      5. com.atlassian.event.internal.LockFreeEventPublisher$Publisher.dispatch(LockFreeEventPublisher.java:227)[atlassian-event-2.2.1.jar:na]
      6. com.atlassian.event.internal.LockFreeEventPublisher.publish(LockFreeEventPublisher.java:82)[atlassian-event-2.2.1.jar:na]
      6 frames
    5. com.atlassian.stash
      EventPublisherImpl.publish
      1. com.atlassian.stash.internal.event.EventPublisherImpl.publish(EventPublisherImpl.java:74)[stash-platform-2.0.2.jar:na]
      1 frame
    6. com.atlassian.crowd
      DbCachingRemoteChangeOperations.addUsers
      1. com.atlassian.crowd.directory.DbCachingRemoteChangeOperations.publishEvent(DbCachingRemoteChangeOperations.java:945)[crowd-core-2.5.3-m1.jar:na]
      2. com.atlassian.crowd.directory.DbCachingRemoteChangeOperations.addUsers(DbCachingRemoteChangeOperations.java:178)[crowd-core-2.5.3-m1.jar:na]
      2 frames
    7. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.6.0_33]
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[na:1.6.0_33]
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[na:1.6.0_33]
      4. java.lang.reflect.Method.invoke(Method.java:597)[na:1.6.0_33]
      4 frames
    8. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319)[spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE]
      2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)[spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE]
      3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)[spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE]
      3 frames
    9. Spring Tx
      TransactionInterceptor.invoke
      1. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)[spring-tx-3.1.2.RELEASE.jar:3.1.2.RELEASE]
      1 frame
    10. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)[spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE]
      2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)[spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE]
      2 frames
    11. com.atlassian.crowd
      DirectoryPollerJobBean.executeInternal
      1. com.atlassian.crowd.directory.$Proxy829.addUsers(Unknown Source)[na:na]
      2. com.atlassian.crowd.directory.DirectoryCacheImplUsingChangeOperations.addOrUpdateCachedUsers(DirectoryCacheImplUsingChangeOperations.java:56)[crowd-core-2.5.3-m1.jar:na]
      3. com.atlassian.crowd.directory.ldap.cache.RemoteDirectoryCacheRefresher.synchroniseAllUsers(RemoteDirectoryCacheRefresher.java:65)[crowd-ldap-2.5.3-m1.jar:na]
      4. com.atlassian.crowd.directory.ldap.cache.AbstractCacheRefresher.synchroniseAll(AbstractCacheRefresher.java:83)[crowd-ldap-2.5.3-m1.jar:na]
      5. com.atlassian.crowd.directory.ldap.cache.EventTokenChangedCacheRefresher.synchroniseAll(EventTokenChangedCacheRefresher.java:60)[crowd-ldap-2.5.3-m1.jar:na]
      6. com.atlassian.crowd.directory.DbCachingRemoteDirectory.synchroniseCache(DbCachingRemoteDirectory.java:620)[crowd-core-2.5.3-m1.jar:na]
      7. com.atlassian.crowd.manager.directory.DirectorySynchroniserImpl.synchronise(DirectorySynchroniserImpl.java:63)[crowd-core-2.5.3-m1.jar:na]
      8. com.atlassian.crowd.directory.DbCachingDirectoryPoller.pollChanges(DbCachingDirectoryPoller.java:50)[crowd-core-2.5.3-m1.jar:na]
      9. com.atlassian.crowd.manager.directory.monitor.poller.DirectoryPollerJobBean.executeInternal(DirectoryPollerJobBean.java:29)[crowd-core-2.5.3-m1.jar:na]
      9 frames
    12. Spring Context Support
      QuartzJobBean.execute
      1. org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:113)[spring-context-support-3.1.2.RELEASE.jar:3.1.2.RELEASE]
      1 frame
    13. quartz
      SimpleThreadPool$WorkerThread.run
      1. org.quartz.core.JobRunShell.run(JobRunShell.java:223)[quartz-1.8.6.jar:na]
      2. org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)[quartz-1.8.6.jar:na]
      2 frames