Hi Alex,

The exception is an automatic "feature" of Java serialization (which
is used to implement bload/bsave.) Basically, it's telling you that
the serialized data in the .bin file was generated from a set of
classes that don't match the currently available .class files. This is
usually what you want -- i.e., when a class changes, the number and
type of data members often change, too, so old serialized data can't
be used to reconstruct a new object.

Now, sometimes classes change and the data members don't, and then
you'd like to be able to use old data with new classes. Java lets you
do this by including a version ID in each class. As long as the
version ID doesn't change, the data is assumed to be compatible, even
if the code changes.

During the long Jess 5.x pre-release development cycle, when whole
classes are being added and removed with each release, it would make
no sense to try to use the versioning mechanism to make old data
reusable -- far too much work for me. But when 5.x finally settles
down (and that time is now iminent!) it will more become important for
bsave images to be compatible with further releases. At this point I
will indeed add the versioning info, and Jess 5.0 (final) bsaves
should remain upwards compatible through any patch releases, hopefully
until a version 6.0 arrives. If I ever have to break this contract, I
will have to make an announcement to this effect. But for now, expect
bsave images to break with each release until 5.0 final comes out.


I think [EMAIL PROTECTED] wrote:
> 
>      I just "recompile" my .bin file (result of "bsave") using Jess50b2 and 
>      everything works fine. The reported problem was a result of "bload"ing 
>      what was "bsave"ed with previous version.
>      
>      Is it a problem of the version compatibility? It may create problems 
>      for users with precompiled ruleset (result of "bsave") when they 
>      upgrade. Any suggestion how to avoid this in the future?
>      
>      Alex
> 
> 
> ______________________________ Reply Separator _________________________________
> Subject: JESS: Migrating bload to jess50b2
> Author:  alex-bagerman-at-non ([EMAIL PROTECTED]) at HP-PaloAlto,mimegw9
> Date:    11/9/99 12:14 PM
> 
> 
>      Hi,
>      
>      I'm trying to rebuild my app with just downloaded jess50b2. Before I 
>      had my application built with JDK 1.1.8. At once I decided to try 50b2 
>      and JDK 1.2.2. 
>      
>      Here is an exception I got from application that used to run 
>      bload/bsave without any trouble :
>      
>      java.io.InvalidClassException: jess.Rete; Local class not compatible: 
>      stream classdesc serialVersionUID=479072369051011645 local class 
>      serialVersionUID=-1625347106253991454
>              at 
>      java.io.ObjectStreamClass.validateLocalClass(ObjectStreamClass.java:43 
>      8)
>              at 
>      java.io.ObjectStreamClass.setClass(ObjectStreamClass.java:482)
>              at 
>      java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java: 
>      785)
>              at 
>      java.io.ObjectInputStream.readObject(ObjectInputStream.java:353)
>              at 
>      java.io.ObjectInputStream.readObject(ObjectInputStream.java:232)
>              at 
>      java.io.ObjectInputStream.inputObject(ObjectInputStream.java:978)
>              at 
>      java.io.ObjectInputStream.readObject(ObjectInputStream.java:369)
>              at 
>      java.io.ObjectInputStream.readObject(ObjectInputStream.java:232)
>              at jess.Dumper.call(DumpFunctions.java:85)
>              at jess.FunctionHolder.call(FunctionHolder.java:37) 
>              at jess.Funcall.execute(Funcall.java:240)
>              at jess.Jesp.parseAndExecuteFuncall(Jesp.java:1604) 
>              at jess.Jesp.parseSexp(Jesp.java:185)
>              at jess.Jesp.parse(Jesp.java, Compiled Code) 
>              at jess.Rete.executeCommand(Rete.java:1522) 
>              at MyClass.init(TestApp.java:99)
>              at TestApp.main(TestApp.java, Compiled Code)
>      MyClass.init() - Jess reported an error in routine bload while 
>      executing (bload c:/temp/test.bin).
>        Message: IO Exception.
>        Program text: ( bload c:/temp/test.bin )  at line 0.
>      
>      
>      Any idea what is going on?
>      
>      Thanks,
>      
>      Alex
>      
> --------------------------------------------------------------------- 
> To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]' 
> in the BODY of a message to [EMAIL PROTECTED], NOT to the
> list (use your own address!) List problems? Notify [EMAIL PROTECTED] 
> ---------------------------------------------------------------------
> 
> ---------------------------------------------------------------------
> To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
> in the BODY of a message to [EMAIL PROTECTED], NOT to the
> list (use your own address!) List problems? Notify [EMAIL PROTECTED]
> ---------------------------------------------------------------------
> 
> 


---------------------------------------------------------
Ernest Friedman-Hill  
Distributed Systems Research        Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
Org. 8920, MS 9012                  [EMAIL PROTECTED]
PO Box 969                  http://herzberg.ca.sandia.gov
Livermore, CA 94550

---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list (use your own address!) List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------

Reply via email to