[rules-users] Drools Ant task packages not read by KnowledgeAgent

Gerret Hansper gerret.public at gmx.de
Mon Feb 22 10:04:32 EST 2010


Hi all,

for deploying our rules we usually create packages in Guvnor 
and then deploy the .pkg binaries to our application where we access them 
via a change set file, e.g. as a classpath or url resource.

We have also used the Drools Ant task to create packages directly from 
the rule sources in Eclipse, cause it would be convenient for testing and 
development purposes to be able to just drop that file in place of the one
created from Guvnor.

However it seems that the KnowledgeAgent can't read the pkg format produced
from the Ant task, we get an Exception as follows:

java.lang.RuntimeException: KnowledgeAgent exception while trying to 
	deserialize KnowledgeDefinitionsPackage  
 at org.drools.agent.impl.KnowledgeAgentImpl.rebuildResources
 	(KnowledgeAgentImpl.java:418)
 at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet
 	(KnowledgeAgentImpl.java:120)
 ...
Caused by: java.lang.ClassCastException: org.drools.reteoo.ReteooRuleBase
 at org.drools.agent.impl.KnowledgeAgentImpl.rebuildResources
 	(KnowledgeAgentImpl.java:413)

We are using the same drools-core.jar for building and running so I don't think
this is a simple class version mismatch.

Has anybody got a similar scenario working? Any clue what we might be doing 
wrong? (We are using Drools 5.0.1.)

Thanks,
	Gerret





More information about the rules-users mailing list