Drools automatically Deleting Events from KieSession - drools

I have a drools kiesession which has multiple entry points (20-50). I am facing an issue where at some point all the events inside that entry point are getting deleted automatically and the Fact count in the entry point is showing as 1. I want suggestions on how to debug this. Can anyone help me with this? My drools version is 7.15.Final.

Related

How to remove Routine Group error from workbench?

I'm using MySQL Workbench and I am trying to create a routine. However, At the time of creating routine some error comes,then i deleted that routine. Now I synchronize the model with the existing database, the Routine group error is coming, though i remove that routine group. Can anyone help me how to remove this error from Model?
The _SYNTAX_ERROR suffix is added by MySQL Workbench to indicate that it found a syntax error in your routine code. Once you fixed that the name will change back to what you gave it. And then you can also synchronize your model.
I faced the same issue, cause i copy&pasted some c# code into a routine group, and it immediately became invisible by workbench. Synchronization now always reporte errors, even after deleting the whole routine group. The faulty code was stuck somewhere, inaccessible through the Workbench UI.
Just found a solution atm:
Do a regular synchronization and tell Workbench to change the sync-direction on the error entries. This will remove the faulty lines of code, even if they are not accessible through the Workbench UI.

Drools workbench 6.4.0.Final - Executing multiple rules that has insert(object) in drools is not working

I have a Guided table rule where 2- 3 rules get fired. And each fired rule creates a new Fact object by insert(object);
So the issue here is it some times creates 1 object and some times 2 objects.
So when ever 1 object is created, then on re trigger it creates 2 objects.
I feel some instability in the drools engine. Any quick suggestions are more appreciated. I am using drools work bench to create Guided rules
Drools version : 6.4.0.Final
Cheers,
Kalyan

The method .map in the type AbstractJavaRDDLike<<>> is not applicable for the arguments

I am getting an error in talend. PFA.
Please find more details of the mapping.
Can you please help me here?.
Thank You
Tom
This was an issue with code generation of Talend Bigdata version.
There were 5 subjobs in my job.
I was testing the functionality of last three subjobs.(Off late i have added 3 extra tSql components into my 4th subjob , which you can see in the screenshot).
For that i have de-activated the first two subjobs.(I have de-activated the first two subjobs earlier as well and unit tested which was fine)
I assumed this was the issue with code generation of talend.
(Earlier also I faced similar issue with .map() function of tSql component. That time i deleted tSql component and created it again and issue went away.)
I proceeded with the following trial and error method.
I closed the job and reopened again ( issue exists)
I restarted Talend tool and reopened again (issue exists)
I deleted the tSql components and created them again (issue exists)
I activated the de-activated subjobs and then checked again(ISSUE DISAPPEARED)

OrientDB: IllegalStateException: Cannot begin a transaction while a hook is executing

I'm getting this error when I try to insert 17000 vertex in the DB. The vertex are grouped as a multiple tree an the commit occur when a tree has bean fulled readed/stored. The first tree has 2300 vertex, the second has 5500 vertex and is in this point when it fail.
java.lang.IllegalStateException: Cannot begin a transaction while a hook is executing
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.begin(ODatabaseDocumentTx.java:2210)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.begin(ODatabaseDocumentTx.java:2192)
at com.tinkerpop.blueprints.impls.orient.OrientTransactionalGraph.ensureTransaction(OrientTransactionalGraph.java:229)
at com.tinkerpop.blueprints.impls.orient.OrientTransactionalGraph.commit(OrientTransactionalGraph.java:177)
at net.odbogm.SessionManager.commit(SessionManager.java:351)
at com.quiencotiza.utilities.SetupInicial.loadRubros(SetupInicial.java:180)
at com.quiencotiza.utilities.SetupInicial.initDatabase(SetupInicial.java:48)
at com.quiencotiza.utilities.SetupInicial.main(SetupInicial.java:41)
It's a single thread app. It load the database with the initials records.
I have upgraded to 2.2.4 but I get the same error.
Thanks
Marcelo
Well. I solve the problem. It seem is something related to the activateOnCurrentThread() but don't know why it happened. What means that exception? Why it is throwing?
I know its an old topic, but maybe its will help someone,
Had the same problem, a lot threads with many queries and updates.
So I started to work with one thread (SingleThreadExecutor in Java) and solve it,
I guess there is a bug in the locks of hooks

Drools - Load Large number of rules

In my application I'm loading nearly 10,000 rule to Drools ( Drools 5.5.0.final). But application throws java.lang.OutOfMemoryError Exception. My jvm args ,
-Xms1024m
-Xmx1024m
Can anyone help me to resolve this. I also used BigMemory ( http://terracotta.org/products/bigmemory) but still getting the same error.
Thanks in advance !
Use a profiler like VisualVM (free and very easy to run) to see how memory over time graph and take a heap snapshot just before it goes OutOfMemory.
Especially that graph can tell you some interesting things (by adding some Thread.sleep's in your code) which could give you and us a clue what's causing it:
how much memory you consume before starting anything drools (so just having your dataset in memory)
how much memory having the rules in memory consumes (so the KnowledgeBase)
how memory evolves onces you start a drools session from that base and insert your dataset.
This may happen when you resuse the same 'statefulKnowledgeSession' for triggering process each time. In this case for each statefulKnowledgeSession.insert(fact) new facts are inserted but not removing prevous ones. Is that your case please remove/retract previously inserted facts before triggering new processinsatance using:
`ksession.retract(factHandle);