[
https://issues.jboss.org/browse/JBRULES-3265?page=com.atlassian.jira.plug...
]
Geoffrey De Smet commented on JBRULES-3265:
-------------------------------------------
added
{code}
if (!planningValueIterator.hasNext()) {
throw new IllegalStateException("The planningEntity (" +
planningEntity + ") has a planning variable ("
+ planningVariableDescriptor.getVariablePropertyName() + ") which
has no planning values.");
}
{code}
Planner crashes with NoSuchElementException in PlanningValueWalker
------------------------------------------------------------------
Key: JBRULES-3265
URL:
https://issues.jboss.org/browse/JBRULES-3265
Project: Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: drools-planner
Reporter: Geoffrey De Smet
Assignee: Geoffrey De Smet
Priority: Minor
Fix For: 5.4.0.Beta1
"
After debugging, seems like cachedPlanningValues in PlanningValueCreator is
being created as an empty collection and when PlanningValueWalker gets
cachedPlanningValues's iterator and tries to iterate through it then it gets
a NoSuchElementException. I am a little confused as to when the
extractPlanningValues method is called in PlanningValueSelector to get a
collection of planned values a null is begin passed in instead of a planning
entity which is responsible for the empty cachedPlanningValues collection.
"
{code}
java.util.NoSuchElementException
at java.util.AbstractList$SimpleListIterator.next(AbstractList.java:61)
at
org.drools.planner.core.heuristic.selector.variable.PlanningValueWalker.initWalk(PlanningValueWalker.java:90)
at
org.drools.planner.core.heuristic.selector.variable.PlanningVariableWalker.initWalk(PlanningVariableWalker.java:104)
at
org.drools.planner.core.constructionheuristic.greedyFit.decider.DefaultGreedyDecider.decideNextStep(DefaultGreedyDecider.java:58)
at
org.drools.planner.core.constructionheuristic.greedyFit.DefaultGreedyFitSolverPhase.solve(DefaultGreedyFitSolverPhase.java:62)
at
org.drools.planner.core.solver.DefaultSolver.runSolverPhases(DefaultSolver.java:166)
at
org.drools.planner.core.solver.DefaultSolver.solve(DefaultSolver.java:138)
{code}
--
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