Re: [rules-users] ClassCastException when KnowledgeAgent loads declared type

2012-01-19 Thread lhorton
I tried this with 5.4 beta1 and I think the problem is still there. The error I see when re-loading a drl that contains a declared type is: DEBUG 2012-01-19 09:37:37,358 [com.abclegal.rules.server.RulesServiceImpl] - BinaryResourceDiffProducerImpl: Couldn't handle

Re: [rules-users] ClassCastException when KnowledgeAgent loads declared type

2012-01-18 Thread lhorton
I was able to create a working unit test for the workaround of moving the declared type out of the rules file and into a different package; but when I deployed this change on my server, the files loaded ok the first time, but again I ran into trouble when I would redeploy the base rules file.

Re: [rules-users] ClassCastException when KnowledgeAgent loads declared type

2012-01-17 Thread Esteban Aliverti
This is a known bug: https://issues.jboss.org/browse/JBRULES-2962 Some improvements were made in 5.3 and 5.4 but AFAIK, the issue still remains. Could you please try using 5.4.SNAPSHOT ot beta1 to see if the error persists? Best Regards, Esteban Aliverti

Re: [rules-users] ClassCastException when KnowledgeAgent loads declared type

2012-01-17 Thread Davide Sottara
The problem is more complicated than it seems: imagine you - load the DRL the first time - create some instances of your clas - load the DRL a second time all the instances created so far would be orphaned. Likewise, all patterns include a type check: should that be updated? We are still

Re: [rules-users] ClassCastException when KnowledgeAgent loads declared type

2012-01-17 Thread lhorton
I meant to say also, we use only Stateless knowledge sessions, so no worries about existing orphaned facts. It is all new, each session -- View this message in context: http://drools.46999.n3.nabble.com/ClassCastException-when-KnowledgeAgent-loads-declared-type-tp3664044p3668305.html Sent from

Re: [rules-users] ClassCastException when KnowledgeAgent loads declared type

2012-01-17 Thread lhorton
Thank you, Davide. This is not a critical bug for my shop so I don't wish to force a JIRA when other Drools work might be more important. My workaround so far is just to rename the declared class if I have to hot-deploy, that way there are no conflicts. I tried to separate the declared class

[rules-users] ClassCastException when KnowledgeAgent loads declared type

2012-01-16 Thread lhorton
Code level: 5.2.0.Final I have a DRL file that includes a declared type: package com.abclegal.rules.servicerequirements declare TransgressionMetaData attempt : ServiceAttempt requirement : Requirement end The package loads the first time and its rules run without error. If I