Ok, so it's quite likely that something bad happens during one of those
addKnowledgePackages. Would you be able to help us debug it?
We'd need to trace the last addition/removal before the exception was
generated.
Another way to look at this, would be to catch and debug the exception to
see which RETE node(s) are involved and thus which rules.
In the CCE you reported, a FromNodeMemory is returned in place of a
JoinNodeMemory..
it probably happens in the class
org.drools.common.ConcurrentNodeMemories, where
memories are indexed by node id. I suspect that during one of those
add/remove cycles
a node id was reassigned without clearing the memory cache first.
In particular, the method BaseNode.doRemove() should be called for the
FromNode
owning the id which ends up being assigned to the JoinNode.
My first tentative guess would be that the FromNode is detected as still
being in use even if
it is marked for removal.
Davide
On 04/26/2013 05:05 PM, mohdejaz74 wrote:
In my case, I dynamically add/remove/exec rules at run-time.
KnowledgeBase
instance is constantly updated.
When a rule needs to be added or removed, I do it in temporary
KnowledgeBuilder instance. If there are no errors, I update main
KnowledgeBase instance using "addKnowledgePackages". I did'nt get any
errors
...
I do understand that this may be due to KB corruption. I use hasErrors() &
getErrors() to check if there are any errors. Do I need to check something
else?
Regards
Ejaz
--
View this message in context:
http://drools.46999.n3.nabble.com/threw-error-java-lang-ClassCastExceptio...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users