Hi Florian, seems to be a problem of serialization/deserialization. The JCS lateral cache wraps every cache operation into a LateralElementDescriptor which contains the key, the value and the cache event type (put, remove etc.). These descriptor objects are sent to all lateral peers and there they're deserialized. A single field inside a value will never be wrapped into such a descriptor object.
Since your stacktrace only contains the standard Java IO serialization/deserialization stuff it's not possible to determine the reason. Maybe you can send the whole stacktrace (and the JCS version you're using) and check the following things: - are all value classes Serializable (also the referenced sub objects). - are there custom implementations of serialization/deserialization in your classes that could be responsible for the problems. The structure of your stored value could also be of some help since the problem seems to occur deserializing a HashMap. What's inside this HashMap? Cheers Denis -----Ursprüngliche Nachricht----- Von: Florian Hawlitzek [mailto:[EMAIL PROTECTED] Gesendet: Montag, 30. Oktober 2006 16:33 An: JCS Users List Betreff: ClassCastExceptions Hi, I'm getting often ClassCastExceptions when using the LateralCache. I don't know why, but JCS seems to change simple String fields to a thing called LateralElementDescriptor. What can I do? Thanks, Florian. **** Error Mo Okt 30 13:15:47 CET 2006 1162210547045 --- [org.apa che.jcs.auxiliary.lateral.socket.tcp.LateralTCPListener] Unexpected exception. Closing conneciton java.lang.ClassCastException: cannot assign instance of org.apache.jcs.auxiliary.lateral.LateralElementDescriptor to field de.br.aroona.wetterdaten.vo.StationDataContainerVO.stationNameUser of type java.lang.String in instance of de.br.aroona.wetterdaten.vo.StationDataContainerVO **** Error Mo Okt 30 13:15:47 CET 2006 1162210547045 --- at java.io.ObjectStreamClass$FieldReflector.setObjFieldValues(ObjectStreamClass. java:1885) **** Error Mo Okt 30 13:15:47 CET 2006 1162210547045 --- at java.io.ObjectStreamClass.setObjFieldValues(ObjectStreamClass.java:1076) **** Error Mo Okt 30 13:15:47 CET 2006 1162210547045 --- at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1851) **** Error Mo Okt 30 13:15:47 CET 2006 1162210547045 --- at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769) **** Error Mo Okt 30 13:15:47 CET 2006 1162210547045 --- at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) **** Error Mo Okt 30 13:15:47 CET 2006 1162210547045 --- at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274) **** Error Mo Okt 30 13:15:47 CET 2006 1162210547045 --- at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324) **** Error Mo Okt 30 13:15:47 CET 2006 1162210547045 --- at java.util.HashMap.readObject(HashMap.java:1006) **** Error Mo Okt 30 13:15:47 CET 2006 1162210547045 --- at sun.reflect.GeneratedMethodAccessor163.invoke(Unknown Source) **** Error Mo Okt 30 13:15:47 CET 2006 1162210547045 --- at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl. java:25) **** Error Mo Okt 30 13:15:47 CET 2006 1162210547045 --- at java.lang.reflect.Method.invoke(Method.java:324) **** Error Mo Okt 30 13:15:47 CET 2006 1162210547045 --- at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:838) **** Error Mo Okt 30 13:15:47 CET 2006 1162210547045 --- at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1746) **** Error Mo Okt 30 13:15:47 CET 2006 1162210547045 --- at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646) **** Error Mo Okt 30 13:15:47 CET 2006 1162210547045 --- ....stack trace CROPPED after 15 lines. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]