[JBoss JIRA] (DROOLS-668) java.lang.IllegalStateException: Score corruption for 'employeeWeeklyHours' rule
by Mario Fusco (JIRA)
[ https://issues.jboss.org/browse/DROOLS-668?page=com.atlassian.jira.plugin... ]
Mario Fusco resolved DROOLS-668.
--------------------------------
Fix Version/s: 6.2.0.Final
Resolution: Done
Fixed by https://github.com/droolsjbpm/drools/commit/fc138123a
> java.lang.IllegalStateException: Score corruption for 'employeeWeeklyHours' rule
> --------------------------------------------------------------------------------
>
> Key: DROOLS-668
> URL: https://issues.jboss.org/browse/DROOLS-668
> Project: Drools
> Issue Type: Bug
> Affects Versions: 6.2.0.CR2
> Environment: Windows 8 x64, java version 8 (1.8.0_25), IntelliJ IDE Community Edition
> Reporter: Marco Alesiani
> Assignee: Mario Fusco
> Labels: new_and_noteworthy
> Fix For: 6.2.0.Final
>
> Attachments: reproducer.zip, reproducer.zip
>
>
> I've been getting the error
> {quote}
> Exception in thread "main" java.lang.IllegalStateException: Score corruption: the workingScore (-1300hard/0soft) is not the uncorruptedScore (-1320hard/0soft) after completedAction ([ShiftAssignment for shift: MONDAY, from 8:0 to 8:20, assigned employee: null => null, ShiftAssignment for shift: MONDAY, from 8:0 to 8:20, assigned employee: null => null]):
> Score corruption analysis could not be generated because either corrupted constraintMatchEnabled (true) or uncorrupted constraintMatchEnabled (false) is disabled.
> Check your score constraints manually.
> at org.optaplanner.core.impl.score.director.AbstractScoreDirector.assertWorkingScoreFromScratch(AbstractScoreDirector.java:296)
> at org.optaplanner.core.impl.phase.scope.AbstractPhaseScope.assertExpectedUndoMoveScore(AbstractPhaseScope.java:139)
> at org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider.doMove(ConstructionHeuristicDecider.java:108)
> at org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider.decideNextStep(ConstructionHeuristicDecider.java:77)
> at org.optaplanner.core.impl.constructionheuristic.DefaultConstructionHeuristicPhase.solve(DefaultConstructionHeuristicPhase.java:67)
> at org.optaplanner.core.impl.solver.DefaultSolver.runPhases(DefaultSolver.java:213)
> at org.optaplanner.core.impl.solver.DefaultSolver.solve(DefaultSolver.java:176)
> at TeRo.TeRoAppMain.main(TeRoAppMain.java:25)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:483)
> at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
> {quote}
> when executing the following rule with an EasyScoreCalculator
> {code:drl}
> // Employees are forced to work the exact amount specified in their contracts
> rule "employeeWeeklyHours"
> when
> $employee : Employee( $weeklyHours : weeklyHours, weeklyHoursAreMandatory == true )
> $totalWorkAssignedMinutes : Number(intValue != $weeklyHours * 60)
> from accumulate( $shiftAssignment : ShiftAssignment( $shift : shift )
> and eval($shiftAssignment.employeeIsAssigned($employee) == true)
> and Shift(this == $shift, $shiftTime : shiftTime),
> sum($shiftTime.getShiftTotalMinutes())
> )
> then
> scoreHolder.addHardConstraintMatch( kcontext, -1 * Math.abs($totalWorkAssignedMinutes.intValue() - $weeklyHours * 60) );
> end
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
10 years, 1 month
[JBoss JIRA] (DROOLS-668) java.lang.IllegalStateException: Score corruption for 'employeeWeeklyHours' rule
by Mario Fusco (JIRA)
[ https://issues.jboss.org/browse/DROOLS-668?page=com.atlassian.jira.plugin... ]
Mario Fusco reassigned DROOLS-668:
----------------------------------
Assignee: Mario Fusco (was: Geoffrey De Smet)
> java.lang.IllegalStateException: Score corruption for 'employeeWeeklyHours' rule
> --------------------------------------------------------------------------------
>
> Key: DROOLS-668
> URL: https://issues.jboss.org/browse/DROOLS-668
> Project: Drools
> Issue Type: Bug
> Affects Versions: 6.2.0.CR2
> Environment: Windows 8 x64, java version 8 (1.8.0_25), IntelliJ IDE Community Edition
> Reporter: Marco Alesiani
> Assignee: Mario Fusco
> Labels: new_and_noteworthy
> Attachments: reproducer.zip, reproducer.zip
>
>
> I've been getting the error
> {quote}
> Exception in thread "main" java.lang.IllegalStateException: Score corruption: the workingScore (-1300hard/0soft) is not the uncorruptedScore (-1320hard/0soft) after completedAction ([ShiftAssignment for shift: MONDAY, from 8:0 to 8:20, assigned employee: null => null, ShiftAssignment for shift: MONDAY, from 8:0 to 8:20, assigned employee: null => null]):
> Score corruption analysis could not be generated because either corrupted constraintMatchEnabled (true) or uncorrupted constraintMatchEnabled (false) is disabled.
> Check your score constraints manually.
> at org.optaplanner.core.impl.score.director.AbstractScoreDirector.assertWorkingScoreFromScratch(AbstractScoreDirector.java:296)
> at org.optaplanner.core.impl.phase.scope.AbstractPhaseScope.assertExpectedUndoMoveScore(AbstractPhaseScope.java:139)
> at org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider.doMove(ConstructionHeuristicDecider.java:108)
> at org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider.decideNextStep(ConstructionHeuristicDecider.java:77)
> at org.optaplanner.core.impl.constructionheuristic.DefaultConstructionHeuristicPhase.solve(DefaultConstructionHeuristicPhase.java:67)
> at org.optaplanner.core.impl.solver.DefaultSolver.runPhases(DefaultSolver.java:213)
> at org.optaplanner.core.impl.solver.DefaultSolver.solve(DefaultSolver.java:176)
> at TeRo.TeRoAppMain.main(TeRoAppMain.java:25)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:483)
> at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
> {quote}
> when executing the following rule with an EasyScoreCalculator
> {code:drl}
> // Employees are forced to work the exact amount specified in their contracts
> rule "employeeWeeklyHours"
> when
> $employee : Employee( $weeklyHours : weeklyHours, weeklyHoursAreMandatory == true )
> $totalWorkAssignedMinutes : Number(intValue != $weeklyHours * 60)
> from accumulate( $shiftAssignment : ShiftAssignment( $shift : shift )
> and eval($shiftAssignment.employeeIsAssigned($employee) == true)
> and Shift(this == $shift, $shiftTime : shiftTime),
> sum($shiftTime.getShiftTotalMinutes())
> )
> then
> scoreHolder.addHardConstraintMatch( kcontext, -1 * Math.abs($totalWorkAssignedMinutes.intValue() - $weeklyHours * 60) );
> end
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
10 years, 1 month
[JBoss JIRA] (DROOLS-668) java.lang.IllegalStateException: Score corruption for 'employeeWeeklyHours' rule
by Mario Fusco (JIRA)
[ https://issues.jboss.org/browse/DROOLS-668?page=com.atlassian.jira.plugin... ]
Mario Fusco moved PLANNER-277 to DROOLS-668:
--------------------------------------------
Project: Drools (was: OptaPlanner)
Key: DROOLS-668 (was: PLANNER-277)
Workflow: GIT Pull Request workflow (was: classic default workflow)
Affects Version/s: 6.2.0.CR2
(was: 6.2.0.CR2)
Component/s: (was: optaplanner-core)
> java.lang.IllegalStateException: Score corruption for 'employeeWeeklyHours' rule
> --------------------------------------------------------------------------------
>
> Key: DROOLS-668
> URL: https://issues.jboss.org/browse/DROOLS-668
> Project: Drools
> Issue Type: Bug
> Affects Versions: 6.2.0.CR2
> Environment: Windows 8 x64, java version 8 (1.8.0_25), IntelliJ IDE Community Edition
> Reporter: Marco Alesiani
> Assignee: Geoffrey De Smet
> Labels: new_and_noteworthy
> Attachments: reproducer.zip, reproducer.zip
>
>
> I've been getting the error
> {quote}
> Exception in thread "main" java.lang.IllegalStateException: Score corruption: the workingScore (-1300hard/0soft) is not the uncorruptedScore (-1320hard/0soft) after completedAction ([ShiftAssignment for shift: MONDAY, from 8:0 to 8:20, assigned employee: null => null, ShiftAssignment for shift: MONDAY, from 8:0 to 8:20, assigned employee: null => null]):
> Score corruption analysis could not be generated because either corrupted constraintMatchEnabled (true) or uncorrupted constraintMatchEnabled (false) is disabled.
> Check your score constraints manually.
> at org.optaplanner.core.impl.score.director.AbstractScoreDirector.assertWorkingScoreFromScratch(AbstractScoreDirector.java:296)
> at org.optaplanner.core.impl.phase.scope.AbstractPhaseScope.assertExpectedUndoMoveScore(AbstractPhaseScope.java:139)
> at org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider.doMove(ConstructionHeuristicDecider.java:108)
> at org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider.decideNextStep(ConstructionHeuristicDecider.java:77)
> at org.optaplanner.core.impl.constructionheuristic.DefaultConstructionHeuristicPhase.solve(DefaultConstructionHeuristicPhase.java:67)
> at org.optaplanner.core.impl.solver.DefaultSolver.runPhases(DefaultSolver.java:213)
> at org.optaplanner.core.impl.solver.DefaultSolver.solve(DefaultSolver.java:176)
> at TeRo.TeRoAppMain.main(TeRoAppMain.java:25)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:483)
> at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
> {quote}
> when executing the following rule with an EasyScoreCalculator
> {code:drl}
> // Employees are forced to work the exact amount specified in their contracts
> rule "employeeWeeklyHours"
> when
> $employee : Employee( $weeklyHours : weeklyHours, weeklyHoursAreMandatory == true )
> $totalWorkAssignedMinutes : Number(intValue != $weeklyHours * 60)
> from accumulate( $shiftAssignment : ShiftAssignment( $shift : shift )
> and eval($shiftAssignment.employeeIsAssigned($employee) == true)
> and Shift(this == $shift, $shiftTime : shiftTime),
> sum($shiftTime.getShiftTotalMinutes())
> )
> then
> scoreHolder.addHardConstraintMatch( kcontext, -1 * Math.abs($totalWorkAssignedMinutes.intValue() - $weeklyHours * 60) );
> end
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
10 years, 1 month
[JBoss JIRA] (WFLY-4178) Logging async-handler improvement - report number dropped logs
by Todd Sandor (JIRA)
Todd Sandor created WFLY-4178:
---------------------------------
Summary: Logging async-handler improvement - report number dropped logs
Key: WFLY-4178
URL: https://issues.jboss.org/browse/WFLY-4178
Project: WildFly
Issue Type: Enhancement
Components: Logging
Affects Versions: 8.0.0.Final
Reporter: Todd Sandor
Assignee: James Perkins
The functional requirement is to know when logs are discarded and the number of logs discarded.
When using a async-handler such as the one below, we do not know if/when logs are discarded, thousands could be dropped and we do not know it.
<async-handler name="ASYNC">
<queue-length value="300000"/>
<overflow-action value="discard"/>
<subhandlers>
<handler name="FILE"/>
</subhandlers>
</async-handler>
Potential solution/suggestion:
Add a new property, call it max-discard-logs, with a default value of 1 - uses existing behavior when = 1 (when queue full, drop any new log).
When > 1 and queue is full, at least max-discard-logs logs are removed from the queue and display a log indicating the queue is full an N logs were dropped.
<async-handler name="ASYNC">
<queue-length value="300000"/>
<overflow-action value="discard"/>
<max-discard-logs value="1000"/>
<subhandlers>
<handler name="FILE"/>
</subhandlers>
</async-handler>
Depending upon the type of queue being used in the implementation, this could be a very simple change.
e.g
https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/BlockingQu...
int drainTo(Collection<? super E> c, int maxElements)
Removes at most the given number of available elements from this queue and adds them to the given collection.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
10 years, 1 month
[JBoss JIRA] (JBJCA-1241) Tracer improvements
by Jesper Pedersen (JIRA)
Jesper Pedersen created JBJCA-1241:
--------------------------------------
Summary: Tracer improvements
Key: JBJCA-1241
URL: https://issues.jboss.org/browse/JBJCA-1241
Project: IronJacamar
Issue Type: Task
Components: AS, Core
Reporter: Jesper Pedersen
Assignee: Jesper Pedersen
Fix For: 1.2.2.Final
Improvements:
* Record thread id
* Add EXCEPTION event
* Add -ignore-delist flag (WildFly)
Various fixes.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
10 years, 1 month
[JBoss JIRA] (WFLY-3548) JTA synchronization for a distributed transaction called with incorrect TCCL
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/WFLY-3548?page=com.atlassian.jira.plugin.... ]
RH Bugzilla Integration commented on WFLY-3548:
-----------------------------------------------
Matous Jobanek <mjobanek(a)redhat.com> changed the Status of [bug 1098127|https://bugzilla.redhat.com/show_bug.cgi?id=1098127] from ON_QA to VERIFIED
> JTA synchronization for a distributed transaction called with incorrect TCCL
> ----------------------------------------------------------------------------
>
> Key: WFLY-3548
> URL: https://issues.jboss.org/browse/WFLY-3548
> Project: WildFly
> Issue Type: Bug
> Components: Transactions
> Affects Versions: 8.1.0.Final
> Reporter: Martin Kouba
> Assignee: Martin Kouba
> Fix For: 9.0.0.Beta1
>
>
> It seems the RequestProcessor which is processing JTA synchronizations
> does not have the right TCCL set.
> As a result, during synchronization invocation:
> * {{NameNotFoundException}} is thrown for a JNDI lookup of "java:comp/UserTransaction"
> * if we try to acccess {{org.jboss.weld.Container}} by means of {{org.jboss.as.weld.services.ModuleGroupSingletonProvider.TCCLSingleton}}, we get ISE: "Singleton not set....This means that you are trying to access a weld deployment with a Thread Context ClassLoader that is not associated with the deployment."
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
10 years, 1 month
[JBoss JIRA] (DROOLS-667) Profile why day.index is so much slower than day.getIndex()
by Geoffrey De Smet (JIRA)
Geoffrey De Smet created DROOLS-667:
---------------------------------------
Summary: Profile why day.index is so much slower than day.getIndex()
Key: DROOLS-667
URL: https://issues.jboss.org/browse/DROOLS-667
Project: Drools
Issue Type: Enhancement
Affects Versions: 6.2.0.CR3
Reporter: Geoffrey De Smet
Assignee: Mario Fusco
day.index is 3 times slower than day.getIndex() (and it's gets more as the dataset grows)
As discussed with Mario. Rough benchmark speeds here:
https://gist.github.com/ge0ffrey/7662856f357dbec7f7ec
Reproduce recipe
- git clone optaplanner
- Run TravelingTournamentApp, load dataset bra24, solve it for about 30 seconds.
- Open travelingTournamentScoreRules.drl. Replace all occurrences of "day.getIndex()" with "day.index".
- Run TravelingTournamentApp again, load dataset bra24, solve it for about 30 seconds again.
- Compare the last log message of both runs: look for average calculate count per second (x). Higher is faster. For bra24, day.getIndex() is 3 times faster than day.index.
--
This message was sent by Atlassian JIRA
(v6.3.11#6341)
10 years, 1 month