java.lang.NullPointerException

tip

Take a look at this blog post on how to set up Grid2 https://goo.gl/rxzbE6. A user related (in the email group on the source) that using older selenium libs solves this exception.

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • h3. Summary If a new file is created and added in the same commit where a merge conflict is being resolved, that new file will fail to open in the browser. Attempting to open the file returns a 500 error to the user, and generates a NullPointerException in the logs. h3. Steps to Reproduce # Attempt to merge a branch on the command line that will generate a merge conflict. # Create a new file. # {{git add}} the file(s) containing conflicts to resolve the conflict. # {{git add}} the new file. # Commit the changes. # Push the changes. # Navigate to the repository in the browser, and open the newly created file. h3. Expected Results The contents of the file are displayed. h3. Actual Results The user receives a 500 error in the browser. The below exception is thrown in the atlassian-bitbucket.log file: {noformat} 2016-05-31 15:32:19,930 WARN [http-nio-7990-exec-7] smaruvada @3H8VA8x932x688x0 10mi4n 192.168.10.1 "GET /projects/META/repos/puppets/browse/crash2 HTTP/1.1" c.a.s.i.w.s.f.AvatarUrlFunction Error getting avatar URL for null java.lang.NullPointerException: person at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:226) ~[guava-18.0.jar:na] at com.atlassian.stash.internal.avatar.ConfigurableAvatarService.getUrlForPerson(ConfigurableAvatarService.java:199) ~[bitbucket-service-impl-4.6.1.jar:na] at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26) ~[atlassian-plugins-core-4.1.8.jar:na] at com.atlassian.stash.internal.web.soy.functions.AvatarUrlFunction.getUrl(AvatarUrlFunction.java:80) [classes/:na] at com.atlassian.stash.internal.web.soy.functions.AvatarUrlFunction.apply(AvatarUrlFunction.java:67) [classes/:na] at com.atlassian.stash.internal.web.soy.functions.AvatarUrlFunction.apply(AvatarUrlFunction.java:23) [classes/:na] at com.atlassian.soy.impl.modules.SoyJavaFunctionAdapter.computeForJava(SoyJavaFunctionAdapter.java:34) [soy-template-plugin-4.3.0.jar:na] {noformat} h3. Notes This case was tested by multiple customers in version 4.3.2, and the issue did not exist. h3.Workaround # Commit new files in a separate commit from the merge commit. One customer has merge commits already imported from a forked repository, however, and cannot use this workaround. # Create a new commit for all the files that are inaccessible. The files will be accessible after pushing this commit.
    via by Shashank Maruvada [Atlassian],
  • Suppose you have two branches of a repository. On one, there is a path a/b/c.txt, and on the other, this file doesn't exist. In a commit that merges these branches together, the file is moved to d/e/f.txt. Thus when viewing the merge diff, the file is Moved on one branch, and Created on the other. When attempting to view this file at {{/projects/PROJ/repos/REPO/browse/d/e/f.txt}}, a 500 error will be thrown while attempting to populate the commit "badge" in the upper right of the UI because no commit ever actually modified this file. The following is logged in {{atlassian-bitbucket.log}}: {code}2016-05-31 15:32:19,930 WARN [http-nio-7990-exec-7] smaruvada @3H8VA8x932x688x0 10mi4n 192.168.10.1 "GET /projects/META/repos/puppets/browse/crash2 HTTP/1.1" c.a.s.i.w.s.f.AvatarUrlFunction Error getting avatar URL for null java.lang.NullPointerException: person at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:226) ~[guava-18.0.jar:na] at com.atlassian.stash.internal.avatar.ConfigurableAvatarService.getUrlForPerson(ConfigurableAvatarService.java:199) ~[bitbucket-service-impl-4.6.1.jar:na] at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26) ~[atlassian-plugins-core-4.1.8.jar:na] at com.atlassian.stash.internal.web.soy.functions.AvatarUrlFunction.getUrl(AvatarUrlFunction.java:80) [classes/:na] at com.atlassian.stash.internal.web.soy.functions.AvatarUrlFunction.apply(AvatarUrlFunction.java:67) [classes/:na] at com.atlassian.stash.internal.web.soy.functions.AvatarUrlFunction.apply(AvatarUrlFunction.java:23) [classes/:na] at com.atlassian.soy.impl.modules.SoyJavaFunctionAdapter.computeForJava(SoyJavaFunctionAdapter.java:34) [soy-template-plugin-4.3.0.jar:na]{code}
    via by Adam Ahmed [Atlassian],
  • GitHub comment 13#158505522
    via GitHub by rameshsaketi
    ,
    • java.lang.NullPointerException: person at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:226)[guava-18.0.jar:na] at com.atlassian.stash.internal.avatar.ConfigurableAvatarService.getUrlForPerson(ConfigurableAvatarService.java:199)[bitbucket-service-impl-4.6.1.jar:na] at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)[atlassian-plugins-core-4.1.8.jar:na] at com.atlassian.stash.internal.web.soy.functions.AvatarUrlFunction.getUrl(AvatarUrlFunction.java:80)[classes/:na] at com.atlassian.stash.internal.web.soy.functions.AvatarUrlFunction.apply(AvatarUrlFunction.java:67)[classes/:na] at com.atlassian.stash.internal.web.soy.functions.AvatarUrlFunction.apply(AvatarUrlFunction.java:23)[classes/:na] at com.atlassian.soy.impl.modules.SoyJavaFunctionAdapter.computeForJava(SoyJavaFunctionAdapter.java:34)[soy-template-plugin-4.3.0.jar:na]

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,
    batwalrus76batwalrus76
    3 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    PilleoPilleo
    1 times, last one,
    83 more bugmates