2 Replies Latest reply on Feb 10, 2015 5:49 AM by Nitesh jain

    Not able to load Drools through knowledgeBase/ksession

    Nitesh jain Newbie

      does anyone know why sample drools project is working when run via main() Method ,

      and when invoked via camel processor, i'm getting the following error wile trying to create the knowledge base (KnowledgeBase kbase = kbuilder.newKnowledgeBase();)

      Any idea why the KnowledgeBuilderImpl   not able to load message class(Message class is a static class).

       

      Log:

       

      kbuilder.getErrors()::Unable to resolve ObjectType 'Message' : [Rule name='Hello World']

       

      Unable to resolve ObjectType 'Message' : [Rule name='GoodBye']

       

      Error importing : 'com.sample.DroolsTest.Message'

      Rule Compilation error : [Rule name='GoodBye']

      com/sample/Rule_GoodBye1094926091.java (2:48) : Only a type can be imported. com.sample.DroolsTest.Message resolves to a package

      com/sample/Rule_GoodBye1094926091.java (7:393) : myMessage cannot be resolved

       

      Rule Compilation error : [Rule name='Hello World']

      com/sample/Rule_Hello_World1857861002.java (2:48) : Only a type can be imported. com.sample.DroolsTest.Message resolves to a package

              com/sample/Rule_Hello_World1857861002.java (7:397) : myMessage cannot be resolved

      com/sample/Rule_Hello_World1857861002.java (8:418) : m cannot be resolved

      com/sample/Rule_Hello_World1857861002.java (9:465) : m cannot be resolved

              com/sample/Rule_Hello_World1857861002.java (9:478) : Message.GOODBYE cannot be resolved to a type

      com/sample/Rule_Hello_World1857861002.java (10:534) : m cannot be resolved

       

      any help apprecieated

       

      Thanks in advance,

      Nitesh