java.lang.ClassCastException

Atlassian JIRA | Jeff Turner | 1 decade ago
  1. 0

    After adding a global Number field, creating two issues with values set, and sorting by the number CF, the page dies with the message: # Errors: null. Please manually reindex (Administration -> System -> Indexing) # null. Please manually reindex (Administration -> System -> Indexing) and in the logs, we get: java.lang.ClassCastException at com.atlassian.jira.issue.customfields.impl.NumberCFType.compare(NumberCFType.java:41) at com.atlassian.jira.issue.fields.CustomFieldImpl.compare(CustomFieldImpl.java:353) at com.atlassian.jira.issue.comparator.IssueCustomFieldComparator.compare(IssueCustomFieldComparator.java:55) at org.apache.commons.collections.comparators.ComparatorChain.compare(Unknown Source) at java.util.Arrays.mergeSort(Arrays.java:1278) at java.util.Arrays.sort(Arrays.java:1219) at java.util.Collections.sort(Collections.java:155) at com.atlassian.jira.issue.search.providers.DefaultSearchProvider.search(DefaultSearchProvider.java:63) at com.atlassian.jira.issue.managers.DefaultIssueManager.execute(DefaultIssueManager.java:231) at com.atlassian.jira.issue.managers.CachingIssueManager.execute(CachingIssueManager.java:99) 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:324) at com.atlassian.util.profiling.object.ObjectProfiler.profiledInvoke(ObjectProfiler.java:68) at com.atlassian.jira.config.component.DelegatingInvocationHandler.invoke(DelegatingInvocationHandler.java:27) at $Proxy4.execute(Unknown Source) at com.atlassian.jira.web.action.issue.IssueNavigator.getBrowsableItems(IssueNavigator.java:531) at com.atlassian.jira.web.action.issue.IssueNavigator.doExecute(IssueNavigator.java:412) at webwork.action.ActionSupport.execute(ActionSupport.java:151) at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:46) at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:131) at com.atlassian.jira.web.dispatcher.JiraServletDispatcher.service(JiraServletDispatcher.java:186) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:142) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:58) at com.atlassian.jira.web.filters.SitemeshExcludePathFilter.doFilter(SitemeshExcludePathFilter.java:36) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:168) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at com.atlassian.seraph.filter.LoginFilter.doFilter(LoginFilter.java:181) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at com.atlassian.util.profiling.filters.ProfilingFilter.doFilter(ProfilingFilter.java:132) at com.atlassian.jira.web.filters.ProfilingAndErrorFilter.doFilter(ProfilingAndErrorFilter.java:25) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at com.atlassian.jira.web.filters.ActionCleanupDelayFilter.doFilter(ActionCleanupDelayFilter.java:37) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at com.atlassian.johnson.filters.JohnsonFilter.doFilter(JohnsonFilter.java:91) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at com.atlassian.jira.web.filters.gzip.GzipFilter.doFilter(GzipFilter.java:72) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at com.atlassian.core.filters.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:36) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:193) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:549) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:589) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:666) at java.lang.Thread.run(Thread.java:534) 2004-10-27 09:21:45,573 ERROR [web.action.issue.IssueNavigator] Error searching: java.lang.ClassCastException at com.atlassian.jira.issue.customfields.impl.NumberCFType.compare(NumberCFType.java:41) at com.atlassian.jira.issue.fields.CustomFieldImpl.compare(CustomFieldImpl.java:353) at com.atlassian.jira.issue.comparator.IssueCustomFieldComparator.compare(IssueCustomFieldComparator.java:55) at org.apache.commons.collections.comparators.ComparatorChain.compare(Unknown Source) at java.util.Arrays.mergeSort(Arrays.java:1278) at java.util.Arrays.sort(Arrays.java:1219) at java.util.Collections.sort(Collections.java:155) at com.atlassian.jira.issue.search.providers.DefaultSearchProvider.search(DefaultSearchProvider.java:63) at com.atlassian.jira.issue.managers.DefaultIssueManager.execute(DefaultIssueManager.java:231) at com.atlassian.jira.issue.managers.CachingIssueManager.execute(CachingIssueManager.java:99) 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:324) at com.atlassian.util.profiling.object.ObjectProfiler.profiledInvoke(ObjectProfiler.java:68) at com.atlassian.jira.config.component.DelegatingInvocationHandler.invoke(DelegatingInvocationHandler.java:27) at $Proxy4.execute(Unknown Source) at com.atlassian.jira.web.action.issue.IssueNavigator.getBrowsableItems(IssueNavigator.java:531) at com.atlassian.jira.web.action.issue.IssueNavigator.doExecute(IssueNavigator.java:412) at webwork.action.ActionSupport.execute(ActionSupport.java:151) at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:46) at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:131) at com.atlassian.jira.web.dispatcher.JiraServletDispatcher.service(JiraServletDispatcher.java:186) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:142) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:58) at com.atlassian.jira.web.filters.SitemeshExcludePathFilter.doFilter(SitemeshExcludePathFilter.java:36) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:168) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at com.atlassian.seraph.filter.LoginFilter.doFilter(LoginFilter.java:181) This is with quite normal values: mysql> select * from customfieldvalue; +-------+-------+-------------+-----------+-----------+-------------+-------------+-----------+-----------+ | ID | ISSUE | CUSTOMFIELD | PARENTKEY | VALUETYPE | STRINGVALUE | NUMBERVALUE | TEXTVALUE | DATEVALUE | +-------+-------+-------------+-----------+-----------+-------------+-------------+-----------+-----------+ | 10000 | 10000 | 10000 | NULL | NULL | NULL | 1.000000 | NULL | NULL | | 10001 | 10001 | 10000 | NULL | NULL | NULL | 2.000000 | NULL | NULL | +-------+-------+-------------+-----------+-----------+-------------+-------------+-----------+-----------+

    Atlassian JIRA | 1 decade ago | Jeff Turner
    java.lang.ClassCastException
  2. 0

    ClassCastException : PortableRemoteObject.

    Oracle Community | 1 decade ago | 403765
    java.lang.ClassCastException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    ClassCastExcepiton Using POI

    Coderanch | 1 decade ago | chetan
    java.lang.ClassCastException

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

      No message provided

      at com.atlassian.jira.issue.customfields.impl.NumberCFType.compare()
    2. com.atlassian.jira
      IssueCustomFieldComparator.compare
      1. com.atlassian.jira.issue.customfields.impl.NumberCFType.compare(NumberCFType.java:41)
      2. com.atlassian.jira.issue.fields.CustomFieldImpl.compare(CustomFieldImpl.java:353)
      3. com.atlassian.jira.issue.comparator.IssueCustomFieldComparator.compare(IssueCustomFieldComparator.java:55)
      3 frames
    3. Commons Collections
      ComparatorChain.compare
      1. org.apache.commons.collections.comparators.ComparatorChain.compare(Unknown Source)
      1 frame
    4. Java RT
      Collections.sort
      1. java.util.Arrays.mergeSort(Arrays.java:1278)
      2. java.util.Arrays.sort(Arrays.java:1219)
      3. java.util.Collections.sort(Collections.java:155)
      3 frames
    5. com.atlassian.jira
      CachingIssueManager.execute
      1. com.atlassian.jira.issue.search.providers.DefaultSearchProvider.search(DefaultSearchProvider.java:63)
      2. com.atlassian.jira.issue.managers.DefaultIssueManager.execute(DefaultIssueManager.java:231)
      3. com.atlassian.jira.issue.managers.CachingIssueManager.execute(CachingIssueManager.java:99)
      3 frames
    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:324)
      4 frames
    7. com.atlassian.util
      ObjectProfiler.profiledInvoke
      1. com.atlassian.util.profiling.object.ObjectProfiler.profiledInvoke(ObjectProfiler.java:68)
      1 frame
    8. com.atlassian.jira
      DelegatingInvocationHandler.invoke
      1. com.atlassian.jira.config.component.DelegatingInvocationHandler.invoke(DelegatingInvocationHandler.java:27)
      1 frame
    9. Unknown
      $Proxy4.execute
      1. $Proxy4.execute(Unknown Source)
      1 frame
    10. com.atlassian.jira
      IssueNavigator.doExecute
      1. com.atlassian.jira.web.action.issue.IssueNavigator.getBrowsableItems(IssueNavigator.java:531)
      2. com.atlassian.jira.web.action.issue.IssueNavigator.doExecute(IssueNavigator.java:412)
      2 frames
    11. webwork.action
      ActionSupport.execute
      1. webwork.action.ActionSupport.execute(ActionSupport.java:151)
      1 frame
    12. com.atlassian.jira
      JiraActionSupport.execute
      1. com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:46)
      1 frame
    13. webwork.dispatcher
      GenericDispatcher.executeAction
      1. webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:131)
      1 frame
    14. com.atlassian.jira
      JiraServletDispatcher.service
      1. com.atlassian.jira.web.dispatcher.JiraServletDispatcher.service(JiraServletDispatcher.java:186)
      1 frame
    15. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      1 frame
    16. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      2 frames
    17. Sitemesh
      PageFilter.doFilter
      1. com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:142)
      2. com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:58)
      2 frames
    18. com.atlassian.jira
      SitemeshExcludePathFilter.doFilter
      1. com.atlassian.jira.web.filters.SitemeshExcludePathFilter.doFilter(SitemeshExcludePathFilter.java:36)
      1 frame
    19. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      2 frames
    20. com.atlassian.seraph
      SecurityFilter.doFilter
      1. com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:168)
      1 frame
    21. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      2 frames
    22. com.atlassian.seraph
      LoginFilter.doFilter
      1. com.atlassian.seraph.filter.LoginFilter.doFilter(LoginFilter.java:181)
      1 frame