Cannot find KieModule: org.default:artifact:1.0.0-SNAPSHOT
by waynemetcalfe
I've seen this problem a few places while searching for a solution. Is it
possible to overcome this issue?
Drools version:6.0.0.Final
Java version: 1.7.0_45
Code snippet:
...
final KieServices ks = KieServices.Factory.get();
final KieRepository kr = ks.getRepository();
final KieFileSystem kfs = ks.newKieFileSystem();
//ruleScript is simply a string containing the rules
kfs.write("src/main/resources/com/company/test/rules/rules.drl",
ruleScript);
KieBuilder kb = ks.newKieBuilder(kfs);
kb.buildAll();
if (kb.getResults().hasMessages(Level.ERROR)){
configuration.getLog().error("\nSomething wrong here!\n\n");
}
final KieContainer kContainer =
ks.newKieContainer(kr.getDefaultReleaseId());
session = kContainer.newKieSession();
Exception:
java.lang.RuntimeException: Cannot find KieModule:
org.default:artifact:1.0.0-SNAPSHOT
at
org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:86)
Thanks
--
View this message in context: http://drools.46999.n3.nabble.com/Cannot-find-KieModule-org-default-artif...
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 8 months
How to feed camel-server with kmodules using kie-ci?
by wogo
Hi,
I am trying to integrate drools-camel-server-example and kie-ci (6.0.1)
plugin.
My goal is to load modules from maven (built/deployed from kie-wb).
Maven configuration looks fine, as MavenSettings are initialized while
debugging (I see my repos).
I do everything locally to make things simpler.
Standalone code (from Eclipse) works fine with kie-cie - I execute
"Underage" rule from mortgages example.
I have built server with all kie-cie dependencies, however none of kmodules
deployed in Maven is loaded.
What am I missing? Is there anything special required in
knowledge-services.xml (I have used a default one provided originally in
.war)?
Do you have an example of mortgages obtained via camel-server?
Regards,
Wojciech
--
View this message in context: http://drools.46999.n3.nabble.com/How-to-feed-camel-server-with-kmodules-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 8 months
named query TasksAssignedAsPotentialOwner doesn't work with MySql db
by Frank Knoll
Hi,
When I add a task (having two potential owners) by calling the method
addTask followed by calling the method getTasksAssignedAsPotentialOwner of
org.jbpm.task.service.TaskClient I expect to receive a list of TaskSummaries
containing at least the previously added task. But I actually get an empty
list!
Here is my setup and possible solution:
I am using the trunk version of
./jbpm-human-task/src/main/resources/META-INF/orm.xml and a MYSQL database.
When calling addTask the Task table will be populated with a NULL
actualOwner_id.
The named query TasksAssignedAsPotentialOwner
"select new org.jbpm.task.query.TaskSummary(...t.taskData.actualOwner...)
from ... left join t.taskData.actualOwner ..." of orm.xml generates SQL
consisting of an inner join "inner join OrganizationalEntity user7_ on
task0_.actualOwner_id=user7_.id" which doesn't take the NULL actualOwner_id
correctly into account.
When I replace the named query TasksAssignedAsPotentialOwner with
"select new org.jbpm.task.query.TaskSummary(...actualOwner...) from ...left
join t.taskData.actualOwner as actualOwner ...", then the generated SQL
consists of an "left outer join OrganizationalEntity user2_ on
task0_.actualOwner_id=user2_.id" which takes the NULL actualOwner_id
correctly into account. So I get a List of TaskSummaries containing the
added task.
Is this a correct fix?
Cheers, Frank
--
View this message in context: http://drools.46999.n3.nabble.com/named-query-TasksAssignedAsPotentialOwn...
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 9 months
NullPointerException with kie-spring 6.0.1 and Spring 4.0
by Andrew Berman
Hello,
I'm trying to play around with Drool 6.0.1 integration with Spring (I'm
using spring-boot which includes spring 4.0). I've looked at the unit
tests written and have copied them pretty much exactly. When I start the
app, I consistently receive:
Caused by: org.springframework.beans.BeanInstantiationException: Could not
instantiate bean class [org.kie.spring.KModuleBeanFactoryPostProcessor]:
Constructor threw exception; nested exception is
java.lang.NullPointerException
at
org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:164)
at
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:89)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1069)
... 22 more
Caused by: java.lang.NullPointerException
at
org.kie.spring.KModuleBeanFactoryPostProcessor.initConfigFilePath(KModuleBeanFactoryPostProcessor.java:79)
at
org.kie.spring.KModuleBeanFactoryPostProcessor.<init>(KModuleBeanFactoryPostProcessor.java:64)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at
org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:148)
When debugging the NPE comes from line 79,
getClass().getResource("/").getPath(), because getResource yields null.
Here is my spring context file:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:kie="http://drools.org/schema/kie-spring"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
http://drools.org/schema/kie-spring http://drools.org/schema/kie-spring.xsd
">
<kie:kmodule id="kmodule">
<kie:kbase name="kbase1" packages="rules.drools">
<kie:ksession name="ksession">
<kie:consoleLogger/>
</kie:ksession>
</kie:kbase>
</kie:kmodule>
<bean id="kiePostProcessor"
class="org.kie.spring.KModuleBeanFactoryPostProcessor"/>
</beans>
Can someone help out?
Thanks!!
10 years, 9 months
DSL: Unable to Expand Error - Even things that shouldn't be expanded.
by SrjTx
I've done a couple DSL/RDSLR rules in the past with success. Been trying to
create one today but get "Unable to expand" errors on validation on every
line, even with not substitutions.
What am i missing?
Here is a NON-DSL/RDRL file that works just fine.
5. | rule "AAA"
6. | dialect "mvel"
7. | when
8. | $sep : DroolsSepBean( )
9. | then
10. | System.out.println("HI");
11. | end
Here is a DSL/RDSLR file that generates the errors below (note this is the
same code as above and nothing should substitute) I even took out the $sep
assignment to make it more simple (it gives same errors if it's in there)
5. | rule "dsltest"
6. | dialect "mvel"
7. | when
8. | DroolsSepBean( )
9. | then
10. | System.out.println("HI");
11. | end
18:42:57,396 ERROR [org.drools.compiler.kie.builder.impl.AbstractKieModule]
(http-/127.0.0.1:8080-2) Unable to build KieBaseModel:defaultKieBase
[8] Unable to expand: DroolsSepBean( )
[10] Unable to expand: System.out.println("HI");
--
View this message in context: http://drools.46999.n3.nabble.com/DSL-Unable-to-Expand-Error-Even-things-...
Sent from the Drools: User forum mailing list archive at Nabble.com.
10 years, 9 months
Error Inserting events into drools fusion stream
by Ayush
Hi All,
I'm trying to implement drools fusion into my app. The scenario of my app is
as follows:
- Facts will be received continuosly.
- On receving fact I'm generating a new event and adding it into a new
working memory entry point stream. Also I'm adding facts into session coz
I'll be updating them.
- I need to apply rules on continuous stream of events.
- I've not used any camel + spring or pipeline. Are these mandatory to use?
For 1st fact everything works fine but when I receive 2nd fact I'm getting
Now when I'm trying to get entry point on receive of 2nd alarm I'm getting
org.drools.RuntimeDroolsException: Unexpected exception executing action
org.drools.reteoo.PropagationQueuingNode$PropagateAction@9ff411 Caused by:
java.util.concurrent.RejectedExecutionException.
On debug I found that the above exception is coming when I'm calling
session.getWorkingMemoryEntryPoint("MyStream"); Can anyone please help me
that how should I insert facts and events into working memory?
I'd invested ample amount of time searching for this but I'm empty handed.
Guys please help this is very urgent for me. Thanks in anticipation
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Error-Inserting-event...
Sent from the Drools - User mailing list archive at Nabble.com.
10 years, 10 months