Uploaded image for project: 'OptaPlanner'
  1. OptaPlanner
  2. PLANNER-1997

Spring Boot EntityScanner doesn't detect @Planning annotations when they are in abstract classes or interfaces

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 8.0.0.Beta1
    • 7.39.0.Final
    • optaplanner-core
    • None
    • 2020 Week 22-24 (from May 25), 2020 Week 25-27 (from Jun 15), 2020 Week 28-30 (from Jul 6)
    • 5
    • Hide

      Steps to reproduce in optaweb-vehicle-routing:

      • Remove all <solutionClass> and <entityClass> elements in solverConfig.xml
      • Debug the application and set breakpoint in findEntityClassList() method. Inspect entityClassSet, notice it doesn't contain the entity classes.
      Show
      Steps to reproduce in optaweb-vehicle-routing: Remove all <solutionClass> and <entityClass> elements in solverConfig.xml Debug the application and set breakpoint in findEntityClassList() method. Inspect entityClassSet, notice it doesn't contain the entity classes.
    • NEW
    • NEW

    Description

      Reproducible in Spring Boot examples with chained variables in abstract classes/interfaces (task assigning, VRP).

      Workaround

      add a

      src/main/resources/solverConfig.xml
      

      which explicitly lists all entityClasses:

      <solver>
         <solutionClass>...</solutionClass>
         <entityClass>...Standstill</entityClass>
         <entityClass>...Customer</entityClass>
         <entityClass>...Vehicle</entityClass>
      </solver>
      

      Attachments

        Activity

          People

            gdesmet@redhat.com Geoffrey De Smet (Inactive)
            jucui Julian Cui (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: