2016-04-03 4 views
0

Я создавал веб-приложения для рассылки медсестер на основе веб-примера маршрутизации автомобилей Optaplanner. Когда я попытался запустить его из своего Eclipse внутри JBoss WildFly 8.x, он работает только на этапе эвристической конструкции, а затем застрял там без какого-либо прогресса. Самое смешное, что код действительно был перенесен из моего примера загрузки медсестер из дистрибутива optaplanner 6.3.0. В приложениях Windows он работает бесперебойно, без каких-либо проблем или застревания.Optaplanner Решающая фаза, застрявшая в строительстве Эвристическая фаза

Update

я наконец-то установить уровень журнала в следовых, а вот журнал, который выходит:

2016-04-06 23:10:49,930 INFO [org.optaplanner.webexamples.nurserostering.rest.persistence.NurseRosteringDao] (default task-11) Opened: D:\Users\Administrator\wildfly-8.2.1.Final\standalone\deployments\optaplanner-webexamples.war\WEB-INF\classes\org\optaplanner\webexamples\nurserostering\data\team-machine1.xml 
2016-04-06 23:10:59,194 TRACE [org.optaplanner.core.impl.domain.solution.descriptor.SolutionDescriptor] (default task-12)  Model annotations parsed for Solution NurseRoster: 
2016-04-06 23:10:59,195 TRACE [org.optaplanner.core.impl.domain.solution.descriptor.SolutionDescriptor] (default task-12)   Entity ShiftAssignment: 
2016-04-06 23:10:59,195 TRACE [org.optaplanner.core.impl.domain.solution.descriptor.SolutionDescriptor] (default task-12)    Variable employee (genuine) 
2016-04-06 23:11:03,850 INFO [org.drools.compiler.kie.builder.impl.KieRepositoryImpl] (default task-12) KieModule was added: MemoryKieModule[releaseId=org.default:artifact:1.0.0-SNAPSHOT] 
2016-04-06 23:11:04,499 INFO [org.optaplanner.core.impl.solver.DefaultSolver] (pool-6-thread-1) Solving started: time spent (395), best score (uninitialized/0hard/-260soft), environment mode (REPRODUCIBLE), random (JDK with seed 0). 
2016-04-06 23:11:04,505 TRACE [org.optaplanner.core.impl.heuristic.selector.value.decorator.SortingValueSelector] (pool-6-thread-1)  Created cachedValueList: size (10), valueSelector (Sorting(FromSolutionPropertyValueSelector(employee))). 
2016-04-06 23:11:04,508 TRACE [org.optaplanner.core.impl.heuristic.selector.value.decorator.SortingValueSelector] (pool-6-thread-1)  Sorted cachedValueList: size (10), valueSelector (Sorting(FromSolutionPropertyValueSelector(employee))). 
2016-04-06 23:11:04,665 TRACE [org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider] (pool-6-thread-1)   Move index (0), score (0hard/-260soft), move (2010-01-01(Fri)[email protected] {null -> A(A)}). 
2016-04-06 23:11:04,676 TRACE [org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider] (pool-6-thread-1)   Move index (1), score (-1hard/-259soft), move (2010-01-01(Fri)[email protected] {null -> B(B)}). 
2016-04-06 23:11:04,682 TRACE [org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider] (pool-6-thread-1)   Move index (2), score (-1hard/-260soft), move (2010-01-01(Fri)[email protected] {null -> C(C)}). 
2016-04-06 23:11:04,699 TRACE [org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider] (pool-6-thread-1)   Move index (3), score (0hard/-260soft), move (2010-01-01(Fri)[email protected] {null -> D(D)}). 
2016-04-06 23:11:04,707 TRACE [org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider] (pool-6-thread-1)   Move index (4), score (-1hard/-260soft), move (2010-01-01(Fri)[email protected] {null -> E(E)}). 
2016-04-06 23:11:04,713 TRACE [org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider] (pool-6-thread-1)   Move index (5), score (-1hard/-259soft), move (2010-01-01(Fri)[email protected] {null -> F(F)}). 
2016-04-06 23:11:04,718 TRACE [org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider] (pool-6-thread-1)   Move index (6), score (0hard/-259soft), move (2010-01-01(Fri)[email protected] {null -> G(G)}). 
2016-04-06 23:11:04,726 TRACE [org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider] (pool-6-thread-1)   Move index (7), score (-1hard/-259soft), move (2010-01-01(Fri)[email protected] {null -> H(H)}). 
2016-04-06 23:11:04,732 TRACE [org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider] (pool-6-thread-1)   Move index (8), score (-1hard/-258soft), move (2010-01-01(Fri)[email protected] {null -> I(I)}). 
2016-04-06 23:11:04,738 TRACE [org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider] (pool-6-thread-1)   Move index (9), score (0hard/-258soft), move (2010-01-01(Fri)[email protected] {null -> J(J)}). 
2016-04-06 23:11:04,739 DEBUG [org.optaplanner.core.impl.constructionheuristic.DefaultConstructionHeuristicPhase] (pool-6-thread-1)  CH step (0), time spent (634), score (0hard/-258soft), selected move count (10), picked move (2010-01-01(Fri)[email protected] {null -> J(J)}). 
... 
2016-04-06 23:11:07,274 DEBUG [org.optaplanner.core.impl.constructionheuristic.DefaultConstructionHeuristicPhase] (pool-6-thread-1)  CH step (150), time spent (3170), score (-1hard/-103soft), selected move count (10), picked move (2010-01-28(Thu)[email protected] {null -> C(C)}). 
2016-04-06 23:11:07,275 TRACE [org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider] (pool-6-thread-1)   Move index (0), score (-3hard/-104soft), move (2010-01-28(Thu)[email protected] {null -> A(A)}). 
2016-04-06 23:11:07,276 TRACE [org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider] (pool-6-thread-1)   Move index (1), score (-2hard/-104soft), move (2010-01-28(Thu)[email protected] {null -> B(B)}). 
2016-04-06 23:11:07,276 TRACE [org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider] (pool-6-thread-1)   Move index (2), score (-3hard/-103soft), move (2010-01-28(Thu)[email protected] {null -> C(C)}). 
2016-04-06 23:11:07,277 TRACE [org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider] (pool-6-thread-1)   Move index (3), score (-2hard/-103soft), move (2010-01-28(Thu)[email protected] {null -> D(D)}). 
2016-04-06 23:11:07,278 TRACE [org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider] (pool-6-thread-1)   Move index (4), score (-1hard/-107soft), move (2010-01-28(Thu)[email protected] {null -> E(E)}). 
2016-04-06 23:11:07,279 TRACE [org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider] (pool-6-thread-1)   Move index (5), score (-2hard/-105soft), move (2010-01-28(Thu)[email protected] {null -> F(F)}). 
2016-04-06 23:11:07,280 TRACE [org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider] (pool-6-thread-1)   Move index (6), score (-2hard/-106soft), move (2010-01-28(Thu)[email protected] {null -> G(G)}). 
2016-04-06 23:11:07,288 TRACE [org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider] (pool-6-thread-1)   Move index (7), score (-2hard/-104soft), move (2010-01-28(Thu)[email protected] {null -> H(H)}). 
2016-04-06 23:11:07,289 TRACE [org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider] (pool-6-thread-1)   Move index (8), score (-2hard/-104soft), move (2010-01-28(Thu)[email protected] {null -> I(I)}). 
2016-04-06 23:11:07,290 TRACE [org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider] (pool-6-thread-1)   Move index (9), score (-2hard/-104soft), move (2010-01-28(Thu)[email protected] {null -> J(J)}). 
2016-04-06 23:11:07,290 DEBUG [org.optaplanner.core.impl.constructionheuristic.DefaultConstructionHeuristicPhase] (pool-6-thread-1)  CH step (151), time spent (3186), score (-1hard/-107soft), selected move count (10), picked move (2010-01-28(Thu)[email protected] {null -> E(E)}). 
2016-04-06 23:11:07,291 TRACE [org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider] (pool-6-thread-1)   Move index (0), score (-2hard/-108soft), move (2010-01-28(Thu)[email protected] {null -> A(A)}). 
2016-04-06 23:11:07,292 TRACE [org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider] (pool-6-thread-1)   Move index (1), score (-3hard/-108soft), move (2010-01-28(Thu)[email protected] {null -> B(B)}). 
2016-04-06 23:11:07,293 TRACE [org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider] (pool-6-thread-1)   Move index (2), score (-3hard/-107soft), move (2010-01-28(Thu)[email protected] {null -> C(C)}). 
2016-04-06 23:11:07,293 TRACE [org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider] (pool-6-thread-1)   Move index (3), score (-1hard/-107soft), move (2010-01-28(Thu)[email protected] {null -> D(D)}). 
2016-04-06 23:11:07,294 TRACE [org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider] (pool-6-thread-1)   Move index (4), score (-3hard/-109soft), move (2010-01-28(Thu)[email protected] {null -> E(E)}). 
2016-04-06 23:11:07,295 TRACE [org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider] (pool-6-thread-1)   Move index (5), score (-2hard/-109soft), move (2010-01-28(Thu)[email protected] {null -> F(F)}). 
2016-04-06 23:11:07,296 TRACE [org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider] (pool-6-thread-1)   Move index (6), score (-1hard/-110soft), move (2010-01-28(Thu)[email protected] {null -> G(G)}). 
2016-04-06 23:11:07,297 TRACE [org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider] (pool-6-thread-1)   Move index (7), score (-3hard/-108soft), move (2010-01-28(Thu)[email protected] {null -> H(H)}). 
2016-04-06 23:11:07,299 TRACE [org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider] (pool-6-thread-1)   Move index (8), score (-2hard/-109soft), move (2010-01-28(Thu)[email protected] {null -> I(I)}). 
2016-04-06 23:11:07,300 TRACE [org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider] (pool-6-thread-1)   Move index (9), score (-1hard/-107soft), move (2010-01-28(Thu)[email protected] {null -> J(J)}). 
2016-04-06 23:11:07,300 DEBUG [org.optaplanner.core.impl.constructionheuristic.DefaultConstructionHeuristicPhase] (pool-6-thread-1)  CH step (152), time spent (3196), score (-1hard/-107soft), selected move count (10), picked move (2010-01-28(Thu)[email protected] {null -> D(D)}). 
2016-04-06 23:11:07,330 INFO [org.optaplanner.core.impl.constructionheuristic.DefaultConstructionHeuristicPhase] (pool-6-thread-1) Construction Heuristic phase (0) ended: step total (153), time spent (3226), best score (-1hard/-107soft). 
2016-04-06 23:11:07,400 TRACE [org.optaplanner.core.impl.heuristic.selector.move.factory.MoveListFactoryToMoveSelectorBridge] (pool-6-thread-1)  Created cachedMoveList: size (1530), moveSelector (MoveListFactory(class org.optaplanner.webexamples.nurserostering.rest.solver.move.factory.EmployeeChangeMoveFactory)). 
2016-04-06 23:11:07,405 TRACE [org.optaplanner.core.impl.heuristic.selector.move.factory.MoveListFactoryToMoveSelectorBridge] (pool-6-thread-1)  Created cachedMoveList: size (11628), moveSelector (MoveListFactory(class org.optaplanner.webexamples.nurserostering.rest.solver.move.factory.ShiftAssignmentSwapMoveFactory)). 
2016-04-06 23:11:07,411 TRACE [org.optaplanner.core.impl.heuristic.selector.move.factory.MoveListFactoryToMoveSelectorBridge] (pool-6-thread-1)  Created cachedMoveList: size (268), moveSelector (MoveListFactory(class org.optaplanner.webexamples.nurserostering.rest.solver.move.factory.ShiftAssignmentPillarPartSwapMoveFactory)). 
2016-04-06 23:13:58,592 INFO [org.optaplanner.core.impl.solver.BasicPlumbingTermination] (default task-36) Terminating solver early. 

Есть ли что-то неправильно в журнале? Пожалуйста, любезно помогите мне, спасибо и приветствую.

Update 2

я обновить свой рабочий стол приложения медсестры список до optaplanner 6.3.0-финала, а затем запустить его, результат был он застрял на счете -1hard/-107soft. Он также предложит мне исключение, вот трассировки стека:

Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: Solving failed. 
    at com.employee.scheduler.common.swingui.SolverAndPersistenceFrame$SolveWorker.done(SolverAndPersistenceFrame.java:299) 
    at javax.swing.SwingWorker$5.run(SwingWorker.java:737) 
    at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(SwingWorker.java:832) 
    at sun.swing.AccumulativeRunnable.run(AccumulativeRunnable.java:112) 
    at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(SwingWorker.java:842) 
    at javax.swing.Timer.fireActionPerformed(Timer.java:313) 
    at javax.swing.Timer$DoPostEvent.run(Timer.java:245) 
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) 
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756) 
    at java.awt.EventQueue.access$500(EventQueue.java:97) 
    at java.awt.EventQueue$3.run(EventQueue.java:709) 
    at java.awt.EventQueue$3.run(EventQueue.java:703) 
    at java.security.AccessController.doPrivileged(Native Method) 
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) 
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:726) 
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) 
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) 
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) 
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) 
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) 
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) 
Caused by: " java.lang.IllegalStateException: The notificationQueues might not be empty (false) so any shadow variables might be stale so score calculation is unreliable. 
Maybe a ScoreDirector.before*() method was called without calling ScoreDirector.triggerVariableListeners(), before calling ScoreDirector.calculateScore(). 
    at com.employee.scheduler.common.swingui.SolverAndPersistenceFrame$SolveWorker.done(SolverAndPersistenceFrame.java:299) 
    at javax.swing.SwingWorker$5.run(SwingWorker.java:737) 
    at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(SwingWorker.java:832) 
    at sun.swing.AccumulativeRunnable.run(AccumulativeRunnable.java:112) 
    at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(SwingWorker.java:842) 
    at javax.swing.Timer.fireActionPerformed(Timer.java:313) 
    at javax.swing.Timer$DoPostEvent.run(Timer.java:245) 
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) 
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756) 
    at java.awt.EventQueue.access$500(EventQueue.java:97) 
    at java.awt.EventQueue$3.run(EventQueue.java:709) 
    at java.awt.EventQueue$3.run(EventQueue.java:703) 
    at java.security.AccessController.doPrivileged(Native Method) 
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) 
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:726) 
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) 
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) 
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) 
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) 
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) 
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) 

