KieServices.Factory.get() returns null and so does new KieHelper()

1,364 views
Skip to first unread message

David Kirkpatrick

unread,
Mar 24, 2018, 3:27:16 AM3/24/18
to jBPM Usage
I have a working application that I typically run via maven command line or via Eclipse, so it always finds the dependencies. I decided to build this as a fat jar with all dependencies so I could use a simple classpath and not have to manage all of the dependent jars. I simply modified my pom file to re-package the application as a fat jar and then tried to run the application via command line to see if it would work as it does via the maven command line. I've done this for several other applications, and have them all running under docker, so I thought this one would be just another one to knock out. 

However, when I run the application, I'm finding that the following lines are both returning null. 

KieServices services = KieServices.Factory.get();

KieHelper kieHelper = new KieHelper();

I really only need the KieHelper, but I thought the fact that both are returning null might be a clue to what is happening.


My application is a JPBM workflow based application that constructs a KieBase using KieHelper to add processes, register workitem handlers, and listeners based on a configuration files that define the contents to load. I then construct a KieSession and start process instances in the engine based on an external schedule and/or events. In the fat jar deployment, I can't even get past step 1. 

Any ideas what is happening?

David Kirkpatrick

unread,
Mar 26, 2018, 1:56:53 PM3/26/18
to jBPM Usage
FYI. I am using JBPM 7.3 in my application, and my OS is CentOS 7.4 and I"m using Java 8. 

When I first tried to run the application I had issues finding/reading configuration files that were in my jar. I had been finding them by classpath and loading them via path, but that did not work when the path was inside the jar. I had to change to get the file as an InputStream. I suspect a similar issue might be happening with JBPM trying to load files that it expects to find such as kmodule.xml. I do have a kmodule.xml file in my jar, but it is only a minimal file with only the one line header as I build my knowledge base programmatically. 

Nicole Torres

unread,
May 17, 2018, 10:08:33 AM5/17/18
to jBPM Usage
I believe it's the same issue as described here, I posted my findings on stackoverflow.
Reply all
Reply to author
Forward
0 new messages