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

Building drools-distribution SNAPSHOT locally breaks runExamples.sh/bat

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 6.3.0.CR1
    • Component/s: None
    • Labels:
      None
    • Docs QE Status:
      NEW
    • QE Status:
      NEW

      Description

      This does NOT happen for the release build, only for snapshots.

      There are various things that influence this behavior. The problem is the difference between 6.3.0-SNAPSHOT.jar and 6.3.0-20150102121212.jar (timed snapshot). The Class-Path: element in MANIFEST.MF may contain both, depending if the Drools (or KIE API) artifacts were built locally. The drools-distribution will always include timed snapshots, so in case the MANIFEST.MF contains just -SNAPSHOT, the runExamples.sh/bat does not have correct classpath and they fail.

      The jar file in the /binaries is kie-api-6.3.0-20150727.045553-594.jar, but in the drools-examples.jar manifest.mf it says kie-api-6.3.0-SNAPSHOT instead...

      Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: Lorg/kie/api/KieBase;
      	at java.lang.Class.getDeclaredFields0(Native Method)
      	at java.lang.Class.privateGetDeclaredFields(Class.java:2583)
      	at java.lang.Class.getDeclaredFields(Class.java:1916)
      	at com.thoughtworks.xstream.mapper.AnnotationMapper.processTypes(AnnotationMapper.java:204)
      	at com.thoughtworks.xstream.mapper.AnnotationMapper.processAnnotations(AnnotationMapper.java:164)
      	at com.thoughtworks.xstream.XStream.processAnnotations(XStream.java:1971)
      	at com.thoughtworks.xstream.XStream.processAnnotations(XStream.java:1982)
      	at org.optaplanner.core.impl.solver.XStreamXmlSolverFactory.buildXStream(XStreamXmlSolverFactory.java:51)
      	at org.optaplanner.core.impl.solver.XStreamXmlSolverFactory.<init>(XStreamXmlSolverFactory.java:59)
      	at org.optaplanner.core.api.solver.SolverFactory.createFromXmlResource(SolverFactory.java:45)
      	at org.optaplanner.examples.nqueens.app.NQueensApp.createSolverByXml(NQueensApp.java:72)
      	at org.optaplanner.examples.nqueens.app.NQueensApp.createSolver(NQueensApp.java:64)
      	at org.optaplanner.examples.common.app.CommonApp.createSolutionBusiness(CommonApp.java:90)
      	at org.optaplanner.examples.common.app.CommonApp.init(CommonApp.java:77)
      	at org.optaplanner.examples.app.OptaPlannerExamplesApp$1.actionPerformed(OptaPlannerExamplesApp.java:183)
      	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
      	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2346)
      	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
      	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
      	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
      	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
      	at java.awt.Component.processMouseEvent(Component.java:6525)
      	at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
      	at java.awt.Component.processEvent(Component.java:6290)
      	at java.awt.Container.processEvent(Container.java:2234)
      	at java.awt.Component.dispatchEventImpl(Component.java:4881)
      	at java.awt.Container.dispatchEventImpl(Container.java:2292)
      	at java.awt.Component.dispatchEvent(Component.java:4703)
      	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4898)
      	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4533)
      	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4462)
      	at java.awt.Container.dispatchEventImpl(Container.java:2278)
      	at java.awt.Window.dispatchEventImpl(Window.java:2750)
      	at java.awt.Component.dispatchEvent(Component.java:4703)
      	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
      	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.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86)
      	at java.awt.EventQueue$4.run(EventQueue.java:731)
      	at java.awt.EventQueue$4.run(EventQueue.java:729)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
      	at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
      	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.ClassNotFoundException: org.kie.api.KieBase
      	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      	... 52 more
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  psiroky Petr Široký
                  Reporter:
                  psiroky Petr Široký
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: