You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/12/25 04:56:22 UTC
[GitHub] [dubbo-go-hessian2] xfstart07 opened a new issue #301: Java ReferenceConfig方式调用 dubbogo 方法,负责的结构体解析不了
xfstart07 opened a new issue #301:
URL: https://github.com/apache/dubbo-go-hessian2/issues/301
**What happened**:
DubboCodec.decodeRequest 方法中打印 requestBody
requestBody类似 NNNNNNNNNNNNNNNNNNNNNNNNNNNNTNN123456NNNNNasdfghH , 有些字段是 N ,解析的时候不报错,但是有些传了的字段不会读取出来值
Java 数据类如下

**What you expected to happen**:
期望解析出来传入有数据的字段
**How to reproduce it (as minimally and precisely as possible)**:
**Anything else we need to know?**:
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go-hessian2] xfstart07 commented on issue #301: Java ReferenceConfig方式调用 dubbogo 方法,负责的结构体解析不了
Posted by GitBox <gi...@apache.org>.
xfstart07 commented on issue #301:
URL: https://github.com/apache/dubbo-go-hessian2/issues/301#issuecomment-1001114725
查出的问题记录:
1. https://github.com/apache/dubbo-go-hessian2/blob/master/object.go#L472
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go-hessian2] xfstart07 commented on issue #301: Java ReferenceConfig方式调用 dubbogo 方法,负责的结构体解析不了
Posted by GitBox <gi...@apache.org>.
xfstart07 commented on issue #301:
URL: https://github.com/apache/dubbo-go-hessian2/issues/301#issuecomment-1001828472
>
1.但我看实际传过来的数据Boolean类型的值是 T, 源码 `case tag == BC_TRUE: // 'T': //true` 就有处理
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go-hessian2] xfstart07 closed issue #301: Java ReferenceConfig方式调用 dubbogo 方法,负责的结构体解析不了
Posted by GitBox <gi...@apache.org>.
xfstart07 closed issue #301:
URL: https://github.com/apache/dubbo-go-hessian2/issues/301
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go-hessian2] wongoo commented on issue #301: Java ReferenceConfig方式调用 dubbogo 方法,负责的结构体解析不了
Posted by GitBox <gi...@apache.org>.
wongoo commented on issue #301:
URL: https://github.com/apache/dubbo-go-hessian2/issues/301#issuecomment-1001829988
> 构造了一个 https://github.com/xfstart07/dubbo-go-hessian2/blob/fix/javaclass/test_hessian/src/test/java/unit/GoStringTest.java
@xfstart07 There is only classes definition,I don't find the unit test.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go-hessian2] xfstart07 edited a comment on issue #301: Java ReferenceConfig方式调用 dubbogo 方法,负责的结构体解析不了
Posted by GitBox <gi...@apache.org>.
xfstart07 edited a comment on issue #301:
URL: https://github.com/apache/dubbo-go-hessian2/issues/301#issuecomment-1001114725
查出的问题记录:
1. https://github.com/apache/dubbo-go-hessian2/blob/master/object.go#L472
断言 bool 值是返回的 err = nil, 导致无法报出实际的错误
2.如果 Go 的结构体定义中存在小写开头字段,会导致解析出错,原本应该读取的数据没有读取,这样数据就错乱了
https://github.com/apache/dubbo-go-hessian2/blob/master/object.go#L397
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go-hessian2] AlexStocks commented on issue #301: Java ReferenceConfig方式调用 dubbogo 方法,负责的结构体解析不了
Posted by GitBox <gi...@apache.org>.
AlexStocks commented on issue #301:
URL: https://github.com/apache/dubbo-go-hessian2/issues/301#issuecomment-1001006725
@xfstart07 还请你把原始的 java 和 go 代码贴进来
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go-hessian2] wongoo commented on issue #301: Java ReferenceConfig方式调用 dubbogo 方法,负责的结构体解析不了
Posted by GitBox <gi...@apache.org>.
wongoo commented on issue #301:
URL: https://github.com/apache/dubbo-go-hessian2/issues/301#issuecomment-1001024822
@xfstart07 can u try to simulate the issue problem following the example below:
- https://github.com/apache/dubbo-go-hessian2/blob/f989170905c309700aba409389fefcd8f02849b3/test_hessian/src/test/java/unit/GoStringTest.java?_pjax=%23js-repo-pjax-container%2C%20div%5Bitemtype%3D%22http%3A%2F%2Fschema.org%2FSoftwareSourceCode%22%5D%20main%2C%20%5Bdata-pjax-container%5D#L32
- https://github.com/apache/dubbo-go-hessian2/blob/f989170905c309700aba409389fefcd8f02849b3/output/testfuncs/string.go?_pjax=%23js-repo-pjax-container%2C%20div%5Bitemtype%3D%22http%3A%2F%2Fschema.org%2FSoftwareSourceCode%22%5D%20main%2C%20%5Bdata-pjax-container%5D#L24
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go-hessian2] xfstart07 commented on issue #301: Java ReferenceConfig方式调用 dubbogo 方法,负责的结构体解析不了
Posted by GitBox <gi...@apache.org>.
xfstart07 commented on issue #301:
URL: https://github.com/apache/dubbo-go-hessian2/issues/301#issuecomment-1001289034
>
1. 没明白 boolean 不支持是什么意思? 那 object.go#L472 支持的啥?
2. 第二个问题准确的说是序列化读取数据时强依赖于 go struct 的定义,如果定义少了某个字段,数据读取就错乱了,我感觉是不合理的,不过我对 hessian 协议不是很理解,hessian 是有这个规定的吗?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go-hessian2] sanxun0325 commented on issue #301: Java ReferenceConfig方式调用 dubbogo 方法,负责的结构体解析不了
Posted by GitBox <gi...@apache.org>.
sanxun0325 commented on issue #301:
URL: https://github.com/apache/dubbo-go-hessian2/issues/301#issuecomment-1001299375
>
1:boolean 和 java.lang.Boolean 是不一样的,你使用的是Boolean在java那边定义,在go这边hessian2 暂时还不支持编解码,你可以改为boolean
2:dubbo-go-hessian2 因为是按照字节顺序读取的,不支持skip. 建议使用的时候 序列化/反序列化的结构体是对应的。
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go-hessian2] xfstart07 commented on issue #301: Java ReferenceConfig方式调用 dubbogo 方法,负责的结构体解析不了
Posted by GitBox <gi...@apache.org>.
xfstart07 commented on issue #301:
URL: https://github.com/apache/dubbo-go-hessian2/issues/301#issuecomment-1001114278
> @xfstart07 can u try to simulate the issue problem following the example below:
>
> * https://github.com/apache/dubbo-go-hessian2/blob/f989170905c309700aba409389fefcd8f02849b3/test_hessian/src/test/java/unit/GoStringTest.java?_pjax=%23js-repo-pjax-container%2C%20div%5Bitemtype%3D%22http%3A%2F%2Fschema.org%2FSoftwareSourceCode%22%5D%20main%2C%20%5Bdata-pjax-container%5D#L32
> * https://github.com/apache/dubbo-go-hessian2/blob/f989170905c309700aba409389fefcd8f02849b3/output/testfuncs/string.go?_pjax=%23js-repo-pjax-container%2C%20div%5Bitemtype%3D%22http%3A%2F%2Fschema.org%2FSoftwareSourceCode%22%5D%20main%2C%20%5Bdata-pjax-container%5D#L24
构造了一个 https://github.com/xfstart07/dubbo-go-hessian2/blob/fix/javaclass/test_hessian/src/test/java/unit/GoStringTest.java
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo-go-hessian2] sanxun0325 commented on issue #301: Java ReferenceConfig方式调用 dubbogo 方法,负责的结构体解析不了
Posted by GitBox <gi...@apache.org>.
sanxun0325 commented on issue #301:
URL: https://github.com/apache/dubbo-go-hessian2/issues/301#issuecomment-1001187621
> 查出的问题记录:
>
> 1. https://github.com/apache/dubbo-go-hessian2/blob/master/object.go#L472
> 断言 bool 值是返回的 err = nil, 导致无法报出实际的错误
>
> 2.如果 Go 的结构体定义中存在小写开头字段,会导致解析出错,原本应该读取的数据没有读取,这样数据就错乱了 https://github.com/apache/dubbo-go-hessian2/blob/master/object.go#L397
1: bool 在java 这边定义为boolean, 使用Boolean 现在还不支持.
2:go结构体字段不要定义为小写,定义为小写无法编解码.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org