Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-183

KieBase doesn't load drl files if it doesn't feel like it on Windows

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Blocker
    • Resolution: Done
    • 6.0.0.Beta4
    • 6.0.0.CR1
    • None
    • None

    Description

      The OptaPlanner zip's example works perfectly for me, but a user trying the same zip on windows doesn't see any working examples. The problem is that KieBase behaves differently and outputs this warning on his system:

      2013-06-29 10:24:16,998 [AWT-EventQueue-0] WARN  No files found for KieBase
      defaultKieBase
      

      Note: it worked well for Beta3 on his system (and it works well for me on linux with Beta4).

      This is probably due to the fact that the way optaplanner's code needs to jump through the KieBase hoops works for Beta3, but the hoops has been changed for Beta4 somehow.
      Here's that optaplanner code:
      https://github.com/droolsjbpm/optaplanner/blob/master/optaplanner-core/src/main/java/org/optaplanner/core/config/score/director/ScoreDirectorFactoryConfig.java#L283

      Here's the full e-mail thread:

      Hi
      
      I performed the download version beta4 to view examples of optaplanner and
      none is opening.
      
      Below the return of console windows.
      
      
      "Usage: runExamples.bat"
      "For example: runExamples.bat"
      "Some notes:"
      "- Working dir should be the directory of this script."
      "- Java is recommended to be JDK and java 6 for optimal performance"
      "- The environment variable JAVA_HOME should be set to the JDK installation
      dire
      ctory"
      "  For example: set JAVA_HOME="C:\Program Files\Java\jdk1.6.0"
      ECHO está desativado.
      "Starting examples app..."
      2013-06-29 10:24:16,998 [AWT-EventQueue-0] WARN  No files found for KieBase
      defa
      ultKieBase
      2013-06-29 10:24:18,680 [AWT-EventQueue-0] INFO  Loaded:
      data\curriculumcourse\unsolved\comp05.xml
      Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException:
      Unexpected gl
      obal [scoreHolder]
              at
      org.drools.core.common.AbstractWorkingMemory.setGlobal(AbstractWorkin
      gMemory.java:532)
              at
      org.drools.core.impl.StatefulKnowledgeSessionImpl.setGlobal(StatefulK
      nowledgeSessionImpl.java:360)
              at
      org.optaplanner.core.impl.score.director.drools.DroolsScoreDirector.r
      esetKieSession(DroolsScoreDirector.java:85)
              at
      org.optaplanner.core.impl.score.director.drools.DroolsScoreDirector.s
      etWorkingSolution(DroolsScoreDirector.java:76)
              at
      org.optaplanner.examples.common.business.SolutionBusiness.openSolutio
      n(SolutionBusiness.java:222)
              at
      org.optaplanner.examples.common.swingui.SolverAndPersistenceFrame$Loa
      dAction.actionPerformed(SolverAndPersistenceFrame.java:178)
              at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
              at javax.swing.AbstractButton$Handler.actionPerformed(Unknown
      Source)
              at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown
      Source)
              at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
              at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown
      Source)
              at java.awt.Component.processMouseEvent(Unknown Source)
              at javax.swing.JComponent.processMouseEvent(Unknown Source)
              at java.awt.Component.processEvent(Unknown Source)
              at java.awt.Container.processEvent(Unknown Source)
              at java.awt.Component.dispatchEventImpl(Unknown Source)
              at java.awt.Container.dispatchEventImpl(Unknown Source)
              at java.awt.Component.dispatchEvent(Unknown Source)
              at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
              at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
              at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
              at java.awt.Container.dispatchEventImpl(Unknown Source)
              at java.awt.Window.dispatchEventImpl(Unknown Source)
              at java.awt.Component.dispatchEvent(Unknown Source)
              at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
              at java.awt.EventQueue.access$200(Unknown Source)
              at java.awt.EventQueue$3.run(Unknown Source)
              at java.awt.EventQueue$3.run(Unknown Source)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown
      Source)
              at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown
      Source)
              at java.awt.EventQueue$4.run(Unknown Source)
              at java.awt.EventQueue$4.run(Unknown Source)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown
      Source)
              at java.awt.EventQueue.dispatchEvent(Unknown Source)
              at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown
      Source)
              at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
              at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown
      Source)
              at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
              at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
              at java.awt.EventDispatchThread.run(Unknown Source)
      2013-06-29 10:24:25,920 [AWT-EventQueue-0] INFO  Loaded:
      C:\Users\l049904\Downlo
      ads\optaplanner-distribution-6.0.0.Beta4\optaplanner-distribution-6.0.0.Beta4\ex
      amples\data\curriculumcourse\unsolved\comp02.xml
      Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException:
      Unexpected global [scoreHolder]
              at
      org.drools.core.common.AbstractWorkingMemory.setGlobal(AbstractWorkingMemory.java:532)
              at
      org.drools.core.impl.StatefulKnowledgeSessionImpl.setGlobal(StatefulKnowledgeSessionImpl.java:360)
              at
      org.optaplanner.core.impl.score.director.drools.DroolsScoreDirector.r
      esetKieSession(DroolsScoreDirector.java:85)
              at
      org.optaplanner.core.impl.score.director.drools.DroolsScoreDirector.s
      etWorkingSolution(DroolsScoreDirector.java:76)
              at
      org.optaplanner.examples.common.business.SolutionBusiness.openSolutio
      n(SolutionBusiness.java:222)
              at
      org.optaplanner.examples.common.swingui.SolverAndPersistenceFrame$Ope
      nAction.actionPerformed(SolverAndPersistenceFrame.java:289)
              at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
              at javax.swing.AbstractButton$Handler.actionPerformed(Unknown
      Source)
              at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown
      Source)
              at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
              at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown
      Source)
              at java.awt.Component.processMouseEvent(Unknown Source)
              at javax.swing.JComponent.processMouseEvent(Unknown Source)
              at java.awt.Component.processEvent(Unknown Source)
              at java.awt.Container.processEvent(Unknown Source)
              at java.awt.Component.dispatchEventImpl(Unknown Source)
              at java.awt.Container.dispatchEventImpl(Unknown Source)
              at java.awt.Component.dispatchEvent(Unknown Source)
              at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
              at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
              at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
              at java.awt.Container.dispatchEventImpl(Unknown Source)
              at java.awt.Window.dispatchEventImpl(Unknown Source)
              at java.awt.Component.dispatchEvent(Unknown Source)
              at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
              at java.awt.EventQueue.access$200(Unknown Source)
              at java.awt.EventQueue$3.run(Unknown Source)
              at java.awt.EventQueue$3.run(Unknown Source)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown
      Source)
              at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown
      Source)
              at java.awt.EventQueue$4.run(Unknown Source)
              at java.awt.EventQueue$4.run(Unknown Source)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown
      Source)
              at java.awt.EventQueue.dispatchEvent(Unknown Source)
              at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown
      Source)
              at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
              at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown
      Source)
              at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
              at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
              at java.awt.EventDispatchThread.run(Unknown Source)
      
      In every instance can not open or import files. Xml
      
      In version Beta3 was possible.
      
      
      Thanks
      
      
      
      
      --
      View this message in context: http://drools.46999.n3.nabble.com/Time-Scheduling-Routing-tp4024446p4024655.html
      

      Attachments

        Activity

          People

            mfusco@redhat.com Mario Fusco
            gdesmet@redhat.com Geoffrey De Smet
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: