apache / apache/dubbo-admin

dubboadmin测试工具,是否支持fastjson2

Open
#975 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
4.1k
Forks
2.2k
Avg merge
10d 12h
Merged PRs (30d)
4

Description

- [x] I have searched the [issues](https://github.com/apache/dubbo-admin/issues) of this repository and believe that this is not a duplicate.
- [x] I have checked the [REAMDE](https://github.com/apache/dubbo-admin/blob/develop/README.md) of this repository and believe that this is not a duplicate.

### Environment

* Dubbo Admin version: 0.5.0
* Registry center detail (type and version): zookeeper 3.8.0
* Operating System version: macos 13
* Java version: jdk17

### Steps to reproduce this issue

1. proto方式,fastjson2序列化,无法使用dubboadmin的测试接口功能

Pls. provide [GitHub address] to reproduce this issue.

### Expected Result

What do you expected from the above steps?

### Actual Result

What actually happens?

If there is an exception, please attach the exception trace:
```

curl 'http://10.233.13.238:38080/api/dev/test' \
-H 'Accept: application/json, text/plain, */*' \
-H 'Accept-Language: zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7,ru;q=0.6' \
-H 'Authorization: eyJhbGciOiJIUzUxMiJ9.eyJleHAiOjE2NzY1MTM0NDQsInN1YiI6ImN5bnJheSIsImlhdCI6MTY3NjUwOTg0NH0.WDKMvDJYvzrMUHf6LHovee0psyZ_gdG3Sa0Xcrr-Xc0g6BgsQV680fSmAr7O1Y3Xg1HqsDe1A1ZhgQlV4zgkoQ' \
-H 'Cache-Control: no-cache' \
-H 'Connection: keep-alive' \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'Origin: http://10.233.13.238:38080' \
-H 'Pragma: no-cache' \
-H 'Referer: http://10.233.13.238:38080/' \
-H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36' \
--data-raw '{"service":"com.cynray.micro.user.api.user.UserProvider","method":"add","parameterTypes":["com.cynray.micro.user.api.user.ask.UserAsk"],"params":[{"name":"qwer","remark":"qqq"}]}' \
--compressed \
--insecure

```

```
{"success":false,"message":"System Error, please try again later! Message:Failed to invoke the method add in the service org.apache.dubbo.rpc.service.GenericService. Tried 3 times of the providers [192.168.5.6:20881] (1/1) from the registry 10.233.9.186:2181 on the consumer 10.233.123.98 using the dubbo version 3.0.8. Last error is: Failed to invoke remote method: $invoke, provider: dubbo://192.168.5.6:20881/com.cynray.micro.user.api.user.UserProvider?anyhost=true&application=cynray-micro-user&background=false&category=providers,configurators,routers&check=false&deprecated=false&dubbo=2.0.2&dynamic=true&executor-management-mode=default&file.cache=true&generic=false&interface=com.cynray.micro.user.api.user.UserProvider&logger=slf4j&methods=add,add,addAsync&pid=7&prefer.serialization=fastjson2&release=3.2.0-beta.4&serialization=fastjson2&service-name-mapping=true&side=provider&sticky=false, cause: org.apache.dubbo.remoting.RemotingException: io.netty.handler.codec.EncoderException: java.lang.IllegalStateException: No such extension org.apache.dubbo.common.serialize.Serialization by name fastjson2, no related exception was found, please check whether related SPI module is missing.\nio.netty.handler.codec.EncoderException: java.lang.IllegalStateException: No such extension org.apache.dubbo.common.serialize.Serialization by name fastjson2, no related exception was found, please check whether related SPI module is missing.\n\tat io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:125)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:709)\n\tat io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:792)\n\tat io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:702)\n\tat io.netty.handler.timeout.IdleStateHandler.write(IdleStateHandler.java:304)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:709)\n\tat io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:792)\n\tat io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:702)\n\tat io.netty.channel.ChannelDuplexHandler.write(ChannelDuplexHandler.java:115)\n\tat org.apache.dubbo.remoting.transport.netty4.NettyClientHandler.write(NettyClientHandler.java:88)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:764)\n\tat io.netty.channel.AbstractChannelHandlerContext$WriteTask.run(AbstractChannelHandlerContext.java:1071)\n\tat io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)\n\tat io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)\n\tat io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500)\n\tat io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)\n\tat io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)\n\tat io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)\n\tat java.lang.Thread.run(Thread.java:750)\nCaused by: java.lang.IllegalStateException: No such extension org.apache.dubbo.common.serialize.Serialization by name fastjson2, no related exception was found, please check whether related SPI module is missing.\n\tat org.apache.dubbo.common.extension.ExtensionLoader.findException(ExtensionLoader.java:723)\n\tat org.apache.dubbo.common.extension.ExtensionLoader.createExtension(ExtensionLoader.java:730)\n\tat org.apache.dubbo.common.extension.ExtensionLoader.getExtension(ExtensionLoader.java:524)\n\tat org.apache.dubbo.common.extension.ExtensionLoader.getExtension(ExtensionLoader.java:498)\n\tat org.apache.dubbo.rpc.protocol.dubbo.DubboCodecSupport.getRequestSerialization(DubboCodecSupport.java:36)\n\tat org.apache.dubbo.rpc.protocol.dubbo.DubboCodec.getSerialization(DubboCodec.java:244)\n\tat org.apache.dubbo.remoting.exchange.codec.ExchangeCodec.encodeRequest(ExchangeCodec.java:225)\n\tat org.apache.dubbo.remoting.exchange.codec.ExchangeCodec.encode(ExchangeCodec.java:71)\n\tat org.apache.dubbo.rpc.protocol.dubbo.DubboCountCodec.encode(DubboCountCodec.java:47)\n\tat org.apache.dubbo.remoting.transport.netty4.NettyCodecAdapter$InternalEncoder.encode(NettyCodecAdapter.java:69)\n\tat io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107)\n\t... 21 more\n"}
```

Contributor guide

Open the contributing guide

Research direction

Start with the /api/dev/test request and the GenericService invocation shown in the error, then trace how the fastjson2 serialization setting is selected. Reproduce the proto request with Dubbo Admin 0.5.0 and verify the result against a provider using fastjson2; done means the test interface invokes the method without the missing-serialization-extension error.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.