Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Content Distribution Core 0.1.18
-
None
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.