HelloToGithub commented on issue #11703:
URL: https://github.com/apache/dubbo/issues/11703#issuecomment-1454332143
1 客户端服务端Dubbo版本都是 3.1.7
2 去掉 appRespons.setException这句话就没有问题 就算Filter不去掉 把Filter去掉也不会有问题
尝试过直接appRespons.setException 一个new
Exception 也会出现反馈错误
3 ServiceException包装的对象是获取到的异常Throw
---- 回复的原邮件 ----
| 发件人 | Albumen ***@***.***> |
| 日期 | 2023年03月04日 09:47 |
| 收件人 | ***@***.***> |
| 抄送至 | ***@***.***>***@***.***> |
| 主题 | Re: [apache/dubbo] com.alibaba.fastjson2.JSONException: fieldName not
support input type TYPED_ANY -110, offset 51 (Issue #11703) |
@HelloToGithub 麻烦确认下几个事情:
客户端 JDK 版本,服务端 JDK 版本
是套了 ServiceException 之后才有问题还是本身就有问题,如果把这个自定义 Filter 去掉是否可以正常工作
在出现异常的时候 ServiceException 里面包的是什么对象
可以尝试通过以下代码看能不能本地复现
JSONB.parseObject(JSONB.toBytes(newServiceException(t),
JSONWriter.Feature.WriteClassName,
JSONWriter.Feature.FieldBased,
JSONWriter.Feature.ErrorOnNoneSerializable,
JSONWriter.Feature.ReferenceDetection,
JSONWriter.Feature.WriteNulls,
JSONWriter.Feature.NotWriteDefaultValue,
JSONWriter.Feature.NotWriteHashMapArrayListClassName,
JSONWriter.Feature.WriteNameAsSymbol), Object.class,
JSONReader.Feature.SupportAutoType,
JSONReader.Feature.UseDefaultConstructorAsPossible,
JSONReader.Feature.ErrorOnNoneSerializable,
JSONReader.Feature.UseNativeObject,
JSONReader.Feature.FieldBased);
直接通过 ServiceException 序列化我这边没有遇到问题
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]