[rules-users] KnowledgeAgent exception while trying to deserialize KnowledgeDefinitionsPackage

Wolfgang Laun wolfgang.laun at gmail.com
Fri Jun 17 04:35:44 EDT 2011


More careful reading of  org.drools.rule.Package shows that readExternal and
writeExternal aren't working on plain ObjectOutputStream in combination with
change set monitoring. You must

      OutputStream os = new FileOutputStream( pkgPath );
      ObjectOutputStream oos = new *Drools*ObjectOutputStream( os );
      KnowledgePackage kPackage =
kBuilder.getKnowledgePackages().iterator().next();
      oos.writeObject( kPackage );
      oos.close();

org.drools.common.DroolsObjectOutputStream - although just a renaming
subclass of ObjectOutputStream - is not part of the "stable" API.

-W


On 16 June 2011 19:46, lhorton <LHorton at abclegal.com> wrote:

> That is what I was doing in my original source.  Your code gives me the
> same
> original exception:
>
> Caused by: java.lang.ClassCastException: [B cannot be cast to
> org.drools.rule.DialectRuntimeRegistry
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/rules-users-KnowledgeAgent-exception-while-trying-to-deserialize-KnowledgeDefinitionsPackage-tp3064043p3073009.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110617/0ca6f618/attachment.html 


More information about the rules-users mailing list