java.lang.ClassCastException

org.demo.DemoApp.domain.JobAssignment cannot be cast to org.demo.DemoApp.domain.Employee

Solutions on the web19030

  • via JBoss Issue Tracker by Geoffrey De Smet, 10 months ago
    org.demo.DemoApp.domain.JobAssignment cannot be cast to org.demo.DemoApp.domain.Employee
  • via JBoss Issue Tracker by Geoffrey De Smet, 1 year ago
    org.demo.DemoApp.domain.JobAssignment cannot be cast to org.demo.DemoApp.domain.Employee
  • org.demo.DemoApp.domain.JobAssignment cannot be cast to org.demo.DemoApp.domain.Employee
  • Stack trace

    • java.lang.ClassCastException: org.demo.DemoApp.domain.JobAssignment cannot be cast to org.demo.DemoApp.domain.Employee at org.demo.DemoApp.domain.solver.EmployeeStrengthComparator.compare(EmployeeStrengthComparator.java:12) at java.util.TimSort.countRunAndMakeAscending(TimSort.java:355) at java.util.TimSort.sort(TimSort.java:220) at java.util.Arrays.sort(Arrays.java:1512) at java.util.ArrayList.sort(ArrayList.java:1454) at java.util.Collections.sort(Collections.java:175) at org.optaplanner.core.impl.heuristic.selector.common.decorator.ComparatorSelectionSorter.sort(ComparatorSelectionSorter.java:45) at org.optaplanner.core.impl.heuristic.selector.value.decorator.SortingValueSelector.constructCache(SortingValueSelector.java:43) at org.optaplanner.core.impl.heuristic.selector.common.SelectionCacheLifecycleBridge.phaseStarted(SelectionCacheLifecycleBridge.java:49) at org.optaplanner.core.impl.phase.event.PhaseLifecycleSupport.firePhaseStarted(PhaseLifecycleSupport.java:39)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    You are the first who have seen this exception. Write a tip to help other users and build your expert profile.