[rules-dev] ClassCastException: org.drools.reteoo.AlphaNode$AlphaMemory cannot be cast to org.drools.reteoo.BetaMemory

Andreas Kohn andreas.kohn at fredhopper.com
Fri Apr 17 04:09:19 EDT 2009


Hi,

I'm currently integrating drools (via the .spi.* classes, not via .drl
files etc) into our product, and found a very odd class cast exception
when producing different rules.


java.lang.ClassCastException: org.drools.reteoo.AlphaNode$AlphaMemory cannot be cast to org.drools.reteoo.BetaMemory
	at org.drools.reteoo.NotNode.assertLeftTuple(NotNode.java:96)
	at org.drools.reteoo.CompositeLeftTupleSinkAdapter.doPropagateAssertLeftTuple(CompositeLeftTupleSinkAdapter.java:145)
	at org.drools.reteoo.CompositeLeftTupleSinkAdapter.createAndPropagateAssertLeftTuple(CompositeLeftTupleSinkAdapter.java:57)
	at org.drools.reteoo.LeftInputAdapterNode.assertObject(LeftInputAdapterNode.java:142)
	at org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:42)
	at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:184)
	at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:146)
	at org.drools.reteoo.Rete.assertObject(Rete.java:113)
	at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:218)
	at org.drools.reteoo.ReteooWorkingMemory$WorkingMemoryReteAssertAction.execute(ReteooWorkingMemory.java:291)
	at org.drools.common.AbstractWorkingMemory.executeQueuedActions(AbstractWorkingMemory.java:1475)
	at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:676)
	at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:649)
	at drools.scratch.RecyclingTest.assertSession(RecyclingTest.java:88)


Attached you'll find a maven project exhibiting the error, and from
stepping through the code pieces it looks like two nodes in the network
have the same id. The id was marked as released in the removeRule()
process.

This is against the 5.0.0.SNAPSHOT.

Am I doing something wrong? Missing anything? Or is this a real
"blocker" bug? Should I open a JIRA issue for that?

Regards,
--
Andreas


-- 
Never attribute to malice that which can be adequately explained by
stupidity.                                        -- Hanlon's Razor
-------------- next part --------------
A non-text attachment was scrubbed...
Name: recycle-test.zip
Type: application/zip
Size: 2879 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/rules-dev/attachments/20090417/61efd47f/attachment.zip 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://lists.jboss.org/pipermail/rules-dev/attachments/20090417/61efd47f/attachment.bin 


More information about the rules-dev mailing list