com.atlassian.jira.util.dbc.Assertions$NullArgumentException: key should not be null!

Atlassian JIRA | David Currie [Atlassian] | 3 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

    h3. Summary Attempting to modify any test sessions fails with an error in the browser. h3. Steps to Reproduce # Restore an instance with problematic data. # Attempt to change a session with a problematic user. (i) It is not currently known how to get the instance into this error, only how to fix it. h3. Expected Results The session can be changed without error. h3. Actual Results The below exception is thrown: {noformat} com.atlassian.jira.util.dbc.Assertions$NullArgumentException: key should not be null! at com.atlassian.jira.util.dbc.Assertions.notNull(Assertions.java:28) at com.atlassian.jira.user.DelegatingApplicationUser.<init>(DelegatingApplicationUser.java:20) at com.atlassian.jira.user.ApplicationUsers.from(ApplicationUsers.java:53) at com.atlassian.jira.avatar.AvatarServiceImpl.fromStaleUser(AvatarServiceImpl.java:56) at com.atlassian.jira.avatar.AvatarServiceImpl.getAvatarAbsoluteURL(AvatarServiceImpl.java:149) at com.atlassian.excalibur.web.util.ExcaliburWebUtil.getLargeAvatarUrl(ExcaliburWebUtil.java:225) at com.atlassian.excalibur.model.SessionStatusSessionActivityItem.<init>(SessionStatusSessionActivityItem.java:21) at com.atlassian.bonfire.service.dao.SessionMarshaller.unmarshalSessionStatusActivityItem(SessionMarshaller.java:627) at com.atlassian.bonfire.service.dao.SessionMarshaller.unmarshalSessionActivityItem(SessionMarshaller.java:567) at com.atlassian.bonfire.service.dao.SessionMarshaller.unmarshalSessionActivityItemList(SessionMarshaller.java:536) at com.atlassian.bonfire.service.dao.SessionMarshaller.unMarshal(SessionMarshaller.java:458) at com.atlassian.excalibur.service.dao.SessionDao.load(SessionDao.java:100) at com.atlassian.excalibur.service.controller.SessionControllerImpl.getActiveSession(SessionControllerImpl.java:959) at com.atlassian.excalibur.service.controller.SessionControllerImpl.validateStartSession(SessionControllerImpl.java:358) at com.atlassian.excalibur.web.ExcaliburSessionStatusAction.doActivateInSession(ExcaliburSessionStatusAction.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) {noformat} h3. Workaround Clearing out the users current session has been known to fix the problem. This can be done with the following, assuming the user is {{captain.planet}} (please change it as necessary): # Backup JIRA (either with the native DB tools or the XML backup). # Stop JIRA. # Execute the following to identify the session: {code:SQL} SELECT id FROM propertyentry WHERE entity_name = 'Bonfire.Active.Session.Id' AND property_key = 'captain.planet'; {code} # Clear the session with the following: {code:SQL} UPDATE propertynumber SET propertyvalue = NULL WHERE id = <id from above>; {code} # Start JIRA and attempt to modify a session with that user.

    Atlassian JIRA | 3 years ago | David Currie [Atlassian]
    com.atlassian.jira.util.dbc.Assertions$NullArgumentException: key should not be null!

    Root Cause Analysis

    1. com.atlassian.jira.util.dbc.Assertions$NullArgumentException

      key should not be null!

      at com.atlassian.jira.util.dbc.Assertions.notNull()
    2. com.atlassian.jira
      AvatarServiceImpl.getAvatarAbsoluteURL
      1. com.atlassian.jira.util.dbc.Assertions.notNull(Assertions.java:28)
      2. com.atlassian.jira.user.DelegatingApplicationUser.<init>(DelegatingApplicationUser.java:20)
      3. com.atlassian.jira.user.ApplicationUsers.from(ApplicationUsers.java:53)
      4. com.atlassian.jira.avatar.AvatarServiceImpl.fromStaleUser(AvatarServiceImpl.java:56)
      5. com.atlassian.jira.avatar.AvatarServiceImpl.getAvatarAbsoluteURL(AvatarServiceImpl.java:149)
      5 frames
    3. com.atlassian.excalibur
      SessionStatusSessionActivityItem.<init>
      1. com.atlassian.excalibur.web.util.ExcaliburWebUtil.getLargeAvatarUrl(ExcaliburWebUtil.java:225)
      2. com.atlassian.excalibur.model.SessionStatusSessionActivityItem.<init>(SessionStatusSessionActivityItem.java:21)
      2 frames
    4. com.atlassian.bonfire
      SessionMarshaller.unMarshal
      1. com.atlassian.bonfire.service.dao.SessionMarshaller.unmarshalSessionStatusActivityItem(SessionMarshaller.java:627)
      2. com.atlassian.bonfire.service.dao.SessionMarshaller.unmarshalSessionActivityItem(SessionMarshaller.java:567)
      3. com.atlassian.bonfire.service.dao.SessionMarshaller.unmarshalSessionActivityItemList(SessionMarshaller.java:536)
      4. com.atlassian.bonfire.service.dao.SessionMarshaller.unMarshal(SessionMarshaller.java:458)
      4 frames
    5. com.atlassian.excalibur
      ExcaliburSessionStatusAction.doActivateInSession
      1. com.atlassian.excalibur.service.dao.SessionDao.load(SessionDao.java:100)
      2. com.atlassian.excalibur.service.controller.SessionControllerImpl.getActiveSession(SessionControllerImpl.java:959)
      3. com.atlassian.excalibur.service.controller.SessionControllerImpl.validateStartSession(SessionControllerImpl.java:358)
      4. com.atlassian.excalibur.web.ExcaliburSessionStatusAction.doActivateInSession(ExcaliburSessionStatusAction.java:60)
      4 frames
    6. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      4. java.lang.reflect.Method.invoke(Unknown Source)
      4 frames