Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-6299

SCD ClassCastException ServiceRegistration cannot be cast to Comparable

    XMLWordPrintableJSON

Details

    Description

      The following exception was observed:

      java.lang.ClassCastException: org.apache.felix.framework.ServiceRegistrationImpl cannot be cast to java.lang.Comparable
              at java.util.concurrent.PriorityBlockingQueue.siftUpComparable(PriorityBlockingQueue.java:357)
              at java.util.concurrent.PriorityBlockingQueue.offer(PriorityBlockingQueue.java:489)
              at org.apache.sling.distribution.monitor.impl.MonitoringDistributionPackageBuilder.registerDistributionPackageMBean(MonitoringDistributionPackageBuilder.java:119)
              at org.apache.sling.distribution.monitor.impl.MonitoringDistributionPackageBuilder.createPackage(MonitoringDistributionPackageBuilder.java:65)
              at org.apache.sling.distribution.serialization.impl.vlt.VaultDistributionPackageBuilderFactory.createPackage(VaultDistributionPackageBuilderFactory.java:260)
              at org.apache.sling.distribution.packaging.impl.exporter.LocalDistributionPackageExporter.exportPackages(LocalDistributionPackageExporter.java:45)
              at org.apache.sling.distribution.agent.impl.SimpleDistributionAgent.exportPackages(SimpleDistributionAgent.java:214)
              at org.apache.sling.distribution.agent.impl.SimpleDistributionAgent.execute(SimpleDistributionAgent.java:182)
              at org.apache.sling.distribution.servlet.DistributionAgentServlet.doPost(DistributionAgentServlet.java:62)
              at org.apache.sling.api.servlets.SlingAllMethodsServlet.mayService(SlingAllMethodsServlet.java:149)
              at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:346)
      

      This is due to a violation of the contract of PriorityBlockingQueue, which expects Comparable objects OR a Comparator. ServiceRegistration is not comparable.

      Attachments

        1. SLING-6299-jsedding.patch
          0.9 kB
          Julian Sedding

        Activity

          People

            marett Timothee Maret
            jsedding Julian Sedding
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: