Optaplanner генерирует нулевое значение NullPointerException при выполнении кода ниже
SolverFactory<ScheduleSolution> solverFactory = SolverFactory.createFromXmlResource("scheduleSolverConfiguration.xml");
Solver<ScheduleSolution> a = solverFactory.buildSolver();
Я использую ConstraintProvider вместо прямого слюни
<?xml version="1.0" encoding="UTF-8"?>
<solver>
<scanAnnotatedClasses/>
<scoreDirectorFactory>
<constraintProviderClass>ScheduleConstraintProvider</constraintProviderClass>
</scoreDirectorFactory>
<termination>
<secondsSpentLimit>10</secondsSpentLimit>
</termination>
</solver>
Трассировка исключений
Exception in thread "main" java.lang.NullPointerException
at org.optaplanner.core.impl.score.stream.drools.DroolsConstraintFactory.<init>(DroolsConstraintFactory.java:51)
at org.optaplanner.core.impl.score.director.stream.ConstraintStreamScoreDirectorFactory.<init>(ConstraintStreamScoreDirectorFactory.java:52)
at org.optaplanner.core.config.score.director.ScoreDirectorFactoryConfig.buildConstraintStreamScoreDirectorFactory(ScoreDirectorFactoryConfig.java:563)
at org.optaplanner.core.config.score.director.ScoreDirectorFactoryConfig.buildScoreDirectorFactory(ScoreDirectorFactoryConfig.java:461)
at org.optaplanner.core.config.solver.SolverConfig.buildScoreDirectorFactory(SolverConfig.java:606)
at org.optaplanner.core.config.solver.SolverConfig.buildSolver(SolverConfig.java:514)
at org.optaplanner.core.impl.solver.DefaultSolverFactory.buildSolver(DefaultSolverFactory.java:49)
optaplanner версия - 7.36.0