Can you provide an isolated test case to reproduce this problem? If so, please create a JIRA, attach your case and ping me plz.

    Edson

2010/4/22 Piotr Jedrychowski <pjedrychowski@proximetry.pl>
I've downloaded last stable build (number 3845, made 2010-04-14) from Drools Hudson (http://hudson.jboss.org/hudson/job/drools/). After running my tests I got same problem (but little different StackTrace):

java.lang.ClassCastException: org.drools.core.util.ObjectHashMap
    at org.drools.reteoo.AlphaNode.updateSink(AlphaNode.java:172)
    at org.drools.reteoo.BetaNode.attach(BetaNode.java:214)

    at org.drools.reteoo.builder.BuildUtils.attachNode(BuildUtils.java:160)
    at org.drools.reteoo.builder.GroupElementBuilder$NotBuilder.build(GroupElementBuilder.java:281)
    at org.drools.reteoo.builder.GroupElementBuilder.build(GroupElementBuilder.java:77)
    at org.drools.reteoo.builder.GroupElementBuilder$AndBuilder.build(GroupElementBuilder.java:130)
    at org.drools.reteoo.builder.GroupElementBuilder.build(GroupElementBuilder.java:77)
    at org.drools.reteoo.builder.ReteooRuleBuilder.addSubRule(ReteooRuleBuilder.java:155)
    at org.drools.reteoo.builder.ReteooRuleBuilder.addRule(ReteooRuleBuilder.java:128)

    at org.drools.reteoo.ReteooBuilder.addRule(ReteooBuilder.java:117)
    at org.drools.reteoo.ReteooRuleBase.addRule(ReteooRuleBase.java:409)
    at org.drools.common.AbstractRuleBase.addRule(AbstractRuleBase.java:638)
    at org.drools.common.AbstractRuleBase.addPackages(AbstractRuleBase.java:520)
    at org.drools.reteoo.ReteooRuleBase.addPackages(ReteooRuleBase.java:426)

    at org.drools.impl.KnowledgeBaseImpl.addKnowledgePackages(KnowledgeBaseImpl.java:121)


Maybe I should download Drools from other place?

Piotr





On 2010-04-21 19:37, Edson Tirelli wrote:

   This is related to the problem in your other e-mail and it is fixed in trunk.

   Edson

2010/4/21 Piotr Jedrychowski <pjedrychowski@proximetry.pl>
Hello.

I have a problem with such scenario:

1) add one knowledge package (sensor200) with two rules:

package sensor200
rule "Sensor-200-ON"
when
(and f0: FMSensorFact(id==201) f1: FMSensorFact(id==202) )
(not FMFact(id==200))
then
FMFact factToInsert = new FMFact(200);
insert(factToInsert);
end

package sensor200
rule "Sensor-200-OFF"
when
not (and FMSensorFact(id==201) FMSensorFact(id==202) )
(factToRetract : FMFact(id==200))
then
retract(factToRetract);
end

2) remove knowledge package (sensor200)

3) add knowledge package with the same name as in point 1, but with
other rule:

package sensor200
rule "Sensor-200-OR-201-ON"
when
fact: FMSensorFact(id==201)
(not FMFact(id==200))
then
FMFact factToInsert = new FMFact(200);
insert(factToInsert);
end

During adding knowledge package in point 3, I'm getting
ClassCastException with this Stacktarce:

java.lang.ClassCastException: org.drools.util.ObjectHashMap
 at org.drools.reteoo.AlphaNode.assertObject(AlphaNode.java:142)
 at org.drools.reteoo.ObjectTypeNode.updateSink(ObjectTypeNode.java:252)
 at org.drools.reteoo.AlphaNode.attach(AlphaNode.java:133)
 at org.drools.reteoo.builder.BuildUtils.attachNode(BuildUtils.java:160)
 at
org.drools.reteoo.builder.PatternBuilder.attachAlphaNodes(PatternBuilder.java:295)
 at
org.drools.reteoo.builder.PatternBuilder.attachPattern(PatternBuilder.java:117)
 at org.drools.reteoo.builder.PatternBuilder.build(PatternBuilder.java:70)
 at
org.drools.reteoo.builder.GroupElementBuilder$NotBuilder.build(GroupElementBuilder.java:228)
 at
org.drools.reteoo.builder.GroupElementBuilder.build(GroupElementBuilder.java:73)
 at
org.drools.reteoo.builder.GroupElementBuilder$AndBuilder.build(GroupElementBuilder.java:126)
 at
org.drools.reteoo.builder.GroupElementBuilder.build(GroupElementBuilder.java:73)
 at
org.drools.reteoo.builder.ReteooRuleBuilder.addSubRule(ReteooRuleBuilder.java:153)
 at
org.drools.reteoo.builder.ReteooRuleBuilder.addRule(ReteooRuleBuilder.java:126)
 at org.drools.reteoo.ReteooBuilder.addRule(ReteooBuilder.java:117)
 at org.drools.reteoo.ReteooRuleBase.addRule(ReteooRuleBase.java:362)
 at org.drools.common.AbstractRuleBase.addRule(AbstractRuleBase.java:618)
 at
org.drools.common.AbstractRuleBase.addPackages(AbstractRuleBase.java:500)
 at org.drools.reteoo.ReteooRuleBase.addPackages(ReteooRuleBase.java:379)
 at
org.drools.impl.KnowledgeBaseImpl.addKnowledgePackages(KnowledgeBaseImpl.java:121)

Maybe someone had similar problem and could help me?

I'm using:
* JBoss 4.2.3.GA
* Drools 5.0

Regards,
Piotr
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users



--
 Edson Tirelli
 JBoss Drools Core Development
 JBoss by Red Hat @ www.jboss.com
_______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users


_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users




--
 Edson Tirelli
 JBoss Drools Core Development
 JBoss by Red Hat @ www.jboss.com