javaspring-bootdroolsdrools-kie-server

Error creating bean with name 'kieServer' while running kie-server-spring-boot-sample


I am trying to start a springboot application residing here https://github.com/kiegroup/droolsjbpm-integration/tree/main/kie-spring-boot/kie-spring-boot-samples/kie-server-spring-boot-sample. I cloned the repo and did maven clean install.Later when Im starting the app Im seeing below.

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'kieServer' defined in class path resource [org/kie/server/springboot/autoconfiguration/KieServerAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.kie.server.services.api.KieServer]: Factory method 'kieServer' threw exception; nested exception is java.lang.NoClassDefFoundError: org/junit/runner/Runner

Why is the application classloader looking for a junit class is what I am not able wrap my head around. I tried adding junit dependencies explicitly to my pom that doesn't work.

Any help is appreciated,thanks in advance.


Solution

  • I could never find the cause for above issue. However I was able to build a working Drools protype application just by adding below dependency to my pom.xml

        <version.org.kie>7.69.0.Final</version.org.kie>
        <dependency>
            <groupId>org.kie</groupId>
            <artifactId>kie-server-spring-boot-starter-drools</artifactId>
            <version>${version.org.kie}</version>
        </dependency>