java.lang.IllegalArgumentException: argument type mismatch

JBoss Issue Tracker | Geoffrey De Smet | 1 year ago
  1. 0

    see http://stackoverflow.com/questions/34029457/optaplanner-classcastexception-at-comparatorselectionsorter better than getting this unhelpful exception: {code} Exception in thread "main" 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) {code} or this one {code} java.lang.IllegalArgumentException: argument type mismatch at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.optaplanner.core.impl.domain.common.accessor.BeanPropertyMemberAccessor.executeSetter(BeanPropertyMemberAccessor.java:86) {code}

    JBoss Issue Tracker | 1 year ago | Geoffrey De Smet
    java.lang.IllegalArgumentException: argument type mismatch
  2. 0

    see http://stackoverflow.com/questions/34029457/optaplanner-classcastexception-at-comparatorselectionsorter better than getting this unhelpful exception: {code} Exception in thread "main" 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) {code} or this one {code} java.lang.IllegalArgumentException: argument type mismatch at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.optaplanner.core.impl.domain.common.accessor.BeanPropertyMemberAccessor.executeSetter(BeanPropertyMemberAccessor.java:86) {code}

    JBoss Issue Tracker | 1 year ago | Geoffrey De Smet
    java.lang.IllegalArgumentException: argument type mismatch
  3. 0

    java.lang.IllegalArgumentException with PojoDependencyInjector

    GitHub | 3 years ago | hbrackmann
    java.lang.IllegalArgumentException: argument type mismatch
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Addon Prowl 1.4 issue

    GitHub | 3 years ago | fbodart
    java.lang.IllegalStateException: Could not invoke method: org.openhab.action.prowl.internal.Prowl.pushNotification(java.lang.String,java.lang.String,java.lang.String) on instance: null
  6. 0

    @Consumes doesn't work with JSON

    Stack Overflow | 2 years ago | Everv0id
    java.lang.IllegalArgumentException: argument type mismatch

  1. Aria Pahlavan 16 times, last 3 weeks ago
  2. kjhdofjosvs 2 times, last 1 month ago
  3. tyson925 2 times, last 1 month ago
  4. kuldeep 2 times, last 2 months ago
  5. aldrinleal 1 times, last 5 months ago
6 more registered users
72 unregistered visitors
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.IllegalArgumentException

    argument type mismatch

    at sun.reflect.NativeMethodAccessorImpl.invoke0()
  2. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:606)
    4 frames
  3. org.optaplanner.core
    BeanPropertyMemberAccessor.executeSetter
    1. org.optaplanner.core.impl.domain.common.accessor.BeanPropertyMemberAccessor.executeSetter(BeanPropertyMemberAccessor.java:86)
    1 frame