More careful reading of  org.drools.rule.Package shows that readExternal and writeExternal aren&#39;t working on plain ObjectOutputStream in combination with change set monitoring. You must<br><br>      OutputStream os = new FileOutputStream( pkgPath );<br>
      ObjectOutputStream oos = new <b>Drools</b>ObjectOutputStream( os );<br>      KnowledgePackage kPackage = kBuilder.getKnowledgePackages().iterator().next();<br>      oos.writeObject( kPackage );<br>      oos.close();<br>
<br>org.drools.common.DroolsObjectOutputStream - although just a renaming subclass of ObjectOutputStream - is not part of the &quot;stable&quot; API.<br><br>-W<br><br><br><div class="gmail_quote">On 16 June 2011 19:46, lhorton <span dir="ltr">&lt;<a href="mailto:LHorton@abclegal.com">LHorton@abclegal.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">That is what I was doing in my original source.  Your code gives me the same<br>
original exception:<br>
<br>
Caused by: java.lang.ClassCastException: [B cannot be cast to<br>
org.drools.rule.DialectRuntimeRegistry<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/rules-users-KnowledgeAgent-exception-while-trying-to-deserialize-KnowledgeDefinitionsPackage-tp3064043p3073009.html" target="_blank">http://drools.46999.n3.nabble.com/rules-users-KnowledgeAgent-exception-while-trying-to-deserialize-KnowledgeDefinitionsPackage-tp3064043p3073009.html</a><br>

</font><div><div></div><div class="h5">Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div></div></blockquote></div><br>