-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ClassNotFoundException: byte[] for serialized valued. #176
Comments
I am not sure I understand your issue. Can you implement a test to reproduce it? I sounds like deserialization does not support type
Why? Akka provides a mechanism for custom serialization, why don't you use it? |
Thanks for reply. We have custom Kryo serialization that work fine. I found akka kryo serialization that implement Kryo for akka but this plugin has bug for multi threading. So we have 2 option: 1- implement custom Kryo serialization for akka. 2- used old custom Kryo serialization with above scenario. |
What about this issue? Can you confirm the cause? I am not sure I understand it correctly. And regarding Kryo, you can use explicit strategy instead of incremental. It works nice, I use it in tens of projects. |
I write simple module in play that run this code :
and got this error :
The"classTag::bytes" for bytes key is byte[]. |
Well, the workaround is quire simple, since you already handle (de)serialization yourself. Just produce a string instead of byte[] as Redis does not support bytes if I'm not wrong. So basically, the fix will serialize bytes probably into base64 or similar and you can do it yourself directly. I believe byte[] is not good data type for caching in redis. I agree that it is a bug but raised from discouraged use. |
Hi. I have some problem with play-redis and I think this is a bug.
This Plugin is work fine if we didn't use custom serialization.
This is our scenario. The value serialized before set and deserialized after get.
The value after serialization is byte[] and the ClassTag stored in Redis is byte[].
When we called get we got this exception:
If the byte[] is incorrect type for value, this method should be fix :
Maybe if you define another set method that get class type our problem resolved!
Version of play-redis = 2.1.2
Version of Scala = 2.12.6
Version of Play = 2.6.15
The text was updated successfully, but these errors were encountered: