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

[I] [Bug] After starting dubbo.protocol.triple.servlet.enabled=true, use http://127.0.0.1:9898/com.xxx.yyy.api.demo.NoGenericResource/queryPrice3 to request RestParameterException: Missing argument 'reqArgs' for method parameter of type [class xxx] exception [dubbo]

poazy opened a new issue, #15367:
URL: https://github.com/apache/dubbo/issues/15367

   ### Pre-check
   
   - [x] I am sure that all the content I provide is in English.
   
   
   ### Search before asking
   
   - [x] I had searched in the [issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### Apache Dubbo Component
   
   Java SDK (apache/dubbo)
   
   ### Dubbo Version
   
   Dubbo Java 3.3.4, JDK 17, MacOS 15.4.1
   
   ### Steps to reproduce this issue
   
   2025-05-09T17:12:22.750+08:00  INFO 85971 --- [yyy-servicer-demo] [3:9898-thread-8] o.a.d.r.p.t.h.CompositeExceptionHandler  :  [DUBBO] Http request process error: status=400, dubbo version: 3.3.4, current host: 192.168.9.133
   
   org.apache.dubbo.rpc.protocol.tri.rest.RestParameterException: Missing argument 'reqArgs' for method parameter of type [class com.xxx.yyy.api.demo.entity.nogeneric.DsRequest]
   	at org.apache.dubbo.rpc.protocol.tri.rest.argument.NamedValueArgumentResolverSupport.resolve(NamedValueArgumentResolverSupport.java:54) ~[dubbo-3.3.4.jar:3.3.4]
   	at org.apache.dubbo.rpc.protocol.tri.rest.argument.AbstractAnnotationBaseArgumentResolver.resolve(AbstractAnnotationBaseArgumentResolver.java:36) ~[dubbo-3.3.4.jar:3.3.4]
   	at org.apache.dubbo.rpc.protocol.tri.rest.argument.CompositeArgumentResolver.resolve(CompositeArgumentResolver.java:69) ~[dubbo-3.3.4.jar:3.3.4]
   	at org.apache.dubbo.rpc.protocol.tri.rest.RestHttpMessageCodec.decode(RestHttpMessageCodec.java:87) ~[dubbo-3.3.4.jar:3.3.4]
   	at org.apache.dubbo.remoting.http12.message.HttpMessageDecoder.decode(HttpMessageDecoder.java:56) ~[dubbo-3.3.4.jar:3.3.4]
   	at org.apache.dubbo.remoting.http12.message.DefaultListeningDecoder.decode(DefaultListeningDecoder.java:41) ~[dubbo-3.3.4.jar:3.3.4]
   	at org.apache.dubbo.rpc.protocol.tri.h12.DefaultHttpMessageListener.onMessage(DefaultHttpMessageListener.java:39) ~[dubbo-3.3.4.jar:3.3.4]
   	at org.apache.dubbo.rpc.protocol.tri.h12.AbstractServerTransportListener.doOnData(AbstractServerTransportListener.java:183) ~[dubbo-3.3.4.jar:3.3.4]
   	at org.apache.dubbo.rpc.protocol.tri.h12.AbstractServerTransportListener.lambda$onData$1(AbstractServerTransportListener.java:168) ~[dubbo-3.3.4.jar:3.3.4]
   	at org.apache.dubbo.common.threadpool.serial.SerializingExecutor.run(SerializingExecutor.java:111) ~[dubbo-3.3.4.jar:3.3.4]
   	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[na:na]
   	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[na:na]
   	at org.apache.dubbo.common.threadlocal.InternalRunnable.run(InternalRunnable.java:39) ~[dubbo-3.3.4.jar:3.3.4]
   	at java.base/java.lang.Thread.run(Thread.java:840) ~[na:na]
   
   # dubbo config
   dubbo:
     application:
       name: ${spring.application.name}-dubbo
       logger: slf4j
       serialize-check-status: DISABLE
       check-serializable: false
       qos-enable: false
       qos-port: -1
     protocol:
       host: ~
       triple:
         verbose: true
         servlet:
           enabled: true
     protocols:
       tri:
         name: tri
         port: ${server.port}
       dubbo:
         name: dubbo
         port: -1
     provider:
       retries: 0
       timeout: 50000
     consumer:
       check: false
       timeout: 50000
     registry:
       address: nacos://192.168.0.95:8848?namingPushEmptyProtection=true&namingLoadCacheAtStart=false
     metadata-report:
       address: nacos://192.168.0.95:8848?namingPushEmptyProtection=true&namingLoadCacheAtStart=false
     config-center:
       address: nacos://192.168.0.95:8848?namingPushEmptyProtection=true&namingLoadCacheAtStart=false
     scan:
       base-packages: com.dsmm.yyy.servicer.demo
   
   
   /**
    * @author xxx
    * @date 2020/2/27
    */
   public interface NoGenericResource {
       NoGenericRs queryPrice(NoGenericRq reqArgs);
       DsResponse<DemoData> queryPrice2(DsRequest<DemoData> reqArgs);
       DsResponse<Long> queryPrice3(DsRequest<Long> reqArgs);
   }
   
   
   /**
    * @author xxx
    * @date 2020/2/27
    */
   @Slf4j
   @DubboService
   public class NoGenericResourceImpl implements NoGenericResource {
   
       @Override
       public NoGenericRs queryPrice(NoGenericRq reqArgs) {
           return null;
       }
   
       @Override
       public DsResponse<DemoData> queryPrice2(DsRequest<DemoData> reqArgs) {
           return null;
       }
   
       @Override
       public DsResponse<Long> queryPrice3(DsRequest<Long> reqArgs) {
           String reqStr = JSONObject.toJSONString(reqArgs);
           System.out.println("rq:" + reqStr);
           DsResponse<Long> rs = new DsResponse<>();
           rs.setData(reqArgs.getData());
           rs.setCode(200);
           rs.setMsg("OK");
           return rs;
       }
   
   }
   
   
   ### idea http
   POST http://127.0.0.1:9898/com.xxx.yyy.api.demo.NoGenericResource/queryPrice3
   Content-Type: application/json
   
   { "data": 123456 }
   
   
   ### What you expected to happen
   
   When you start dubbo.protocol.triple.servlet.enabled=true and use a http://127.0.0.1:9898/com.xxx.yyy.api.demo.NoGenericResource/queryPrice3 request, you may get an org.apache.dubbo.rpc.protocol.tri.rest.RestParameterException: Missing argument 'reqArgs' for method parameter of type [class com.xxx.yyy.api.demo.entity.nogeneric.DsRequest] exception. For example, out of 10 requests, 4 will have this exception and 6 will be successful.
    seems to have an empty inputStream for body, but I don't know why. Please help me look at it.  Thank you!
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request to fix on your own?
   
   - [ ] Yes I am willing to submit a pull request on my own!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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.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


Re: [I] [Bug] After starting dubbo.protocol.triple.servlet.enabled=true, use http://127.0.0.1:9898/com.xxx.yyy.api.demo.NoGenericResource/queryPrice3 to request RestParameterException: Missing argument 'reqArgs' for method parameter of type [class xxx] exception [dubbo]

Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ commented on issue #15367:
URL: https://github.com/apache/dubbo/issues/15367#issuecomment-2870541041

   @oxsean PTAL


-- 
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


Re: [I] [Bug] After starting dubbo.protocol.triple.servlet.enabled=true, use http://127.0.0.1:9898/com.xxx.yyy.api.demo.NoGenericResource/queryPrice3 to request RestParameterException: Missing argument 'reqArgs' for method parameter of type [class xxx] exception [dubbo]

Posted by "poazy (via GitHub)" <gi...@apache.org>.
poazy commented on issue #15367:
URL: https://github.com/apache/dubbo/issues/15367#issuecomment-3101480566

   Has this problem been solved?  Thank you!


-- 
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


Re: [I] [Bug] After starting dubbo.protocol.triple.servlet.enabled=true, use http://127.0.0.1:9898/com.xxx.yyy.api.demo.NoGenericResource/queryPrice3 to request RestParameterException: Missing argument 'reqArgs' for method parameter of type [class xxx] exception [dubbo]

Posted by "heliang666s (via GitHub)" <gi...@apache.org>.
heliang666s commented on issue #15367:
URL: https://github.com/apache/dubbo/issues/15367#issuecomment-2872145775

   Hi @poazy , to help us further diagnose the missing parameter issue, could you please confirm the following:
   1. Does your project have any custom Filters, Interceptors, or AOP logic that might read the HttpServletRequest body in advance (e.g., by calling getInputStream() or getReader())?
   2. Have you introduced any third-party dependencies such as Spring Security, Actuator, or monitoring/trace libraries, which may automatically register global filters and read the request body?
   3. If you have any relevant custom Filter/AOP code, could you please provide a code snippet or a brief description of its main functionality?
   This information will help us determine whether the request body is consumed before Dubbo tries to parse it, which could cause the parameter missing exception. Thank you for your cooperation!


-- 
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


Re: [I] [Bug] After starting dubbo.protocol.triple.servlet.enabled=true, use http://127.0.0.1:9898/com.xxx.yyy.api.demo.NoGenericResource/queryPrice3 to request RestParameterException: Missing argument 'reqArgs' for method parameter of type [class xxx] exception [dubbo]

Posted by "poazy (via GitHub)" <gi...@apache.org>.
poazy commented on issue #15367:
URL: https://github.com/apache/dubbo/issues/15367#issuecomment-2874647904

   When adding the @RequestBody annotation to the method parameter, an error occurs:
   {"message": "Missing argument 'reqArgs' for method parameter of type [class com.xxx.yyy.api.demo.entity.nogeneric.DsRequest]", "status": "400"}.
   
   However, if the @RequestBody annotation is not added, no error occurs, but the method cannot receive the request body parameters.
   
   Thanks!


-- 
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


Re: [I] [Bug] After starting dubbo.protocol.triple.servlet.enabled=true, use http://127.0.0.1:9898/com.xxx.yyy.api.demo.NoGenericResource/queryPrice3 to request RestParameterException: Missing argument 'reqArgs' for method parameter of type [class xxx] exception [dubbo]

Posted by "poazy (via GitHub)" <gi...@apache.org>.
poazy closed issue #15367: [Bug] After starting dubbo.protocol.triple.servlet.enabled=true, use http://127.0.0.1:9898/com.xxx.yyy.api.demo.NoGenericResource/queryPrice3 to request RestParameterException: Missing argument 'reqArgs' for method parameter of type [class xxx] exception
URL: https://github.com/apache/dubbo/issues/15367


-- 
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


Re: [I] [Bug] After starting dubbo.protocol.triple.servlet.enabled=true, use http://127.0.0.1:9898/com.xxx.yyy.api.demo.NoGenericResource/queryPrice3 to request RestParameterException: Missing argument 'reqArgs' for method parameter of type [class xxx] exception [dubbo]

Posted by "poazy (via GitHub)" <gi...@apache.org>.
poazy commented on issue #15367:
URL: https://github.com/apache/dubbo/issues/15367#issuecomment-2872996196

   Hi @heliang666s 
   
   1.No, my project does not have any custom Filters, Interceptors, or AOP logic that reads the HttpServletRequest body in advance (e.g., by calling getInputStream() or getReader()).
   2.In my project, spring-cloud-starter-alibaba-nacos-discovery:2023.0.3.2 includes spring-security-crypto and spring-cloud-starter.
   In the project, spring-cloud-starter-stream-rocketmq:2023.0.3.2 includes opentelemetry-sdk-trace.
   The project also includes spring-boot-starter-actuator.
   Do these count? There are no other dependencies introduced.
   3.No, I do not have any custom Filter, Interceptor, or AOP code in the project that processes or reads the HttpServletRequest body.
   
   Thanks!


-- 
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


Re: [I] [Bug] After starting dubbo.protocol.triple.servlet.enabled=true, use http://127.0.0.1:9898/com.xxx.yyy.api.demo.NoGenericResource/queryPrice3 to request RestParameterException: Missing argument 'reqArgs' for method parameter of type [class xxx] exception [dubbo]

Posted by "fantiq (via GitHub)" <gi...@apache.org>.
fantiq commented on issue #15367:
URL: https://github.com/apache/dubbo/issues/15367#issuecomment-3101690015

   > Has this problem been solved? Thank you!
   
   HI @poazy , it may not be dubbo' bug. This may be caused by requesting an empty body. 
   
   you can use `curl`  request the [https://github.com/poazy/dubbo-rest-demo](https://github.com/poazy/dubbo-rest-demo) server.
   
   
   request  with json body  `{"data":123456}`
   
   ```
   curl -d '{"data":123456}' -H 'Content-Type: application/json' http://127.0.0.1:8099/com.poazy.dubbo.rest.demo.api.RestDemoService/queryPrice
   ```
   
   got
   
   ```
   {"code":200,"data":123456,"msg":"OK"}
   ```
   
   
   request with empty body ``
   
   ```
   curl -d '' -H 'Content-Type: application/json' http://127.0.0.1:8099/com.poazy.dubbo.rest.demo.api.RestDemoService/queryPrice
   ```
   
   got
   
   ```
   {"message":"Missing argument 'reqArgs' for method parameter of type [class com.poazy.dubbo.rest.demo.api.entity.DrdRQ]","status":"400"}
   ```


-- 
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


Re: [I] [Bug] After starting dubbo.protocol.triple.servlet.enabled=true, use http://127.0.0.1:9898/com.xxx.yyy.api.demo.NoGenericResource/queryPrice3 to request RestParameterException: Missing argument 'reqArgs' for method parameter of type [class xxx] exception [dubbo]

Posted by "poazy (via GitHub)" <gi...@apache.org>.
poazy commented on issue #15367:
URL: https://github.com/apache/dubbo/issues/15367#issuecomment-2914614596

   @oxsean 
   
   I created a Demo project using spring-cloud-alibaba: 2023.0.3.2 and dubbo: 3.3.4 to reproduce this occasional error.  Thanks!
   
   https://github.com/poazy/dubbo-rest-demo
   
   


-- 
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


Re: [I] [Bug] After starting dubbo.protocol.triple.servlet.enabled=true, use http://127.0.0.1:9898/com.xxx.yyy.api.demo.NoGenericResource/queryPrice3 to request RestParameterException: Missing argument 'reqArgs' for method parameter of type [class xxx] exception [dubbo]

Posted by "poazy (via GitHub)" <gi...@apache.org>.
poazy commented on issue #15367:
URL: https://github.com/apache/dubbo/issues/15367#issuecomment-3105320727

   Hi @fantiq ,
   
   That's true, Neither curl nor JMeter concurrent tests have this problem.
   
   This problem only occurs when sending requests in the .http file of IDEA. It is strange that this problem occasionally occurs!  It is speculated that there is something wrong with the client processing logic in the .http file of IDEA.
   
   Thanks!


-- 
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