I should add that
DroolsStreamUtils.streamOut(...)
is not writing anything to a file; it's creating and returning a byte[].
-W
On 17 June 2011 10:35, Wolfgang Laun <wolfgang.laun(a)gmail.com> wrote:
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 justa renaming
subclass of ObjectOutputStream - is not part of the "stable" API.
-W
On 16 June 2011 19:46, lhorton <LHorton(a)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-wh...
> Sent from the Drools: User forum mailing list archive at
Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/rules-users
>