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

Workbench: Solver config editor's call to build a SolverFactory should pass the ProjectClassLoader as ClassLoader

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • 6.4.0.CR1
    • None
    • optaplanner-wb
    • None
    • NEW
    • NEW

      Pressing the "validate" button in the solver configuration editor fails with the message "The scanAnnotatedClasses (ScanAnnotatedClassesConfig()) did not find any classes with a PlanningSolution annotation."

      This is because the ProjectClassLoader isn't passed to the SolverFactory:

      Instead of

         SolverFactory.createFrom...(...);
      

      use

         ClassLoader projectClassLoader = ...;
         SolverFactory.createFrom...(..., projectClassLoader);
      

      Not sure how to get the ProjectClassLoader, but Walter might know:

      <wmedvede> ... the classes generated by the datamodeller (once compiled) are accessible through the ProjectClassLoader, they are not in the SystemClassLoader

            trikkola Toni Rikkola
            gdesmet@redhat.com Geoffrey De Smet (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: