Uploaded image for project: 'Apache ServiceComb'
  1. Apache ServiceComb
  2. SCB-1793

When use @RequestHeader(value ="xxx") and aggregatedParam at same time, it will throw null pointer exception

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      for examples:

        @RequestMapping(value = "/events2/{project_id}", method = RequestMethod.GET)
         public ResponseEntity<Object> queryEvents2(@PathVariable(value = "project_id") String projectId,
                 @RequestHeader(value = "x-auth22") Integer token2,
                 @RequestHeader(value = "x-auth") Integer token, Person person) {
           return null;
         }
      

      err:

      Caused by: java.lang.NullPointerException
      	at org.apache.servicecomb.swagger.invocation.arguments.producer.ProducerArgumentsMapperFactory.generateDefaultParamMapper(ProducerArgumentsMapperFactory.java:118)
      	at org.apache.servicecomb.swagger.invocation.arguments.producer.ProducerArgumentsMapperFactory.generateParamMapperByName(ProducerArgumentsMapperFactory.java:103)
      	at org.apache.servicecomb.swagger.invocation.arguments.producer.ProducerArgumentsMapperFactory.collectSwaggerArgumentsMapper(ProducerArgumentsMapperFactory.java:96)
      	at org.apache.servicecomb.swagger.invocation.arguments.ArgumentsMapperFactory.collectArgumentsMapper(ArgumentsMapperFactory.java:90)
      	at org.apache.servicecomb.swagger.invocation.arguments.producer.ProducerArgumentsMapperFactory.createArgumentsMapper(ProducerArgumentsMapperFactory.java:65)
      	at org.apache.servicecomb.swagger.engine.SwaggerEnvironment.createProducer(SwaggerEnvironment.java:192)
      	at org.apache.servicecomb.core.definition.schema.ProducerSchemaFactory.getOrCreateProducerSchema(ProducerSchemaFactory.java:78)
      	at org.apache.servicecomb.provider.rest.common.RestProducerProvider.init(RestProducerProvider.java:45)
      	at org.apache.servicecomb.core.provider.producer.ProducerProviderManager.init(ProducerProviderManager.java:54)
      	at org.apache.servicecomb.core.SCBEngine.doInit(SCBEngine.java:264)
      	at org.apache.servicecomb.core.SCBEngine.init(SCBEngine.java:219)
      	... 13 more
      

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            china_rkd 何一乐
            china_rkd 何一乐
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 40m
                40m

                Slack

                  Issue deployment