Skip to content
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

Support kotlinx.serialization #137

Open
meloning opened this issue Nov 27, 2022 · 0 comments
Open

Support kotlinx.serialization #137

meloning opened this issue Nov 27, 2022 · 0 comments

Comments

@meloning
Copy link

Hi, Since Spring Framework 5.3 supports Kotlinx.serialization, I am actively using it in my project. (Reference Link)

I tested it by applying Kotlinx.Serialization, but it didn't work.

@Serializable
data class UserDto (
    val id: Long,
    val name: String,
    val roleCode: String
)
"exception" : {
    "name" : "java.lang.IllegalArgumentException",
    "message" : "Non-serializable object",
    "stackTrace" : {
      "at" : [
        "net.rubyeye.xmemcached.transcoders.BaseSerializingTranscoder.serialize(BaseSerializingTranscoder.java:93)",
        "net.rubyeye.xmemcached.transcoders.SerializingTranscoder.encode(SerializingTranscoder.java:199)",
        "net.rubyeye.xmemcached.command.text.TextStoreCommand.encodeValue(TextStoreCommand.java:185)",
        "net.rubyeye.xmemcached.command.text.TextStoreCommand.encode(TextStoreCommand.java:145)",
        "net.rubyeye.xmemcached.impl.MemcachedTCPSession.wrapMessage(MemcachedTCPSession.java:174)",
        "com.google.code.yanf4j.core.impl.AbstractSession.write(AbstractSession.java:370)",
        "net.rubyeye.xmemcached.impl.MemcachedConnector.send(MemcachedConnector.java:504)",
        "net.rubyeye.xmemcached.XMemcachedClient.sendCommand(XMemcachedClient.java:318)",
        "net.rubyeye.xmemcached.XMemcachedClient.sendStoreCommand(XMemcachedClient.java:2343)",
        "net.rubyeye.xmemcached.XMemcachedClient.set(XMemcachedClient.java:1252)",
        "net.rubyeye.xmemcached.XMemcachedClient.set(XMemcachedClient.java:1306)",
        "net.rubyeye.xmemcached.XMemcachedClient.set(XMemcachedClient.java:1295)",
        "io.sixhours.memcached.cache.XMemcachedClient.set(XMemcachedClient.java:61)",
        "io.sixhours.memcached.cache.MemcachedCache.put(MemcachedCache.java:108)",

As a result of debugging, it was confirmed that SerializingTranscoder is the Default Transcoder of the module.

Is there any other way to apply Kotlin serialization? I would be grateful if you could guide me.
Please also check out review of Kotlin serialization support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant