Skip to content
Advertisement

Optaplanner – spring BeanCreationException

I’m migrating Optaplanner from v7.x to v8.14 on a project that uses spring-boot (as a web api).

I’ve added the optaplanner-spring-boot-starter dependency to the project, however when starting the application, I got the following error :

JavaScript

The project is in two separated modules, one with everything related to Optaplanner (the config.xml, the .drl, the Solution, etc), the other is the spring-boot web api.

Here are the dependencies (.gradle) for both :

module “my-roster”

JavaScript

module “web-app”

JavaScript

the SolverConfig file :

JavaScript

And the MySolution file :

JavaScript

EDIT : The @PlanningSolution class and the configuration files are in one module, the solverConfig, solverFactory, scoreManager, etc. are all built in the other package, could this be an issue in v8+ ?

Advertisement

Answer

This is a bug in Optaplanner, the current workaround is to move the needed code from the different modules into one. Not ideal, but it works. To follow the issue : https://issues.redhat.com/browse/PLANNER-2600 Once resolved, this bug should not happen anymore.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement