I tried to make a simple web application integrated with the Drools rule engine and deployed it to the hero. In the controller action, I execute a method that imports and parses the DRL file and returns the result. I noticed strange behavior. When I start the application with the command play run
Drools do not want to work (I get some import errors for the rules and exception parsing exception), but when I start my application through Eclipse, everything works.
I checked what exactly is being done in these various ways:
I tried to run play run
with additional Java arguments existing in Eclipse execution, but I did not find a working combination.
Any ideas what arguments the play run
command adds to find a working solution?
Thanks in advance for your help.
Stacktrace:
java.lang.IllegalArgumentException: at drools.RuleEngine.readKnowledgeBase(RuleEngine.java:66) at drools.RuleEngine.run(RuleEngine.java:28) at controllers.Application.index(Application.java:17) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at play.mvc.ActionInvoker.invokeWithContinuation(ActionInvoker.java:546) at play.mvc.ActionInvoker.invoke(ActionInvoker.java:500) at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:476) at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:471) at play.mvc.ActionInvoker.invoke(ActionInvoker.java:159) at play.server.PlayHandler$NettyInvocation.execute(PlayHandler.java:220) at play.Invoker$Invocation.run(Invoker.java:265) at play.server.PlayHandler$NettyInvocation.run(PlayHandler.java:200) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:165) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:679)
source share