I'm getting an unexplained NullPointerException in my OptaPlanner program:
09:52:08.016 [main] INFO org.reflections.Reflections - Reflections took 44 ms to scan 1 urls, producing 5 keys and 5 values
09:52:08.163 [main] INFO o.o.core.impl.solver.DefaultSolver - Solving started: time spent (17), best score (-191hard/3350soft), environment mode (REPRODUCIBLE), random (JDK with seed 0).
Exception in thread "main" java.lang.NullPointerException
at org.optaplanner.core.impl.solver.recaller.BestSolutionRecaller.updateBestSolution(BestSolutionRecaller.java:128)
at org.optaplanner.core.impl.solver.recaller.BestSolutionRecaller.updateBestSolution(BestSolutionRecaller.java:123)
at org.optaplanner.core.impl.constructionheuristic.DefaultConstructionHeuristicPhase.phaseEnded(DefaultConstructionHeuristicPhase.java:154)
at org.optaplanner.core.impl.constructionheuristic.DefaultConstructionHeuristicPhase.solve(DefaultConstructionHeuristicPhase.java:102)
at org.optaplanner.core.impl.solver.AbstractSolver.runPhases(AbstractSolver.java:87)
at org.optaplanner.core.impl.solver.DefaultSolver.solve(DefaultSolver.java:173)
at JantermRunner.main(JantermRunner.java:28)
This is my first time using OptaPlanner, so I am fully confident that I goofed somewhere, but this error doesn't really give me any information on where I went wrong, since all of the referenced lines are OptaPlanner code. (JantermRunner line 28 is just the call to solver.solve)
EDIT: To be clear - I do understand what a null pointer exception is, I just don't know how to set up my OptaPlanner program in a way that won't cause one somewhere down the line.