[jboss-jira] [JBoss JIRA] (DROOLS-5535) Drools - KieServices.Factory.get() returns null

Ashish Srivastava (Jira) issues at jboss.org
Tue Jul 28 07:30:00 EDT 2020


    [ https://issues.redhat.com/browse/DROOLS-5535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14301640#comment-14301640 ] 

Ashish Srivastava edited comment on DROOLS-5535 at 7/28/20 7:29 AM:
--------------------------------------------------------------------

.


was (Author: ashishsr):
I am trying multiple solutions which are mentioned in StackOverflow

[https://stackoverflow.com/questions/47556233/drools-7-4-1-kieservices-factory-get-returns-null]

[https://stackoverflow.com/questions/60971872/kieservices-kieservices-kieservices-factory-get-returns-null-when-running-i]

[https://stackoverflow.com/questions/47332148/nullpointer-in-kieservices-factory-get]

[https://stackoverflow.com/questions/50258016/running-drools-as-a-fat-jarcompile-drools-into-jar]

[https://stackoverflow.com/questions/50258016/running-drools-as-a-fat-jarcompile-drools-into-jar] [https://stackoverflow.com/questions/46690139/exception-child-services-have-no-parent-when-starting-optaplanner-application/47514137#47514137]

 

> Drools - KieServices.Factory.get() returns null
> -----------------------------------------------
>
>                 Key: DROOLS-5535
>                 URL: https://issues.redhat.com/browse/DROOLS-5535
>             Project: Drools
>          Issue Type: Bug
>          Components: core engine
>    Affects Versions: 7.36.0.Final
>            Reporter: Ashish Srivastava
>            Assignee: Mario Fusco
>            Priority: Major
>
> I try to integrate a Drools project in a maven application. The Drools app is running perfectly on his own, but when I try to integrate it in the *quarkus project*, I get a java.lang.NullPointerException.
> After some researches, it seems to happen because KieServices.Factory.get() return me null because of kie.conf. 
> Drools Site Quote is: Many modules of Drools (e.g. drools-core, drools-compiler) have a file named {{kie.conf}} containing the names of the classes implementing the services provided by the corresponding module. When running Drools in a fat JAR, for example created by the Maven Shade Plugin, those various {{kie.conf}} files need to be merged, otherwise , the fat JAR will contain only 1 kie.conf from a single dependency, resulting into errors. You can merge resources in the Maven Shade Plugin using transformers, like this:
> ([https://docs.jboss.org/drools/release/7.14.0.Final/drools-docs/html_single/index.html#_building_and_running_drools_in_a_fat_jar])
> how can we configure the same for Quarkus Project ? or is there any way to load these file externally ..
>  



--
This message was sent by Atlassian Jira
(v7.13.8#713008)



More information about the jboss-jira mailing list