com.atlassian.crowd.exception.OperationFailedException: Java heap space

Atlassian JIRA | Michael Heemskerk | 6 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    The logging of error messages that are received in the REST response from Crowd by the RestCrowdClient doesn't make it clear that the error message is coming from the remote system. This is confusing and is leading to issues in support where it's hard to figure out what exactly is going on in which system. An example from a recent FishEye support case. The customer opened a support issue with FishEye logs in which it appears that FishEye has run out of heap space: {noformat} com.atlassian.crowd.exception.OperationFailedException: Java heap space at com.atlassian.crowd.integration.rest.service.RestCrowdClient.handleCommonExceptions(RestCrowdClient.java:1084) at com.atlassian.crowd.integration.rest.service.RestCrowdClient.getNamesOfNestedUsersOfGroup(RestCrowdClient.java:677) at com.cenqua.fisheye.user.crowd.CrowdAuth$6.call(CrowdAuth.java:405) at com.cenqua.fisheye.user.crowd.CrowdAuth$6.call(CrowdAuth.java:403) at com.cenqua.fisheye.user.crowd.CrowdAuth.withTimer(CrowdAuth.java:92) at com.cenqua.fisheye.user.crowd.CrowdAuth.getUsersInGroup(CrowdAuth.java:403) at com.cenqua.fisheye.user.DefaultUserManager$16.write(DefaultUserManager.java:1057) at com.cenqua.fisheye.user.DefaultUserManager$16.write(DefaultUserManager.java:1050) at com.cenqua.fisheye.config.DB0Handle$2.write(DB0Handle.java:122) at com.cenqua.fisheye.config.DB0Handle.write(DB0Handle.java:96) at com.cenqua.fisheye.config.DB0Handle.write(DB0Handle.java:120) at com.cenqua.fisheye.user.DefaultUserManager.getUsersInGroup(DefaultUserManager.java:1050) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:196) at $Proxy25.getUsersInGroup(Unknown Source) {noformat} While it is actually Crowd that has run out of heap space and is letting FishEye know what is wrong. A lot of confusion could have been avoided if the log had simply said: *Error message from Crowd: Java heap space*

    Atlassian JIRA | 6 years ago | Michael Heemskerk
    com.atlassian.crowd.exception.OperationFailedException: Java heap space
  2. 0

    The logging of error messages that are received in the REST response from Crowd by the RestCrowdClient doesn't make it clear that the error message is coming from the remote system. This is confusing and is leading to issues in support where it's hard to figure out what exactly is going on in which system. An example from a recent FishEye support case. The customer opened a support issue with FishEye logs in which it appears that FishEye has run out of heap space: {noformat} com.atlassian.crowd.exception.OperationFailedException: Java heap space at com.atlassian.crowd.integration.rest.service.RestCrowdClient.handleCommonExceptions(RestCrowdClient.java:1084) at com.atlassian.crowd.integration.rest.service.RestCrowdClient.getNamesOfNestedUsersOfGroup(RestCrowdClient.java:677) at com.cenqua.fisheye.user.crowd.CrowdAuth$6.call(CrowdAuth.java:405) at com.cenqua.fisheye.user.crowd.CrowdAuth$6.call(CrowdAuth.java:403) at com.cenqua.fisheye.user.crowd.CrowdAuth.withTimer(CrowdAuth.java:92) at com.cenqua.fisheye.user.crowd.CrowdAuth.getUsersInGroup(CrowdAuth.java:403) at com.cenqua.fisheye.user.DefaultUserManager$16.write(DefaultUserManager.java:1057) at com.cenqua.fisheye.user.DefaultUserManager$16.write(DefaultUserManager.java:1050) at com.cenqua.fisheye.config.DB0Handle$2.write(DB0Handle.java:122) at com.cenqua.fisheye.config.DB0Handle.write(DB0Handle.java:96) at com.cenqua.fisheye.config.DB0Handle.write(DB0Handle.java:120) at com.cenqua.fisheye.user.DefaultUserManager.getUsersInGroup(DefaultUserManager.java:1050) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:196) at $Proxy25.getUsersInGroup(Unknown Source) {noformat} While it is actually Crowd that has run out of heap space and is letting FishEye know what is wrong. A lot of confusion could have been avoided if the log had simply said: *Error message from Crowd: Java heap space*

    Atlassian JIRA | 6 years ago | Michael Heemskerk
    com.atlassian.crowd.exception.OperationFailedException: Java heap space

    Root Cause Analysis

    1. com.atlassian.crowd.exception.OperationFailedException

      Java heap space

      at com.atlassian.crowd.integration.rest.service.RestCrowdClient.handleCommonExceptions()
    2. com.atlassian.crowd
      RestCrowdClient.getNamesOfNestedUsersOfGroup
      1. com.atlassian.crowd.integration.rest.service.RestCrowdClient.handleCommonExceptions(RestCrowdClient.java:1084)
      2. com.atlassian.crowd.integration.rest.service.RestCrowdClient.getNamesOfNestedUsersOfGroup(RestCrowdClient.java:677)
      2 frames
    3. com.cenqua.fisheye
      DefaultUserManager.getUsersInGroup
      1. com.cenqua.fisheye.user.crowd.CrowdAuth$6.call(CrowdAuth.java:405)
      2. com.cenqua.fisheye.user.crowd.CrowdAuth$6.call(CrowdAuth.java:403)
      3. com.cenqua.fisheye.user.crowd.CrowdAuth.withTimer(CrowdAuth.java:92)
      4. com.cenqua.fisheye.user.crowd.CrowdAuth.getUsersInGroup(CrowdAuth.java:403)
      5. com.cenqua.fisheye.user.DefaultUserManager$16.write(DefaultUserManager.java:1057)
      6. com.cenqua.fisheye.user.DefaultUserManager$16.write(DefaultUserManager.java:1050)
      7. com.cenqua.fisheye.config.DB0Handle$2.write(DB0Handle.java:122)
      8. com.cenqua.fisheye.config.DB0Handle.write(DB0Handle.java:96)
      9. com.cenqua.fisheye.config.DB0Handle.write(DB0Handle.java:120)
      10. com.cenqua.fisheye.user.DefaultUserManager.getUsersInGroup(DefaultUserManager.java:1050)
      10 frames
    4. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    5. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
      2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:196)
      2 frames
    6. Unknown
      $Proxy25.getUsersInGroup
      1. $Proxy25.getUsersInGroup(Unknown Source)
      1 frame