java.lang.ClassCastException: java.lang.String

Atlassian JIRA | Partha Kamal [Atlassian] | 9 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

    Using the \{userlister\} macro in a confluence page in confluence 2.7.1 causes the following error. The user management is osuser. (This error does not occur using hibernate for user management). {noformat} 2008-02-05 10:42:14,260 ERROR [http-8080-Processor3] [renderer.v2.components.MacroRendererComponent] processMacro Unexpected error formatting macro: userlister -- url: /dwr/exec/WysiwygConverter.convertToPreview.dwr | userName: admin java.lang.ClassCastException: java.lang.String at com.atlassian.user.search.EntityNameAlphaComparator.compare(EntityNameAlphaComparator.java:29) at java.util.TreeMap.compare(TreeMap.java:1093) at java.util.TreeMap.put(TreeMap.java:465) at java.util.TreeSet.add(TreeSet.java:210) at com.atlassian.user.impl.osuser.OSUGroupManager.getMemberNames(OSUGroupManager.java:155) at com.atlassian.user.impl.delegation.DelegatingGroupManagerTemplate.getMemberNames(DelegatingGroupManagerTemplate.java:81) at bucket.user.DefaultUserAccessor.getMemberNames(DefaultUserAccessor.java:580) 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:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:296) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:177) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144) at com.atlassian.spring.interceptors.SpringProfilingInterceptor.invoke(SpringProfilingInterceptor.java:20) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy26.getMemberNames(Unknown Source) at com.atlassian.confluence.extra.userlister.model.UserList.getUsersByGroup(UserList.java:91) at com.atlassian.confluence.extra.userlister.model.UserList.build(UserList.java:41) at com.atlassian.confluence.extra.userlister.UserLister.execute(UserLister.java:91) at com.atlassian.renderer.v2.macro.ResourceAwareMacroDecorator.execute(ResourceAwareMacroDecorator.java:45) at com.atlassian.renderer.v2.components.MacroRendererComponent.processMacro(MacroRendererComponent.java:254) at com.atlassian.renderer.v2.components.MacroRendererComponent.makeMacro(MacroRendererComponent.java:150) at com.atlassian.renderer.v2.components.WikiContentRendererHandler.handleMacro(WikiContentRendererHandler.java:18) at com.atlassian.renderer.v2.WikiMarkupParser.makeMacro(WikiMarkupParser.java:126) at com.atlassian.renderer.v2.WikiMarkupParser.makeMacro(WikiMarkupParser.java:114) at com.atlassian.renderer.v2.WikiMarkupParser.handlePotentialMacro(WikiMarkupParser.java:99) at com.atlassian.renderer.v2.WikiMarkupParser.parse(WikiMarkupParser.java:60) at com.atlassian.renderer.v2.components.MacroRendererComponent.render(MacroRendererComponent.java:46) at com.atlassian.renderer.v2.V2Renderer.render(V2Renderer.java:53) at com.atlassian.renderer.v2.V2RendererFacade.convertWikiToXHtml(V2RendererFacade.java:57) 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:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:296) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:177) {noformat}

    Atlassian JIRA | 9 years ago | Partha Kamal [Atlassian]
    java.lang.ClassCastException: java.lang.String
  2. 0

    Using the \{userlister\} macro in a confluence page in confluence 2.7.1 causes the following error. The user management is osuser. (This error does not occur using hibernate for user management). {noformat} 2008-02-05 10:42:14,260 ERROR [http-8080-Processor3] [renderer.v2.components.MacroRendererComponent] processMacro Unexpected error formatting macro: userlister -- url: /dwr/exec/WysiwygConverter.convertToPreview.dwr | userName: admin java.lang.ClassCastException: java.lang.String at com.atlassian.user.search.EntityNameAlphaComparator.compare(EntityNameAlphaComparator.java:29) at java.util.TreeMap.compare(TreeMap.java:1093) at java.util.TreeMap.put(TreeMap.java:465) at java.util.TreeSet.add(TreeSet.java:210) at com.atlassian.user.impl.osuser.OSUGroupManager.getMemberNames(OSUGroupManager.java:155) at com.atlassian.user.impl.delegation.DelegatingGroupManagerTemplate.getMemberNames(DelegatingGroupManagerTemplate.java:81) at bucket.user.DefaultUserAccessor.getMemberNames(DefaultUserAccessor.java:580) 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:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:296) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:177) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144) at com.atlassian.spring.interceptors.SpringProfilingInterceptor.invoke(SpringProfilingInterceptor.java:20) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy26.getMemberNames(Unknown Source) at com.atlassian.confluence.extra.userlister.model.UserList.getUsersByGroup(UserList.java:91) at com.atlassian.confluence.extra.userlister.model.UserList.build(UserList.java:41) at com.atlassian.confluence.extra.userlister.UserLister.execute(UserLister.java:91) at com.atlassian.renderer.v2.macro.ResourceAwareMacroDecorator.execute(ResourceAwareMacroDecorator.java:45) at com.atlassian.renderer.v2.components.MacroRendererComponent.processMacro(MacroRendererComponent.java:254) at com.atlassian.renderer.v2.components.MacroRendererComponent.makeMacro(MacroRendererComponent.java:150) at com.atlassian.renderer.v2.components.WikiContentRendererHandler.handleMacro(WikiContentRendererHandler.java:18) at com.atlassian.renderer.v2.WikiMarkupParser.makeMacro(WikiMarkupParser.java:126) at com.atlassian.renderer.v2.WikiMarkupParser.makeMacro(WikiMarkupParser.java:114) at com.atlassian.renderer.v2.WikiMarkupParser.handlePotentialMacro(WikiMarkupParser.java:99) at com.atlassian.renderer.v2.WikiMarkupParser.parse(WikiMarkupParser.java:60) at com.atlassian.renderer.v2.components.MacroRendererComponent.render(MacroRendererComponent.java:46) at com.atlassian.renderer.v2.V2Renderer.render(V2Renderer.java:53) at com.atlassian.renderer.v2.V2RendererFacade.convertWikiToXHtml(V2RendererFacade.java:57) 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:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:296) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:177) {noformat}

    Atlassian JIRA | 9 years ago | Partha Kamal [Atlassian]
    java.lang.ClassCastException: java.lang.String

    Root Cause Analysis

    1. java.lang.ClassCastException

      java.lang.String

      at com.atlassian.user.search.EntityNameAlphaComparator.compare()
    2. com.atlassian.user
      EntityNameAlphaComparator.compare
      1. com.atlassian.user.search.EntityNameAlphaComparator.compare(EntityNameAlphaComparator.java:29)
      1 frame
    3. Java RT
      TreeSet.add
      1. java.util.TreeMap.compare(TreeMap.java:1093)
      2. java.util.TreeMap.put(TreeMap.java:465)
      3. java.util.TreeSet.add(TreeSet.java:210)
      3 frames
    4. com.atlassian.user
      DelegatingGroupManagerTemplate.getMemberNames
      1. com.atlassian.user.impl.osuser.OSUGroupManager.getMemberNames(OSUGroupManager.java:155)
      2. com.atlassian.user.impl.delegation.DelegatingGroupManagerTemplate.getMemberNames(DelegatingGroupManagerTemplate.java:81)
      2 frames
    5. bucket.user
      DefaultUserAccessor.getMemberNames
      1. bucket.user.DefaultUserAccessor.getMemberNames(DefaultUserAccessor.java:580)
      1 frame
    6. 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:585)
      4 frames
    7. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:296)
      2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:177)
      3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
      3 frames
    8. com.atlassian.spring
      SpringProfilingInterceptor.invoke
      1. com.atlassian.spring.interceptors.SpringProfilingInterceptor.invoke(SpringProfilingInterceptor.java:20)
      1 frame
    9. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
      1 frame
    10. Spring Tx
      TransactionInterceptor.invoke
      1. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
      1 frame
    11. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
      2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      2 frames
    12. Unknown
      $Proxy26.getMemberNames
      1. $Proxy26.getMemberNames(Unknown Source)
      1 frame
    13. com.atlassian.confluence
      UserLister.execute
      1. com.atlassian.confluence.extra.userlister.model.UserList.getUsersByGroup(UserList.java:91)
      2. com.atlassian.confluence.extra.userlister.model.UserList.build(UserList.java:41)
      3. com.atlassian.confluence.extra.userlister.UserLister.execute(UserLister.java:91)
      3 frames
    14. com.atlassian.renderer
      V2RendererFacade.convertWikiToXHtml
      1. com.atlassian.renderer.v2.macro.ResourceAwareMacroDecorator.execute(ResourceAwareMacroDecorator.java:45)
      2. com.atlassian.renderer.v2.components.MacroRendererComponent.processMacro(MacroRendererComponent.java:254)
      3. com.atlassian.renderer.v2.components.MacroRendererComponent.makeMacro(MacroRendererComponent.java:150)
      4. com.atlassian.renderer.v2.components.WikiContentRendererHandler.handleMacro(WikiContentRendererHandler.java:18)
      5. com.atlassian.renderer.v2.WikiMarkupParser.makeMacro(WikiMarkupParser.java:126)
      6. com.atlassian.renderer.v2.WikiMarkupParser.makeMacro(WikiMarkupParser.java:114)
      7. com.atlassian.renderer.v2.WikiMarkupParser.handlePotentialMacro(WikiMarkupParser.java:99)
      8. com.atlassian.renderer.v2.WikiMarkupParser.parse(WikiMarkupParser.java:60)
      9. com.atlassian.renderer.v2.components.MacroRendererComponent.render(MacroRendererComponent.java:46)
      10. com.atlassian.renderer.v2.V2Renderer.render(V2Renderer.java:53)
      11. com.atlassian.renderer.v2.V2RendererFacade.convertWikiToXHtml(V2RendererFacade.java:57)
      11 frames
    15. 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:585)
      4 frames
    16. Spring AOP
      ReflectiveMethodInvocation.invokeJoinpoint
      1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:296)
      2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:177)
      2 frames