Idempiere with Drools 7

61 views
Skip to first unread message

Selvi

unread,
Oct 14, 2019, 2:33:33 AM10/14/19
to iDempiere
Am using IDempiere 6.2 trying to integrate with business rule engine Drools..
I have taken simple helloworld example in drools 7.3.0v 

**Code :**
            
      KieServices ks = KieServices.Factory.get();
  KieContainer kContainer = ks.newKieClasspathContainer(getClass().getClassLoader());
  KieBase kbase = kContainer.getKieBase("rules");
  KieSession kSession = kbase.newKieSession();

when am try to execute this getting null pointer exception in **kContainer.getKieBase("rules");** because it can't find/reach **kmodule.xml**

But i have added in META-INF/kmodule.xml and specified in **build.properties** 
    
    source.. = src/,\
           resources/
    bin.includes = META-INF/kmodule.xml,\

Can anyone help me to resolve this issue.


Heng Sin Low

unread,
Oct 14, 2019, 2:42:23 AM10/14/19
to idem...@googlegroups.com
since it is a classpathcontainer, try put your kmodule.xml to your classpath instead of META-INF

--
You received this message because you are subscribed to the Google Groups "iDempiere" group.
To unsubscribe from this group and stop receiving emails from it, send an email to idempiere+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/idempiere/564bf4a9-6a4a-4c28-9308-8c83e45e37ed%40googlegroups.com.

Selvi

unread,
Oct 14, 2019, 5:28:45 AM10/14/19
to iDempiere
Hengsin,

Thank you for your reply.

so i have added tried in META-INF, Resource folder

bin.includes = .,\
               META-INF/kmodule.xml,\
               resources/,\
                resources/META-INF/kmodule.xml,\
source.. = src/,\
           resources/

Bundle-ClassPath: resources/,

But i can't succeed..

Can you please make more clear, exactly where i need to add kmodule.xml (i.e) classpathcontainer

Would appreciate your help!


On Monday, October 14, 2019 at 12:12:23 PM UTC+5:30, hengsin wrote:
since it is a classpathcontainer, try put your kmodule.xml to your classpath instead of META-INF

On Mon, Oct 14, 2019 at 2:33 PM Selvi <thami...@winvest-global.com> wrote:
Am using IDempiere 6.2 trying to integrate with business rule engine Drools..
I have taken simple helloworld example in drools 7.3.0v 

**Code :**
            
      KieServices ks = KieServices.Factory.get();
  KieContainer kContainer = ks.newKieClasspathContainer(getClass().getClassLoader());
  KieBase kbase = kContainer.getKieBase("rules");
  KieSession kSession = kbase.newKieSession();

when am try to execute this getting null pointer exception in **kContainer.getKieBase("rules");** because it can't find/reach **kmodule.xml**

But i have added in META-INF/kmodule.xml and specified in **build.properties** 
    
    source.. = src/,\
           resources/
    bin.includes = META-INF/kmodule.xml,\

Can anyone help me to resolve this issue.


--
You received this message because you are subscribed to the Google Groups "iDempiere" group.
To unsubscribe from this group and stop receiving emails from it, send an email to idem...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages