[jboss-jira] [JBoss JIRA] (DROOLS-2170) Unhelful error message: "Unknown property" should not only mention the name of the property, but also the class on which it is expecting it (and the DRL line causing it)
Mario Fusco (JIRA)
issues at jboss.org
Tue Dec 12 04:18:00 EST 2017
[ https://issues.jboss.org/browse/DROOLS-2170?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mario Fusco updated DROOLS-2170:
--------------------------------
Sprint: 2017 Week 49-50
> Unhelful error message: "Unknown property" should not only mention the name of the property, but also the class on which it is expecting it (and the DRL line causing it)
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: DROOLS-2170
> URL: https://issues.jboss.org/browse/DROOLS-2170
> Project: Drools
> Issue Type: Enhancement
> Components: core engine
> Affects Versions: 7.5.0.Final
> Reporter: Geoffrey De Smet
> Assignee: Mario Fusco
>
> I had no idea which class file it's expecting the room property on in this error message.
> I 'll needed to look for a needle in a haystack:
> {code}
> Caused by: java.lang.RuntimeException: Unknown property: room
> at org.drools.core.reteoo.PropertySpecificUtil.setPropertyOnMask(PropertySpecificUtil.java:105)
> at org.drools.core.reteoo.PropertySpecificUtil.calculatePatternMask(PropertySpecificUtil.java:97)
> at org.drools.core.reteoo.PropertySpecificUtil.calculatePositiveMask(PropertySpecificUtil.java:68)
> at org.drools.core.common.NamedEntryPoint.update(NamedEntryPoint.java:327)
> at org.drools.core.impl.StatefulKnowledgeSessionImpl.update(StatefulKnowledgeSessionImpl.java:1545)
> at org.optaplanner.core.impl.score.director.drools.DroolsScoreDirector.update(DroolsScoreDirector.java:210)
> at org.optaplanner.core.impl.score.director.drools.DroolsScoreDirector.afterVariableChanged(DroolsScoreDirector.java:197)
> at org.optaplanner.core.impl.heuristic.selector.move.generic.ChangeMove.doMoveOnGenuineVariables(ChangeMove.java:78)
> at org.optaplanner.core.impl.heuristic.move.AbstractMove.doMove(AbstractMove.java:37)
> at org.optaplanner.core.impl.heuristic.move.AbstractMove.doMove(AbstractMove.java:27)
> at org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider.doMove(ConstructionHeuristicDecider.java:124)
> at org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider.decideNextStep(ConstructionHeuristicDecider.java:99)
> at org.optaplanner.core.impl.constructionheuristic.DefaultConstructionHeuristicPhase.solve(DefaultConstructionHeuristicPhase.java:74)
> at org.optaplanner.core.impl.solver.AbstractSolver.runPhases(AbstractSolver.java:87)
> at org.optaplanner.core.impl.solver.DefaultSolver.solve(DefaultSolver.java:167)
> at org.optaplanner.examples.common.business.SolutionBusiness.solve(SolutionBusiness.java:329)
> at org.optaplanner.examples.common.swingui.SolverAndPersistenceFrame$SolveWorker.doInBackground(SolverAndPersistenceFrame.java:324)
> at javax.swing.SwingWorker$1.call(SwingWorker.java:295)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at javax.swing.SwingWorker.run(SwingWorker.java:334)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> {code}
> Reproduce recipe:
> - take meeting scheduling example in optaplanner-examplse
> - remove getters and setters for room in MeetingAssignment.java
> - remove all rules in the drl (to avoid it crashing on something else sooner), especially those that involve the room.
> - the error occurs when DroolsScoreDirector.update(meetingAssignment, "room") is called
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
More information about the jboss-jira
mailing list