[jboss-jira] [JBoss JIRA] (JBRULES-3406) Planner: a Solution without a @PlanningEntityCollectionProperty or @PlanningEntityProperty should fail fast with a decent error message.
Geoffrey De Smet (JIRA)
jira-events at lists.jboss.org
Thu Mar 1 03:11:40 EST 2012
Geoffrey De Smet created JBRULES-3406:
-----------------------------------------
Summary: Planner: a Solution without a @PlanningEntityCollectionProperty or @PlanningEntityProperty should fail fast with a decent error message.
Key: JBRULES-3406
URL: https://issues.jboss.org/browse/JBRULES-3406
Project: Drools
Issue Type: Enhancement
Security Level: Public (Everyone can see)
Components: drools-planner
Reporter: Geoffrey De Smet
Assignee: Geoffrey De Smet
Fix For: 5.4.0.CR1
"
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:
{code}
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)
{code}
Please check for such a possibility in future versions of Drools Planner and
emit a more meaningful error message.
"
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list