java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to com.atlassian.confluence.labels.Labelling

Atlassian JIRA | Steve Lancashire [Atlassian] | 5 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

    I've accidentally modified the select clause for CurrentContentForLabelAndSpace when reverting to performant label queries for: CONF-25236 This is used by the Master Details Macro {code} [INFO] [talledLocalContainer] 2012-06-11 12:08:21,698 ERROR [http-1990-2] [xhtml.view.macro.ViewMacroMarshaller] marshal Error rendering macro: detailssummary [INFO] [talledLocalContainer] -- url: /confluence/pages/viewpage.action | userName: admin | action: viewpage | page: 917525 [INFO] [talledLocalContainer] java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to com.atlassian.confluence.labels.Labelling [INFO] [talledLocalContainer] at com.atlassian.confluence.labels.persistence.dao.hibernate.HibernateLabelDao$10.apply(HibernateLabelDao.java:857) [INFO] [talledLocalContainer] at com.google.common.collect.Lists$TransformingRandomAccessList.get(Lists.java:451) [INFO] [talledLocalContainer] at java.util.AbstractList$Itr.next(AbstractList.java:345) [INFO] [talledLocalContainer] at com.google.common.collect.Iterators$7.computeNext(Iterators.java:644) [INFO] [talledLocalContainer] at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:141) [INFO] [talledLocalContainer] at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:136) [INFO] [talledLocalContainer] at com.google.common.collect.Iterators.size(Iterators.java:147) [INFO] [talledLocalContainer] at com.google.common.collect.Collections2$FilteredCollection.size(Collections2.java:222) [INFO] [talledLocalContainer] at com.google.common.collect.Collections2$TransformedCollection.size(Collections2.java:288) [INFO] [talledLocalContainer] at java.util.AbstractCollection.toArray(AbstractCollection.java:119) [INFO] [talledLocalContainer] at java.util.ArrayList.<init>(ArrayList.java:131) [INFO] [talledLocalContainer] at com.atlassian.confluence.extra.masterdetail.DetailsSummaryMacro.execute(DetailsSummaryMacro.java:227) {code} It's a simple fix, and will add an integration test for this query.

    Atlassian JIRA | 5 years ago | Steve Lancashire [Atlassian]
    java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to com.atlassian.confluence.labels.Labelling
  2. 0

    I've accidentally modified the select clause for CurrentContentForLabelAndSpace when reverting to performant label queries for: CONF-25236 This is used by the Master Details Macro {code} [INFO] [talledLocalContainer] 2012-06-11 12:08:21,698 ERROR [http-1990-2] [xhtml.view.macro.ViewMacroMarshaller] marshal Error rendering macro: detailssummary [INFO] [talledLocalContainer] -- url: /confluence/pages/viewpage.action | userName: admin | action: viewpage | page: 917525 [INFO] [talledLocalContainer] java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to com.atlassian.confluence.labels.Labelling [INFO] [talledLocalContainer] at com.atlassian.confluence.labels.persistence.dao.hibernate.HibernateLabelDao$10.apply(HibernateLabelDao.java:857) [INFO] [talledLocalContainer] at com.google.common.collect.Lists$TransformingRandomAccessList.get(Lists.java:451) [INFO] [talledLocalContainer] at java.util.AbstractList$Itr.next(AbstractList.java:345) [INFO] [talledLocalContainer] at com.google.common.collect.Iterators$7.computeNext(Iterators.java:644) [INFO] [talledLocalContainer] at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:141) [INFO] [talledLocalContainer] at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:136) [INFO] [talledLocalContainer] at com.google.common.collect.Iterators.size(Iterators.java:147) [INFO] [talledLocalContainer] at com.google.common.collect.Collections2$FilteredCollection.size(Collections2.java:222) [INFO] [talledLocalContainer] at com.google.common.collect.Collections2$TransformedCollection.size(Collections2.java:288) [INFO] [talledLocalContainer] at java.util.AbstractCollection.toArray(AbstractCollection.java:119) [INFO] [talledLocalContainer] at java.util.ArrayList.<init>(ArrayList.java:131) [INFO] [talledLocalContainer] at com.atlassian.confluence.extra.masterdetail.DetailsSummaryMacro.execute(DetailsSummaryMacro.java:227) {code} It's a simple fix, and will add an integration test for this query.

    Atlassian JIRA | 5 years ago | Steve Lancashire [Atlassian]
    java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to com.atlassian.confluence.labels.Labelling

    Root Cause Analysis

    1. java.lang.ClassCastException

      [Ljava.lang.Object; cannot be cast to com.atlassian.confluence.labels.Labelling

      at com.atlassian.confluence.labels.persistence.dao.hibernate.HibernateLabelDao$10.apply()
    2. com.atlassian.confluence
      HibernateLabelDao$10.apply
      1. com.atlassian.confluence.labels.persistence.dao.hibernate.HibernateLabelDao$10.apply(HibernateLabelDao.java:857)
      1 frame
    3. Guava
      Lists$TransformingRandomAccessList.get
      1. com.google.common.collect.Lists$TransformingRandomAccessList.get(Lists.java:451)
      1 frame
    4. Java RT
      AbstractList$Itr.next
      1. java.util.AbstractList$Itr.next(AbstractList.java:345)
      1 frame
    5. Guava
      Collections2$TransformedCollection.size
      1. com.google.common.collect.Iterators$7.computeNext(Iterators.java:644)
      2. com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:141)
      3. com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:136)
      4. com.google.common.collect.Iterators.size(Iterators.java:147)
      5. com.google.common.collect.Collections2$FilteredCollection.size(Collections2.java:222)
      6. com.google.common.collect.Collections2$TransformedCollection.size(Collections2.java:288)
      6 frames
    6. Java RT
      ArrayList.<init>
      1. java.util.AbstractCollection.toArray(AbstractCollection.java:119)
      2. java.util.ArrayList.<init>(ArrayList.java:131)
      2 frames
    7. com.atlassian.confluence
      DetailsSummaryMacro.execute
      1. com.atlassian.confluence.extra.masterdetail.DetailsSummaryMacro.execute(DetailsSummaryMacro.java:227)
      1 frame