Drools project in JIdea

I’m trying to run my first application in Drools.
I have chosen to create it in Intellij Jidea Ultimate.
I was trying to run at least some of the basic examples.
I created a project, copied there the hello world example. The Java class and the Drool rules.
I have tried several different approaches to include the required libraries.

  • I have the plugin for Drools in JIdea, which downloads all the nescesary binaries for me. It downloaded version 6.2.0
  • I have downloaded all the binaries and manually included them into the project. Version 7.1.0
  • I have tried Maven to include the required binaries

In all these 3 version, I always ran into the same problem. The ksession created by newKieSession is always null.
The chain of commands to create it is the unchanged from the example.

    // KieServices is the factory for all KIE services
    KieServices ks = KieServices.Factory.get();

    // From the kie services, a container is created from the classpath
    KieContainer kc = ks.getKieClasspathContainer();

    // From the container, a session is created based on
    // its definition and configuration in the META-INF/kmodule.xml file
    KieSession ksession = kc.newKieSession("HelloWorldKS");

I have also included kmodule.xml in the same folder (I have changed the package name to corespond with the structure changes I have made). I supose that the problem lies in that.