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

    Details

    • Sprint:
      2020 Week 22-24 (from May 25), 2020 Week 25-27 (from Jun 15), 2020 Week 28-30 (from Jul 6)
    • Story Points:
      5
    • Steps to Reproduce:
      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.
    • Docs QE Status:
      NEW
    • QE Status:
      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>
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                ge0ffrey Geoffrey De Smet
                Reporter:
                jucui Julian Cui
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: