Uploaded image for project: 'OptaPlanner'
  1. OptaPlanner
  2. PLANNER-2854

CloudBalancing: cannot add computer

XMLWordPrintable

    • NEW
    • NEW

      Either click Add computer twice if the solver is not running or click it just once while solving.

      Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: The workingObjects (CloudComputer-2, CloudComputer-2) have the same planningId ((class org.optaplanner.examples.cloudbalancing.domain.CloudComputer, 2)). Working objects must be unique.
      	at org.optaplanner.core.impl.domain.lookup.PlanningIdLookUpStrategy.addWorkingObject(PlanningIdLookUpStrategy.java:30)
      	at org.optaplanner.core.impl.domain.lookup.LookUpManager.addWorkingObject(LookUpManager.java:30)
      	at org.optaplanner.core.impl.score.director.AbstractScoreDirector.lambda$setWorkingSolution$0(AbstractScoreDirector.java:156)
      	at org.optaplanner.core.impl.domain.solution.descriptor.SolutionDescriptor.visitAllFacts(SolutionDescriptor.java:888)
      	at org.optaplanner.core.impl.score.director.AbstractScoreDirector.setWorkingSolution(AbstractScoreDirector.java:155)
      	at org.optaplanner.constraint.streams.drools.DroolsConstraintStreamScoreDirector.setWorkingSolution(DroolsConstraintStreamScoreDirector.java:51)
      	at org.optaplanner.examples.common.business.SolutionBusiness.applyScoreDirector(SolutionBusiness.java:245)
      	at org.optaplanner.examples.common.business.SolutionBusiness.acceptScoreDirector(SolutionBusiness.java:302)
      	at org.optaplanner.examples.common.business.SolutionBusiness.doProblemChange(SolutionBusiness.java:313)
      	at org.optaplanner.examples.common.swingui.SolutionPanel.doProblemChange(SolutionPanel.java:192)
      	at org.optaplanner.examples.common.swingui.SolutionPanel.doProblemChange(SolutionPanel.java:188)
      	at org.optaplanner.examples.cloudbalancing.swingui.CloudBalancingPanel.addComputer(CloudBalancingPanel.java:211)
      	at org.optaplanner.examples.cloudbalancing.swingui.CloudBalancingPanel.lambda$createHeaderPanel$1(CloudBalancingPanel.java:123)
      	at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967)
      	at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2308)
      	at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
      	at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
      	at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:279)
      	at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:297)
      	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6635)
      	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342)
      	at java.desktop/java.awt.Component.processEvent(Component.java:6400)
      	at java.desktop/java.awt.Container.processEvent(Container.java:2263)
      	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5011)
      	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
      	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4843)
      	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
      	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547)
      	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
      	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
      	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2772)
      	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4843)
      	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
      	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
      	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
      	at java.base/java.security.AccessController.doPrivileged(Native Method)
      	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
      	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
      	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
      	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
      	at java.base/java.security.AccessController.doPrivileged(Native Method)
      	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
      	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
      	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
      	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
      	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
      	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
      	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
      	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
      

            rsynek@redhat.com Radovan Synek
            jlocker Jiří Locker
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: