debop / hibernate-redis

hibernate 2nd level cache privder using redis
Apache License 2.0
357 stars 184 forks source link

enum Serialization error #78

Open xiamaohan opened 7 years ago

xiamaohan commented 7 years ago

'InpourStatus' is enum

but load cache is error

2016-10-26 11:29:02,312 ERROR --- [o.h.p.access.spi.SetterMethodImpl :97] - HHH000123: IllegalArgumentException in class: io.jee.caisan.member.domain.BalanceCaidouInpour, setter method of property: status

2016-10-26 11:29:02,312 ERROR --- [o.h.p.access.spi.SetterMethodImpl :98] - HHH000091: Expected type: io.jee.caisan.member.domain.extra.InpourStatus, actual value: io.jee.caisan.member.domain.extra.InpourStatus

2016-10-26 11:29:02,313 INFO --- [o.h.e.internal.DefaultLoadEventListener :129] - HHH000327: Error performing load command : IllegalArgumentException occurred while calling setter for property [io.jee.caisan.member.domain.BalanceCaidouInpour.status (expected type = io.jee.caisan.member.domain.extra.InpourStatus)]; target = [io.jee.caisan.member.domain.BalanceCaidouInpour@72e98ebe], property value = [TRADE_CLOSE]

debop commented 7 years ago

Show your entity which defined 'InpourStatus' and view hibernate-example for enum type property.

other methods is don't use FST, use plain binary serializer

johnou commented 7 years ago

BalanceCaidouInpour dto would be interesting too as that throws an exception.

vijaykamal commented 7 years ago

facing the same issue. any updates on this?