Update 3

я включаю environmentMode к FULL_ASSERT, вот мой config.xml:

<solver> 
    <environmentMode>FULL_ASSERT</environmentMode> 
    ... 
</solver> 

Тогда Я попытался запустить его, и он все еще оставался в локальной фазе поиска (похож на предыдущий журнал, который я опубликовал). Вот список:

11:29:21,671 DEBUG [org.optaplanner.core.impl.constructionheuristic.DefaultConstructionHeuristicPhase] (pool-6-thread-1)  CH step (151), time spent (10808), score (-1hard/-107soft), selected move count (10), picked move (2010-01-28(Thu)[email protected] {null -> E(E)}). 
11:29:21,676 TRACE [org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider] (pool-6-thread-1)   Move index (0), score (-2hard/-108soft), move (2010-01-28(Thu)[email protected] {null -> A(A)}). 
11:29:21,680 TRACE [org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider] (pool-6-thread-1)   Move index (1), score (-3hard/-108soft), move (2010-01-28(Thu)[email protected] {null -> B(B)}). 
11:29:21,684 TRACE [org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider] (pool-6-thread-1)   Move index (2), score (-3hard/-107soft), move (2010-01-28(Thu)[email protected] {null -> C(C)}). 
11:29:21,689 TRACE [org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider] (pool-6-thread-1)   Move index (3), score (-1hard/-107soft), move (2010-01-28(Thu)[email protected] {null -> D(D)}). 
11:29:21,693 TRACE [org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider] (pool-6-thread-1)   Move index (4), score (-3hard/-109soft), move (2010-01-28(Thu)[email protected] {null -> E(E)}). 
11:29:21,699 TRACE [org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider] (pool-6-thread-1)   Move index (5), score (-2hard/-109soft), move (2010-01-28(Thu)[email protected] {null -> F(F)}). 
11:29:21,706 TRACE [org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider] (pool-6-thread-1)   Move index (6), score (-1hard/-110soft), move (2010-01-28(Thu)[email protected] {null -> G(G)}). 
11:29:21,714 TRACE [org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider] (pool-6-thread-1)   Move index (7), score (-3hard/-108soft), move (2010-01-28(Thu)[email protected] {null -> H(H)}). 
11:29:21,721 TRACE [org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider] (pool-6-thread-1)   Move index (8), score (-2hard/-109soft), move (2010-01-28(Thu)[email protected] {null -> I(I)}). 
11:29:21,728 TRACE [org.optaplanner.core.impl.constructionheuristic.decider.ConstructionHeuristicDecider] (pool-6-thread-1)   Move index (9), score (-1hard/-107soft), move (2010-01-28(Thu)[email protected] {null -> J(J)}). 
11:29:21,733 DEBUG [org.optaplanner.core.impl.constructionheuristic.DefaultConstructionHeuristicPhase] (pool-6-thread-1)  CH step (152), time spent (10870), score (-1hard/-107soft), selected move count (10), picked move (2010-01-28(Thu)[email protected] {null -> D(D)}). 
11:29:21,739 INFO [org.optaplanner.core.impl.constructionheuristic.DefaultConstructionHeuristicPhase] (pool-6-thread-1) Construction Heuristic phase (0) ended: step total (153), time spent (10876), best score (-1hard/-107soft). 
11:29:21,754 TRACE [org.optaplanner.core.impl.heuristic.selector.move.factory.MoveListFactoryToMoveSelectorBridge] (pool-6-thread-1)  Created cachedMoveList: size (1530), moveSelector (MoveListFactory(class org.optaplanner.webexamples.nurserostering.rest.solver.move.factory.EmployeeChangeMoveFactory)). 
11:29:21,759 TRACE [org.optaplanner.core.impl.heuristic.selector.move.factory.MoveListFactoryToMoveSelectorBridge] (pool-6-thread-1)  Created cachedMoveList: size (11628), moveSelector (MoveListFactory(class org.optaplanner.webexamples.nurserostering.rest.solver.move.factory.ShiftAssignmentSwapMoveFactory)). 
11:29:21,765 TRACE [org.optaplanner.core.impl.heuristic.selector.move.factory.MoveListFactoryToMoveSelectorBridge] (pool-6-thread-1)  Created cachedMoveList: size (268), moveSelector (MoveListFactory(class org.optaplanner.webexamples.nurserostering.rest.solver.move.factory.ShiftAssignmentPillarPartSwapMoveFactory)). 
11:33:26,137 INFO [org.optaplanner.core.impl.solver.BasicPlumbingTermination] (default task-17) Terminating solver early. 

