java.lang.NullPointerException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Discovered for Stash version 3.1.4 How to reproduce: - create applink Stash - Bamboo - add an SSH key without label (use example pasted below) - verify that there is a key with *null* label (*not* an empty string - in such case everything will work) by GET-ing /rest/ssh/1.0/keys - try adding a linked repository of Stash type in Bamboo {code} 2014-09-05 09:33:01,628 DEBUG [http-apr-8085-exec-7] [StashRepository] Exception while negotiating key java.lang.NullPointerException at com.atlassian.stash.rest.client.core.parser.UserSshKeyParser.apply(UserSshKeyParser.java:14) at com.atlassian.stash.rest.client.core.parser.UserSshKeyParser.apply(UserSshKeyParser.java:8) at com.google.common.collect.Iterators$8.next(Iterators.java:812) at com.google.common.collect.Lists.newArrayList(Lists.java:139) at com.google.common.collect.ImmutableList.copyOf(ImmutableList.java:256) at com.google.common.collect.ImmutableList.copyOf(ImmutableList.java:217) at com.atlassian.stash.rest.client.core.parser.ListParser.apply(ListParser.java:23) at com.atlassian.stash.rest.client.core.parser.ListParser.apply(ListParser.java:11) at com.atlassian.stash.rest.client.core.parser.PageParser.apply(PageParser.java:22) at com.atlassian.stash.rest.client.core.parser.PageParser.apply(PageParser.java:12) at com.atlassian.stash.rest.client.core.StashClientImpl.getCurrentUserKeys(StashClientImpl.java:215) at com.atlassian.stash.rest.client.core.StashClientImpl.isUserKey(StashClientImpl.java:226) {code} Key that caused the error: AAAAB3NzaC1yc2EAAAABJQAAAIEA2YTE7vL0AFcCJe1fH+URNpU3R0Vtw5HP4OmR8IUAEyWoi4euYF3DNTKLUrJgD8UXkVtE7Lld+Kfkff+uu2ZBuaTHWEOqdF4xESdFzSHXxxkhPAl/LfUMXCrRG5UxPja+N3VTDL/ghAWqRSlja3cg56Ia5EkDH5LZpL4PYd7bo2c= *Workaround:* This issue is related to one of the SSH keys in Stash. There is one key without a label that causes the error. Please try to delete it (and maybe update with a new one, but this time with a label) and then try to add a Stash repository. To do so, please go to Stash, then under your profile go to "Manage Account", then to "SSH Keys" and delete the single label-less key.
    via by Sepideh Setayeshfar [Atlassian],
  • Discovered for Stash version 3.1.4 How to reproduce: - create applink Stash - Bamboo - add an SSH key without label (use example pasted below) - verify that there is a key with *null* label (*not* an empty string - in such case everything will work) by GET-ing /rest/ssh/1.0/keys - try adding a linked repository of Stash type in Bamboo {code} 2014-09-05 09:33:01,628 DEBUG [http-apr-8085-exec-7] [StashRepository] Exception while negotiating key java.lang.NullPointerException at com.atlassian.stash.rest.client.core.parser.UserSshKeyParser.apply(UserSshKeyParser.java:14) at com.atlassian.stash.rest.client.core.parser.UserSshKeyParser.apply(UserSshKeyParser.java:8) at com.google.common.collect.Iterators$8.next(Iterators.java:812) at com.google.common.collect.Lists.newArrayList(Lists.java:139) at com.google.common.collect.ImmutableList.copyOf(ImmutableList.java:256) at com.google.common.collect.ImmutableList.copyOf(ImmutableList.java:217) at com.atlassian.stash.rest.client.core.parser.ListParser.apply(ListParser.java:23) at com.atlassian.stash.rest.client.core.parser.ListParser.apply(ListParser.java:11) at com.atlassian.stash.rest.client.core.parser.PageParser.apply(PageParser.java:22) at com.atlassian.stash.rest.client.core.parser.PageParser.apply(PageParser.java:12) at com.atlassian.stash.rest.client.core.StashClientImpl.getCurrentUserKeys(StashClientImpl.java:215) at com.atlassian.stash.rest.client.core.StashClientImpl.isUserKey(StashClientImpl.java:226) {code} Key that caused the error: AAAAB3NzaC1yc2EAAAABJQAAAIEA2YTE7vL0AFcCJe1fH+URNpU3R0Vtw5HP4OmR8IUAEyWoi4euYF3DNTKLUrJgD8UXkVtE7Lld+Kfkff+uu2ZBuaTHWEOqdF4xESdFzSHXxxkhPAl/LfUMXCrRG5UxPja+N3VTDL/ghAWqRSlja3cg56Ia5EkDH5LZpL4PYd7bo2c= *Workaround:* This issue is related to one of the SSH keys in Stash. There is one key without a label that causes the error. Please try to delete it (and maybe update with a new one, but this time with a label) and then try to add a Stash repository. To do so, please go to Stash, then under your profile go to "Manage Account", then to "SSH Keys" and delete the single label-less key.
    via by Sepideh Setayeshfar [Atlassian],
  • Discovered for Stash version 3.1.4 How to reproduce: - create applink Stash - Bamboo - add an SSH key without label (use example pasted below) - verify that there is a key with *null* label (*not* an empty string - in such case everything will work) by GET-ing /rest/ssh/1.0/keys - try adding a linked repository of Stash type in Bamboo {code} 2014-09-05 09:33:01,628 DEBUG [http-apr-8085-exec-7] [StashRepository] Exception while negotiating key java.lang.NullPointerException at com.atlassian.stash.rest.client.core.parser.UserSshKeyParser.apply(UserSshKeyParser.java:14) at com.atlassian.stash.rest.client.core.parser.UserSshKeyParser.apply(UserSshKeyParser.java:8) at com.google.common.collect.Iterators$8.next(Iterators.java:812) at com.google.common.collect.Lists.newArrayList(Lists.java:139) at com.google.common.collect.ImmutableList.copyOf(ImmutableList.java:256) at com.google.common.collect.ImmutableList.copyOf(ImmutableList.java:217) at com.atlassian.stash.rest.client.core.parser.ListParser.apply(ListParser.java:23) at com.atlassian.stash.rest.client.core.parser.ListParser.apply(ListParser.java:11) at com.atlassian.stash.rest.client.core.parser.PageParser.apply(PageParser.java:22) at com.atlassian.stash.rest.client.core.parser.PageParser.apply(PageParser.java:12) at com.atlassian.stash.rest.client.core.StashClientImpl.getCurrentUserKeys(StashClientImpl.java:215) at com.atlassian.stash.rest.client.core.StashClientImpl.isUserKey(StashClientImpl.java:226) {code} Key that caused the error: AAAAB3NzaC1yc2EAAAABJQAAAIEA2YTE7vL0AFcCJe1fH+URNpU3R0Vtw5HP4OmR8IUAEyWoi4euYF3DNTKLUrJgD8UXkVtE7Lld+Kfkff+uu2ZBuaTHWEOqdF4xESdFzSHXxxkhPAl/LfUMXCrRG5UxPja+N3VTDL/ghAWqRSlja3cg56Ia5EkDH5LZpL4PYd7bo2c= *Workaround:* This issue is related to one of the SSH keys in Stash. There is one key without a label that causes the error. Please try to delete it (and maybe update with a new one, but this time with a label) and then try to add a Stash repository. To do so, please go to Stash, then under your profile go to "Manage Account", then to "SSH Keys" and delete the single label-less key.
    via by Sepideh Setayeshfar,
  • Discovered for Stash version 3.1.4 How to reproduce: - create applink Stash - Bamboo - add an SSH key without label (use example pasted below) - verify that there is a key with *null* label (*not* an empty string - in such case everything will work) by GET-ing /rest/ssh/1.0/keys - try adding a linked repository of Stash type in Bamboo {code} 2014-09-05 09:33:01,628 DEBUG [http-apr-8085-exec-7] [StashRepository] Exception while negotiating key java.lang.NullPointerException at com.atlassian.stash.rest.client.core.parser.UserSshKeyParser.apply(UserSshKeyParser.java:14) at com.atlassian.stash.rest.client.core.parser.UserSshKeyParser.apply(UserSshKeyParser.java:8) at com.google.common.collect.Iterators$8.next(Iterators.java:812) at com.google.common.collect.Lists.newArrayList(Lists.java:139) at com.google.common.collect.ImmutableList.copyOf(ImmutableList.java:256) at com.google.common.collect.ImmutableList.copyOf(ImmutableList.java:217) at com.atlassian.stash.rest.client.core.parser.ListParser.apply(ListParser.java:23) at com.atlassian.stash.rest.client.core.parser.ListParser.apply(ListParser.java:11) at com.atlassian.stash.rest.client.core.parser.PageParser.apply(PageParser.java:22) at com.atlassian.stash.rest.client.core.parser.PageParser.apply(PageParser.java:12) at com.atlassian.stash.rest.client.core.StashClientImpl.getCurrentUserKeys(StashClientImpl.java:215) at com.atlassian.stash.rest.client.core.StashClientImpl.isUserKey(StashClientImpl.java:226) {code} Key that caused the error: AAAAB3NzaC1yc2EAAAABJQAAAIEA2YTE7vL0AFcCJe1fH+URNpU3R0Vtw5HP4OmR8IUAEyWoi4euYF3DNTKLUrJgD8UXkVtE7Lld+Kfkff+uu2ZBuaTHWEOqdF4xESdFzSHXxxkhPAl/LfUMXCrRG5UxPja+N3VTDL/ghAWqRSlja3cg56Ia5EkDH5LZpL4PYd7bo2c= *Workaround:* This issue is related to one of the SSH keys in Stash. There is one key without a label that causes the error. Please try to delete it (and maybe update with a new one, but this time with a label) and then try to add a Stash repository. To do so, please go to Stash, then under your profile go to "Manage Account", then to "SSH Keys" and delete the single label-less key.
    via by Sepideh Setayeshfar,
    • java.lang.NullPointerException at com.atlassian.stash.rest.client.core.parser.UserSshKeyParser.apply(UserSshKeyParser.java:14) at com.atlassian.stash.rest.client.core.parser.UserSshKeyParser.apply(UserSshKeyParser.java:8) at com.google.common.collect.Iterators$8.next(Iterators.java:812) at com.google.common.collect.Lists.newArrayList(Lists.java:139) at com.google.common.collect.ImmutableList.copyOf(ImmutableList.java:256) at com.google.common.collect.ImmutableList.copyOf(ImmutableList.java:217) at com.atlassian.stash.rest.client.core.parser.ListParser.apply(ListParser.java:23) at com.atlassian.stash.rest.client.core.parser.ListParser.apply(ListParser.java:11) at com.atlassian.stash.rest.client.core.parser.PageParser.apply(PageParser.java:22) at com.atlassian.stash.rest.client.core.parser.PageParser.apply(PageParser.java:12) at com.atlassian.stash.rest.client.core.StashClientImpl.getCurrentUserKeys(StashClientImpl.java:215) at com.atlassian.stash.rest.client.core.StashClientImpl.isUserKey(StashClientImpl.java:226)
    No Bugmate found.