[rules-users] Trivial bug in Planner 5.4.Beta1 : misleading error message when the wrong entity was annotated with @PlanningEntityCollectionProperty

aitchnyu jesvinj at technovia.co.in
Thu Mar 1 01:26:42 EST 2012


I accidently denoted the wrong class with the annotator
@PlanningEntityCollectionProperty ; a class which was NOT a planning entity.
Apparently, Drools Planner does not attempt to check for such a possibility,
hence I get:

*--OUTPUT--*
Exception in thread "main" java.lang.NullPointerException
	at
org.drools.planner.core.domain.solution.SolutionDescriptor.getAllFacts(SolutionDescriptor.java:135)
	at
org.drools.planner.core.solution.director.DefaultSolutionDirector.getWorkingFacts(DefaultSolutionDirector.java:129)
	at
org.drools.planner.core.solution.director.DefaultSolutionDirector.resetWorkingMemory(DefaultSolutionDirector.java:123)
	at
org.drools.planner.core.solution.director.DefaultSolutionDirector.setWorkingSolution(DefaultSolutionDirector.java:97)
	at
org.drools.planner.core.solver.DefaultSolver.setPlanningProblem(DefaultSolver.java:97)
	at in.co.technovia.examduties.ExamDutiesApp.main(ExamDutiesApp.java:47)
*--OUTPUT--*

Please check for such a possibility in future versions of Drools Planner and
emit a more meaningful error message.


--
View this message in context: http://drools.46999.n3.nabble.com/Trivial-bug-in-Planner-5-4-Beta1-misleading-error-message-when-the-wrong-entity-was-annotated-with-Py-tp3789607p3789607.html
Sent from the Drools: User forum mailing list archive at Nabble.com.



More information about the rules-users mailing list