You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2019/01/14 09:46:05 UTC

[GitHub] suanping opened a new issue #2158: [SpringMVC controller ] method's ResquestBody params binding error

suanping opened a new issue #2158: [SpringMVC controller ]  method's ResquestBody params binding error 
URL: https://github.com/apache/incubator-skywalking/issues/2158
 
 
   Please answer these questions before submitting your issue.
   Bug
   
   - Why do you submit this issue?
   - [ ] Question or discussion
   - [ ] Bug
   - [ ] Requirement
   - [ ] Feature or performance improvement
   
   ___
   ### Question
   - What do you want to know?
   
   ___
   ### Bug
   - Which version of SkyWalking, OS and JRE?
   apache-skywalking-apm-incubating-6.0.0-alpha
   jdk1.8
   
   - Which company or project?
   icss
   
   - What happen?
   If possible, provide a way for reproducing the error. e.g. demo application, component version.
   
   java.lang.NullPointerException: null
           at com.***.controller.GenericRestController.paging(GenericRestController.java:156)
           at com.***.web.ApplicationController.paging$accessor$kaVRso4j(ApplicationController.java)
           at com.***.web.ApplicationController$auxiliary$FMfvshUU.call(Unknown Source)
           at org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstMethodsInter.intercept(InstMethodsInter.java:93)
           at com.icss.cloud.admin.web.ApplicationController.paging(ApplicationController.java)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
           at java.lang.reflect.Method.invoke(Method.java:498)
           at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:209)
           at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest$original$brVAjsZi(InvocableHandlerMethod.java:136)
           at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest$original$brVAjsZi$accessor$nSgfs2Wp(InvocableHandlerMethod.ja
   va)
   
   
   
   1.  supper class like 
   public abstract class GenericRestController<M extends GenericService<E>,E extends BaseEntity> extends BaseController {
   	@RequestMapping("page")
   	public @ResponseBody BaseResult<Page<E>> paging(@RequestBody E model) {...}
   } 
   
   2.  sub class use supper default implement, non overwrite , 
   @RestController
   @RequestMapping("application")
   public class ApplicationController extends GenericRestController<IApplicationService,ApplicationDTO> {
   }
   
   3.  test '/application/paging' with json payload 
   
   4.  when sub class has no overwrite paging method or overwrite method but has no  @RequestBody annotation, then the param's field are all null 
   
   ___
   ### Requirement or improvement
   - Please describe about your requirements or improvement suggestions.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services