Любая идея кто-нибудь? Что я должен ожидать от включения режима окружающей среды?

+0

При развертывании в wildfly регистратор wildfly будет отменять ваш регистратор в основном, так что logback.xml-файл игнорируется. [См. Аналогичную проблему здесь] (https://groups.google.com/forum/#!topic/optaplanner-dev/scdaYDEMzyA) Исправьте это, чтобы получить журнал отладки, и у вас будет лучшее представление о том, что происходит. Может быть, CH просто занимает больше времени на этом наборе данных (который можно исправить), или вы получили условие гонки в своей цепочке сервлета, чтобы решить код потока или ... Получить журнал первым. –

+0

Я попытался исключить зависимость slf4j-api от optaplanner-core, optaplanner-benchmark и logback-classic, а затем попытаться запустить его снова. Но все же журнал был из jboss, а не из моего собственного файла logback.xml. Есть что-то, что я пропустил? –

+0

Наконец-то я получил журнал, установив конфигурацию журнала в jboss standalone.xml. Я разместил журнал выше. Пожалуйста, помогите мне решить эту проблему. –

ответ

0

Анализ из журнала:

23:11:07,411 TRACE...  Created cachedMoveList: ... 
// 2 minutes and not a single move selected. That's impossible. 
// It must be stuck in a infinite loop somehow. 
// Do a thread dump (ctrl-break) 20 seconds after that "Created cachedMoveList" line. Before terminating it to see where it's spending it's time. 
// 
// Terminated asynchronously. This means it's actually in a loop that does checks the termination status 
23:13:58,592 INFO ...  Terminating solver early. 

Это говорит о многом:

  • Это не значит, что все хода запретов или что все хода невыполнимые, потому что не выбраны не двигается (в противном случае мы 'd см. сообщения журнала TRACE из них).
  • У вас нет пользовательского MoveFactoryList, который попадает в бесконечный цикл, потому что иначе вызов terminateEarly() не будет выполняться немедленно - вместо этого он будет проигнорирован.
  • Это не то, что все ваши селекторы перемещения пустые, есть не менее 3 кэшированных записей, которые имеют размеры выше 1 тыс. Ходов. И в этом случае мы также увидим сообщения журнала отладки, которых у нас нет.

Так что я не знаю, что происходит. Но это похоже на настоящую ошибку или, по крайней мере, уникальную ситуацию, которую я еще не видел. Пришлите мне репроектор creating a new jira и поставьте там репродусор, и я посмотрю. Хороший проигрыватель имеет pom.xml, который я могу открыть, и имеет основной класс или тестовый класс, который я могу запустить, чтобы воспроизвести проблему (так что мне не нужно тратить время на развертывание на wildfly и т. Д.).

+1

Я создам для вас новую джиру и попытаюсь перенести свой веб-код в приложение для Java-приложений. Мне, вероятно, потребуется некоторое время для создания репродуктора. Кстати, я попытался обновить свое настольное приложение, чтобы использовать 6.3.0-final, и он дает мне тот же балл, плюс он показывает трассировку стека, и, конечно же, я поставил его в своем вопросе выше. –

+0

Хм, обновление 2 - это явная проблема с коррупцией, которая, как правило, не является ошибкой самого optaplanner. Включите environmentMode full assert. Но мне все еще интересно, что происходит в эти 2 минуты между началом LS и прекращением рано. –

+0

Какую средуMode следует включить? Достаточно ли FAST_ASSERT? Я действительно смущен, если ошибка не в optaplanner, то почему мой же код работает хорошо с optaplanner 6.2.0-final? Пожалуйста, помогите мне решить эту проблему. @Geoffrey De Smet –