java.lang.NullPointerException: element cannot be mapped to a null key 2016-04-01 13:09:09.751755500 at java.util.Objects.requireNonNull(Objects.java:228) 2016-04-01 13:09:09.751756500 at java.util.stream.Collectors.lambda$groupingBy$176(Collectors.java:907) 2016-04-01 13:09:09.751756500 at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)

Atlassian JIRA | Xavier Sanchez [Atlassian] | 8 months ago
  1. 0

    h3. Summary When a user has drafts connected to non-existing spaces, they will get a stracktrace when viewing their Drafts. This is sometimes the results of this bug: https://jira.atlassian.com/browse/CONF-41150 h3. Steps to Reproduce # With a user, create a draft # In some situations, the space it was created in may be deleted, but not the draft. # Click 'Profile >> Drafts' h3. Expected Results The user can still access their drafts. h3. Actual Results An error page is shown with this stacktrace {noformat} 2016-04-01 13:09:09.751027500 org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getResumableDraftsBySpace' in class com.atlassian.confluence.user.actions.ViewMyDraftsAction threw exception java.lang.NullPointerException: element cannot be mapped to a null key at /users/viewmydrafts.vm[line 118, column 30] 2016-04-01 13:09:09.751040500 at org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:223) 2016-04-01 13:09:09.751041500 at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:262) 2016-04-01 13:09:09.751044500 at org.apache.velocity.runtime.parser.node.ASTReference.evaluate(ASTReference.java:470) 2016-04-01 13:09:09.751045500 at org.apache.velocity.runtime.parser.node.ASTExpression.evaluate(ASTExpression.java:62) 2016-04-01 13:09:09.751045500 at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:85) 2016-04-01 13:09:09.751051500 at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72) 2016-04-01 13:09:09.751052500 at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:87) 2016-04-01 13:09:09.751052500 at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72) 2016-04-01 13:09:09.751053500 at com.atlassian.confluence.setup.velocity.ApplyDecoratorDirective.getRenderedTagBody(ApplyDecoratorDirective.java:181) 2016-04-01 13:09:09.751057500 at com.atlassian.confluence.setup.velocity.ApplyDecoratorDirective.render(ApplyDecoratorDirective.java:155) 2016-04-01 13:09:09.751058500 at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175) 2016-04-01 13:09:09.751750500 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 2016-04-01 13:09:09.751751500 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 2016-04-01 13:09:09.751751500 at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) 2016-04-01 13:09:09.751754500 at java.lang.Thread.run(Thread.java:745) 2016-04-01 13:09:09.751755500 Caused by: java.lang.NullPointerException: element cannot be mapped to a null key 2016-04-01 13:09:09.751755500 at java.util.Objects.requireNonNull(Objects.java:228) 2016-04-01 13:09:09.751756500 at java.util.stream.Collectors.lambda$groupingBy$176(Collectors.java:907) 2016-04-01 13:09:09.751756500 at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169) 2016-04-01 13:09:09.751760500 at java.util.ArrayList.forEach(ArrayList.java:1249) 2016-04-01 13:09:09.751760500 at java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:390) 2016-04-01 13:09:09.751760500 at java.util.stream.Sink$ChainedReference.end(Sink.java:258) 2016-04-01 13:09:09.751761500 at java.util.stream.Sink$ChainedReference.end(Sink.java:258) 2016-04-01 13:09:09.751761500 at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) 2016-04-01 13:09:09.751766500 at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) 2016-04-01 13:09:09.751767500 at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) 2016-04-01 13:09:09.751768500 at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) 2016-04-01 13:09:09.751768500 at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) 2016-04-01 13:09:09.751772500 at com.atlassian.confluence.user.actions.ViewMyDraftsAction.filterAndGroupDrafts(ViewMyDraftsAction.java:107) 2016-04-01 13:09:09.751773500 at com.atlassian.confluence.user.actions.ViewMyDraftsAction.getResumableDraftsBySpace(ViewMyDraftsAction.java:88) 2016-04-01 13:09:09.751773500 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 2016-04-01 13:09:09.751774500 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 2016-04-01 13:09:09.751774500 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 2016-04-01 13:09:09.751778500 at java.lang.reflect.Method.invoke(Method.java:497) 2016-04-01 13:09:09.751778500 at org.apache.velocity.runtime.parser.node.PropertyExecutor.execute(PropertyExecutor.java:142) 2016-04-01 13:09:09.751779500 at org.apache.velocity.util.introspection.UberspectImpl$VelGetterImpl.invoke(UberspectImpl.java:529) 2016-04-01 13:09:09.751799500 at org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:198) 2016-04-01 13:09:09.751799500 ... 388 more {noformat} h3. Notes If you want to check only the affected users first, you can use this: {code:sql} select distinct um.username as "creator" from content c join user_mapping um on c.creator = um.user_key where c.contenttype = 'DRAFT' and c.draftspacekey not in (SELECT spacekey FROM SPACES) order by um.username; {code} h3.Workaround # Find all drafts connected to non-existing spaces in the database: {code:sql} select c.contentid, c.title, c.draftspacekey, um.username as "creator" from content c join user_mapping um on c.creator = um.user_key where c.contenttype = 'DRAFT' and c.draftspacekey not in (SELECT spacekey FROM SPACES) order by c.creator; {code} # For every response, log in as the 'creator' and access this (won't work if you log in as any user other than the creator): {noformat} https://instance.atlassian.net/wiki/json/deletedraft.action?draftId=<draft_id>&atl_token=#form_xsrfToken() {noformat} #* Replace the '<draft_id>' for the 'contentid'. # If it works, that line should no longer appear in the select above and this should be shown in the page: {noformat} {} {noformat}

    Atlassian JIRA | 8 months ago | Xavier Sanchez [Atlassian]
    java.lang.NullPointerException: element cannot be mapped to a null key 2016-04-01 13:09:09.751755500 at java.util.Objects.requireNonNull(Objects.java:228) 2016-04-01 13:09:09.751756500 at java.util.stream.Collectors.lambda$groupingBy$176(Collectors.java:907) 2016-04-01 13:09:09.751756500 at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
  2. 0

    h3. Summary When a user has drafts connected to non-existing spaces, they will get a stracktrace when viewing their Drafts. This is sometimes the results of this bug: https://jira.atlassian.com/browse/CONF-41150 h3. Steps to Reproduce # With a user, create a draft # In some situations, the space it was created in may be deleted, but not the draft. # Click 'Profile >> Drafts' h3. Expected Results The user can still access their drafts. h3. Actual Results An error page is shown with this stacktrace {noformat} 2016-04-01 13:09:09.751027500 org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getResumableDraftsBySpace' in class com.atlassian.confluence.user.actions.ViewMyDraftsAction threw exception java.lang.NullPointerException: element cannot be mapped to a null key at /users/viewmydrafts.vm[line 118, column 30] 2016-04-01 13:09:09.751040500 at org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:223) 2016-04-01 13:09:09.751041500 at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:262) 2016-04-01 13:09:09.751044500 at org.apache.velocity.runtime.parser.node.ASTReference.evaluate(ASTReference.java:470) 2016-04-01 13:09:09.751045500 at org.apache.velocity.runtime.parser.node.ASTExpression.evaluate(ASTExpression.java:62) 2016-04-01 13:09:09.751045500 at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:85) 2016-04-01 13:09:09.751051500 at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72) 2016-04-01 13:09:09.751052500 at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:87) 2016-04-01 13:09:09.751052500 at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72) 2016-04-01 13:09:09.751053500 at com.atlassian.confluence.setup.velocity.ApplyDecoratorDirective.getRenderedTagBody(ApplyDecoratorDirective.java:181) 2016-04-01 13:09:09.751057500 at com.atlassian.confluence.setup.velocity.ApplyDecoratorDirective.render(ApplyDecoratorDirective.java:155) 2016-04-01 13:09:09.751058500 at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175) 2016-04-01 13:09:09.751750500 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 2016-04-01 13:09:09.751751500 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 2016-04-01 13:09:09.751751500 at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) 2016-04-01 13:09:09.751754500 at java.lang.Thread.run(Thread.java:745) 2016-04-01 13:09:09.751755500 Caused by: java.lang.NullPointerException: element cannot be mapped to a null key 2016-04-01 13:09:09.751755500 at java.util.Objects.requireNonNull(Objects.java:228) 2016-04-01 13:09:09.751756500 at java.util.stream.Collectors.lambda$groupingBy$176(Collectors.java:907) 2016-04-01 13:09:09.751756500 at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169) 2016-04-01 13:09:09.751760500 at java.util.ArrayList.forEach(ArrayList.java:1249) 2016-04-01 13:09:09.751760500 at java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:390) 2016-04-01 13:09:09.751760500 at java.util.stream.Sink$ChainedReference.end(Sink.java:258) 2016-04-01 13:09:09.751761500 at java.util.stream.Sink$ChainedReference.end(Sink.java:258) 2016-04-01 13:09:09.751761500 at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) 2016-04-01 13:09:09.751766500 at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) 2016-04-01 13:09:09.751767500 at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) 2016-04-01 13:09:09.751768500 at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) 2016-04-01 13:09:09.751768500 at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) 2016-04-01 13:09:09.751772500 at com.atlassian.confluence.user.actions.ViewMyDraftsAction.filterAndGroupDrafts(ViewMyDraftsAction.java:107) 2016-04-01 13:09:09.751773500 at com.atlassian.confluence.user.actions.ViewMyDraftsAction.getResumableDraftsBySpace(ViewMyDraftsAction.java:88) 2016-04-01 13:09:09.751773500 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 2016-04-01 13:09:09.751774500 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 2016-04-01 13:09:09.751774500 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 2016-04-01 13:09:09.751778500 at java.lang.reflect.Method.invoke(Method.java:497) 2016-04-01 13:09:09.751778500 at org.apache.velocity.runtime.parser.node.PropertyExecutor.execute(PropertyExecutor.java:142) 2016-04-01 13:09:09.751779500 at org.apache.velocity.util.introspection.UberspectImpl$VelGetterImpl.invoke(UberspectImpl.java:529) 2016-04-01 13:09:09.751799500 at org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:198) 2016-04-01 13:09:09.751799500 ... 388 more {noformat} h3. Notes If you want to check only the affected users first, you can use this: {code:sql} select distinct um.username as "creator" from content c join user_mapping um on c.creator = um.user_key where c.contenttype = 'DRAFT' and c.draftspacekey not in (SELECT spacekey FROM SPACES) order by um.username; {code} h3.Workaround # Find all drafts connected to non-existing spaces in the database: {code:sql} select c.contentid, c.title, c.draftspacekey, um.username as "creator" from content c join user_mapping um on c.creator = um.user_key where c.contenttype = 'DRAFT' and c.draftspacekey not in (SELECT spacekey FROM SPACES) order by c.creator; {code} # For every response, log in as the 'creator' and access this (won't work if you log in as any user other than the creator): {noformat} https://instance.atlassian.net/wiki/json/deletedraft.action?draftId=<draft_id>&atl_token=#form_xsrfToken() {noformat} #* Replace the '<draft_id>' for the 'contentid'. # If it works, that line should no longer appear in the select above and this should be shown in the page: {noformat} {} {noformat}

    Atlassian JIRA | 8 months ago | Xavier Sanchez [Atlassian]
    java.lang.NullPointerException: element cannot be mapped to a null key 2016-04-01 13:09:09.751755500 at java.util.Objects.requireNonNull(Objects.java:228) 2016-04-01 13:09:09.751756500 at java.util.stream.Collectors.lambda$groupingBy$176(Collectors.java:907) 2016-04-01 13:09:09.751756500 at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
  3. 0

    Cannot get the ZipResourceFile expansionfile working

    Stack Overflow | 11 months ago | Immy
    java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.AssetFileDescriptor com.android.vending.expansion.zipfile.ZipResourceFile.getAssetFileDescriptor(java.lang.String)' on a null object reference 01-04 13:48:17.177: W/System.err(32744): at com.imre.testzip2.MainActivity$1.onClick(MainActivity.java:97) 01-04 13:48:17.177: W/System.err(32744): at android.view.View.performClick(View.java:4756)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Asmack File Transfer Error

    Stack Overflow | 8 months ago | user914425
    java.lang.NullPointerException: Attempt to invoke virtual method 'void org.jivesoftware.smackx.ServiceDiscoveryManager.addFeature(java.lang.String)' on a null object reference 04-01 19:05:13.534: E/AndroidRuntime(18510): at org.jivesoftware.smackx.filetransfer.FileTransferNegotiator.setServiceEnabled(FileTransferNegotiator.java:126) 04-01 19:05:13.534: E/AndroidRuntime(18510): at com.demo.chat.DemoActivity.sendFileNew(XMPPChatDemoActivity.java:771) 04-01 19:05:13.534: E/AndroidRuntime(18510): at com.demo.chat.DemoActivity.onOptionsItemSelected(XMPPChatDemoActivity.java:186)
  6. 0

    Spinner getSelectedItem() throwing Exception

    Stack Overflow | 8 months ago | Vitor Villar
    java.lang.IllegalStateException: Could not execute method of the activity 04-05 13:02:18.997 1614-1614/br.com.vitorvillar.aquariummanager E/AndroidRuntime: at android.view.View$1.onClick(View.java:4007) 04-05 13:02:18.997 1614-1614/br.com.vitorvillar.aquariummanager E/AndroidRuntime: at android.view.View.performClick(View.java:4756) 04-05 13:02:18.997 1614-1614/br.com.vitorvillar.aquariummanager E/AndroidRuntime: at android.view.View$PerformClick.run(View.java:19761) 04-05 13:02:18.997 1614-1614/br.com.vitorvillar.aquariummanager E/AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:739) 04-05 13:02:18.997 1614-1614/br.com.vitorvillar.aquariummanager E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:95) 04-05 13:02:18.997 1614-1614/br.com.vitorvillar.aquariummanager E/AndroidRuntime: at android.os.Looper.loop(Looper.java:135) 04-05 13:02:18.997 1614-1614/br.com.vitorvillar.aquariummanager E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5253) 04-05 13:02:18.997 1614-1614/br.com.vitorvillar.aquariummanager E/AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 04-05 13:02:18.997 1614-1614/br.com.vitorvillar.aquariummanager E/AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:372) 04-05 13:02:18.997 1614-1614/br.com.vitorvillar.aquariummanager E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899) 04-05 13:02:18.997 1614-1614/br.com.vitorvillar.aquariummanager E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694) 04-05 13:02:18.997 1614-1614/br.com.vitorvillar.aquariummanager E/AndroidRuntime: Caused by: java.lang.reflect.InvocationTargetException 04-05 13:02:18.997 1614-1614/br.com.vitorvillar.aquariummanager E/AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 04-05 13:02:18.997 1614-1614/br.com.vitorvillar.aquariummanager E/AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:372) 04-05 13:02:18.997 1614-1614/br.com.vitorvillar.aquariummanager E/AndroidRuntime: at android.view.View$1.onClick(View.java:4002) 04-05 13:02:18.997 1614-1614/br.com.vitorvillar.aquariummanager E/AndroidRuntime: at android.view.View.performClick(View.java:4756)

    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.NullPointerException

      element cannot be mapped to a null key 2016-04-01 13:09:09.751755500 at java.util.Objects.requireNonNull(Objects.java:228) 2016-04-01 13:09:09.751756500 at java.util.stream.Collectors.lambda$groupingBy$176(Collectors.java:907) 2016-04-01 13:09:09.751756500 at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)

      at java.util.ArrayList.forEach()
    2. Java RT
      Sink$ChainedReference.end
      1. java.util.ArrayList.forEach(ArrayList.java:1249)
      2. java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:390)
      3. java.util.stream.Sink$ChainedReference.end(Sink.java:258)
      3 frames