This is a serialization versioning problem. It means that the class definition
in your VM is different from the class definition being pulled from the
bytestream.
Without knowing more about your code, I can't really speculate as to how this is
happening. It may also be a problem in ND code.
-- David.
(Embedded
image moved [EMAIL PROTECTED]
to file: 05/18/99 06:31 PM
pic18954.pcx)
To: [EMAIL PROTECTED]
cc: [EMAIL PROTECTED] (bcc: David P Caldwell/GL/KSC/KeyCorp)
Subject: [ND] Problem with reflection & dynamic object creation
Hello NetDyners,
I am trying to use the java.lang.reflection to dynamically instance
a class object based on a variable, contains the name of the class.
as shown. The strClassName can be anything, spider.session.CSpString,
spider.session.CSpInteger, etc.
cspSltTest -is a dataObject.
strClassName - "spider.session.CSpString"
Class cls = Class.forName(strClassType);
Object o1 = cls.newInstance();
o1 = cspSltTest.getValue(iRowIndex, COLUMN_NAME);
& try using it like say,
cspH1.put(strKey, (CSpValue) o1)
where cspH1 is a CSpHashTable.
This throws the following error.( shown at the end)
The error message says: Local class not compatible
Any help or suggestions will be greatly appreciated.
Thanks,
Raj
CSpFileBased.deserializeObject: Unexpected Exception
(java.io.InvalidClassException: DIAMONDWEB.NDDiamondPage; Local class not
compatible: stream classdesc serialVersionUID=-8717881427890931675 local
class serialVersionUID=-2504985847882855499) caught. Top of
stack: |java.io.InvalidClassException: DIAMONDWEB.NDDiamondPage;
Local class not compatible: stream classdesc
serialVersionUID=-8717881427890931675 local class
serialVersionUID=-2504985847882855499 at java.lang.Throwable.<init>(Compiled
Code) at
java.lang.Exception.<init>(Compiled Code) at
java.io.IOException.<init>(IOException.java:45) at
java.io.ObjectStreamException.<init>(ObjectStreamException.java:30) at
java.io.InvalidClassException.<init>(InvalidClassException.java:49) at
java.io.ObjectStreamClass.setClass(Compiled Code) at
java.io.ObjectInputStream.inputClassDescriptor(Compiled Code) at
java.io.ObjectInputStream.readObject(Compiled Code) at
java.io.ObjectInputStream.readObject(Compiled Code) at
java.io.ObjectInputStream.inputClassDescriptor(Compiled Code) at
java.io.ObjectInputStream.readObject(Compiled Code) at
java.io.ObjectInputStream.readObject(Compiled Code) at
java.io.ObjectInputStream.inputObject(Compiled Code) at
java.io.ObjectInputStream.readObject(Compiled Code) at
java.io.ObjectInputStream.readObject(Compiled Code) at
spider.CSpFileBased.deserializeObject(Compiled Code) at
spider.CSpProject.deserializeAndInitAnObject(Compiled Code) at
spider.CSpProject.getCommonPage(Compiled Code) at
spider.CSpider.getCommonPage(Compiled Code) at
spider.CSpider.getCommonPage(Compiled Code) at
spider.util.CSpCommonPageRef.resolveObjectReference(Compiled Code) at
spider.CSpFileBased.resolveObjectRef(Compiled Code) at
spider.visual.CSpHtmlFrame.afterInit(Compiled Code) at
spider.CSpFileBased.afterInitList(Compiled Code) at
spider.visual.CSpVisual.afterInit(Compiled Code) at
spider.visual.CSpCommonPage.afterInit(Compiled Code) at
spider.visual.CSpCommonHtmlPage.afterInit(Compiled Code) at
s
_________________________________________________________________________
For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
For dire need help, email: [EMAIL PROTECTED]
pic18954.pcx