You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "mysterin (via GitHub)" <gi...@apache.org> on 2025/10/09 12:13:28 UTC

[D] dubbo3.2.18 Anti-sequencing turns Timestamp into a LocalDateTime type [dubbo]

GitHub user mysterin created a discussion: dubbo3.2.18 Anti-sequencing turns Timestamp into a LocalDateTime type

### Pre-check

- [X] I am sure that all the content I provide is in English.


### Apache Dubbo Component

Java SDK (apache/dubbo)

### Details

Both the client and server dubbo versions are 3.2.18, and neither shows the configuration serialization protocol
Service interface definition: `public RpcResult<Date> businessMaxAuthTime(Caller caller, UserBusinessAuthRequest request)`
The client call will error: `java.lang.ClassCastException: java.time.LocalDateTime cannot be cast to java.util.Date`

By arthas monitoring call status
Service server returns:
```
@RpcResult[
        code=@RpcCode[
            Success=@RpcCode[RpcCode{code=0, msg='成功'}],
            Error=@RpcCode[RpcCode{code=-1, msg='失败'}],
            code=@Integer[0],
            msg=@String[成功],
            $VALUES=@RpcCode[][isEmpty=false;size=16],
            name=@String[Success],
            ordinal=@Integer[0],
        ],
        msg=@String[成功],
        data=@Timestamp[2021-11-04 13:48:57,000],
    ]
```


The result received by the client:
```
@RpcResult[
        code=@RpcCode[
            Success=@RpcCode[RpcCode{code=0, msg='成功'}],
            Error=@RpcCode[RpcCode{code=-1, msg='失败'}],
            code=@Integer[0],
            msg=@String[成功],
            $VALUES=@RpcCode[][isEmpty=false;size=16],
            name=@String[Success],
            ordinal=@Integer[0],
        ],
        msg=@String[成功],
        data=@LocalDateTime[
            MIN=@LocalDateTime[-999999999-01-01T00:00],
            MAX=@LocalDateTime[+999999999-12-31T23:59:59.999999999],
            serialVersionUID=@Long[6207766400415563566],
            date=@LocalDate[2021-11-04],
            time=@LocalTime[13:48:57],
        ],
    ]
```

As you can see, the data type has changed from Timestamp to LocalDateTime, but if you downgrade the client's dubbo version to 3.0.12, then the return type received by the client is Timestamp, which is normal.

My question is whether dubbo3.2.18 has made any changes to anti-sequencing that caused the type conversion issue?  How can I fix it in version 3.2.18?

### Code of Conduct

- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)


GitHub link: https://github.com/apache/dubbo/discussions/15717

----
This is an automatically sent email for notifications@dubbo.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@dubbo.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [D] dubbo3.2.18 Anti-sequencing turns Timestamp into a LocalDateTime type [dubbo]

Posted by "zrlw (via GitHub)" <gi...@apache.org>.
GitHub user zrlw added a comment to the discussion: dubbo3.2.18 Anti-sequencing turns Timestamp into a LocalDateTime type

check latest dubbo to ensure it's ok, and compare it with dubbo 3.2.18

GitHub link: https://github.com/apache/dubbo/discussions/15717#discussioncomment-14661185

----
This is an automatically sent email for notifications@dubbo.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@dubbo.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org