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

NPE in AbstractTabuAcceptor.stepTaken

    XMLWordPrintable

Details

    Description

      I know this is a weak bug report and I apologize in advance for that...

      I'm writing integration tests for my solver configuration. My code seems to work in my GUI (subclass of CommonApp) but it fails under my junit test. I'm quite new to Drools and Planner so I wouldn't be surprised if the root cause is my fault, but I think a NPE is bad news.

      2012-03-30 15:26:05,743 INFO  [DefaultSolver.java:172] Solving started: time spend (25), score (-2hard/-26soft), new best score (-2hard/-26soft), random seed (0). - o.d.p.c.s.DefaultSolver
      2012-03-30 15:26:05,786 DEBUG [DefaultLocalSearchSolverPhase.java:109]     Step index (0), time spend (68), score (-1hard/-22soft), new best score (-1hard/-22soft), accepted move size (8) for picked step (JobSlot(s2,0) => Job(j1)). - o.d.p.c.l.DefaultLocalSearchSolverPhase
      2012-03-30 15:26:05,815 DEBUG [DefaultLocalSearchSolverPhase.java:109]     Step index (1), time spend (97), score (0hard/-8soft), new best score (0hard/-8soft), accepted move size (11) for picked step (JobSlot(s1,0) => Job(j2)). - o.d.p.c.l.DefaultLocalSearchSolverPhase
      2012-03-30 15:26:05,831 DEBUG [DefaultLocalSearchSolverPhase.java:109]     Step index (2), time spend (113), score (0hard/-4soft), new best score (0hard/-4soft), accepted move size (13) for picked step (JobSlot(s1,1) => Job(j1)). - o.d.p.c.l.DefaultLocalSearchSolverPhase
      2012-03-30 15:26:05,845 DEBUG [DefaultLocalSearchSolverPhase.java:109]     Step index (3), time spend (127), score (0hard/-2soft), new best score (0hard/-2soft), accepted move size (13) for picked step (JobSlot(s2,1) => Job(j2)). - o.d.p.c.l.DefaultLocalSearchSolverPhase
      
      
      java.lang.NullPointerException
      	at org.drools.planner.core.localsearch.decider.acceptor.tabu.AbstractTabuAcceptor.stepTaken(AbstractTabuAcceptor.java:163)
      	at org.drools.planner.core.localsearch.decider.DefaultDecider.stepTaken(DefaultDecider.java:167)
      	at org.drools.planner.core.localsearch.DefaultLocalSearchSolverPhase.stepTaken(DefaultLocalSearchSolverPhase.java:107)
      	at org.drools.planner.core.localsearch.DefaultLocalSearchSolverPhase.solve(DefaultLocalSearchSolverPhase.java:71)
      	at org.drools.planner.core.solver.DefaultSolver.runSolverPhases(DefaultSolver.java:181)
      	at org.drools.planner.core.solver.DefaultSolver.solve(DefaultSolver.java:150)
      

      Attachments

        Issue Links

          Activity

            People

              gdesmet@redhat.com Geoffrey De Smet
              chrisdolan_jira Chris Dolan (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: