You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2021/12/02 03:22:40 UTC

[GitHub] [servicecomb-java-chassis] xuzhiweiand opened a new issue #2651: 网关使用方式,当有多个路由规则时,在调用后端RPC接口时会报inputstream为null的异常

xuzhiweiand opened a new issue #2651:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2651


   路由代码如下:
           router.routeWithRegex(regex)
               .handler(createBodyHandler())
               .failureHandler(this::onFailure)
               .handler(this::onRequest);
           router.routeWithRegex(CROSS_ROUTE)
               .handler(context -> new ElbCrossAdapter().onRequest(context, httpServerFilters));
   
   异常信息如下:
   
   2021-12-02 09:52:25.931 [vert.x-eventloop-thread-4] ERROR - [RestCodec.java:restToArgs:74] - [] - Parameter is not valid for operation [DataService:Service.bookInfo-data-fetchBookInfo]. Parameter is [req]. Processor is [body].
   java.lang.NullPointerException: null
   	at org.apache.servicecomb.foundation.vertx.http.VertxServerRequestToHttpServletRequest.getInputStream(VertxServerRequestToHttpServletRequest.java:256)
   	at org.apache.servicecomb.common.rest.codec.param.BodyProcessorCreator$BodyProcessor.getValue(BodyProcessorCreator.java:88)
   	at org.apache.servicecomb.common.rest.codec.RestCodec.restToArgs(RestCodec.java:65)
   	at org.apache.servicecomb.common.rest.filter.inner.ServerRestArgsFilter.afterReceiveRequest(ServerRestArgsFilter.java:60)
   	at org.apache.servicecomb.common.rest.AbstractRestInvocation.prepareInvoke(AbstractRestInvocation.java:231)
   	at org.apache.servicecomb.common.rest.AbstractRestInvocation.invoke(AbstractRestInvocation.java:211)
   	at org.apache.servicecomb.common.rest.AbstractRestInvocation.runOnExecutor(AbstractRestInvocation.java:201)
   	at org.apache.servicecomb.common.rest.AbstractRestInvocation.lambda$scheduleInvocation$0(AbstractRestInvocation.java:160)
   	at org.apache.servicecomb.core.executor.ReactiveExecutor.execute(ReactiveExecutor.java:30)
   	at org.apache.servicecomb.common.rest.AbstractRestInvocation.scheduleInvocation(AbstractRestInvocation.java:145)
   	at org.apache.servicecomb.edge.core.EdgeInvocation.edgeInvoke(EdgeInvocation.java:71)
   


-- 
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: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org