[rules-users] KnowledgeAgent exception while trying to deserialize KnowledgeDefinitionsPackage
Wolfgang Laun
wolfgang.laun at gmail.com
Fri Jun 17 10:57:54 EDT 2011
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 at 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 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/1ca8c906/attachment.html
More information about the rules-users
mailing list