Advertisement
satyadoorva

Rest API documentation generation Swagger Error

Jul 17th, 2022
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.63 KB | None | 0 0
  1. com.fasterxml.jackson.databind.JsonMappingException: (was java.lang.NullPointerException) (through reference chain: io.swagger.models.Swagger["definitions"]->java.util.LinkedHashMap["ExtensionGet"]->io.swagger.models.ModelImpl["properties"]->java.util.LinkedHashMap["belongsTo"]->io.swagger.models.properties.RefProperty["$ref"])
  2. at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:397)
  3. at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:356)
  4. at com.fasterxml.jackson.databind.ser.std.StdSerializer.wrapAndThrow(StdSerializer.java:316)
  5. at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:763)
  6. at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:178)
  7. at com.fasterxml.jackson.databind.ser.std.MapSerializer.serializeOptionalFields(MapSerializer.java:786)
  8. at com.fasterxml.jackson.databind.ser.std.MapSerializer.serializeWithoutTypeInfo(MapSerializer.java:677)
  9. at com.fasterxml.jackson.databind.ser.std.MapSerializer.serialize(MapSerializer.java:637)
  10. at com.fasterxml.jackson.databind.ser.std.MapSerializer.serialize(MapSerializer.java:33)
  11. at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:728)
  12. at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:755)
  13. at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:178)
  14. at com.fasterxml.jackson.databind.ser.std.MapSerializer.serializeOptionalFields(MapSerializer.java:786)
  15. at com.fasterxml.jackson.databind.ser.std.MapSerializer.serializeWithoutTypeInfo(MapSerializer.java:677)
  16. at com.fasterxml.jackson.databind.ser.std.MapSerializer.serialize(MapSerializer.java:637)
  17. at com.fasterxml.jackson.databind.ser.std.MapSerializer.serialize(MapSerializer.java:33)
  18. at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:728)
  19. at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:755)
  20. at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:178)
  21. at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider._serialize(DefaultSerializerProvider.java:480)
  22. at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:319)
  23. at com.fasterxml.jackson.databind.ObjectWriter$Prefetch.serialize(ObjectWriter.java:1513)
  24. at com.fasterxml.jackson.databind.ObjectWriter._configAndWriteValue(ObjectWriter.java:1215)
  25. at com.fasterxml.jackson.databind.ObjectWriter.writeValueAsString(ObjectWriter.java:1085)
  26. at io.swagger.util.Json.pretty(Json.java:23)
  27. at org.openmrs.module.webservices.docs.swagger.SwaggerSpecificationCreator.createJSON(SwaggerSpecificationCreator.java:878)
  28. at org.openmrs.module.webservices.docs.swagger.SwaggerSpecificationCreator.getJSON(SwaggerSpecificationCreator.java:156)
  29. at org.openmrs.module.webservices.rest.web.controller.SwaggerSpecificationController.getSwaggerSpecification(SwaggerSpecificationController.java:42)
  30. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  31. at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  32. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  33. at java.lang.reflect.Method.invoke(Method.java:498)
  34. at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:177)
  35. at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:446)
  36. at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:434)
  37. at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:943)
  38. at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:877)
  39. at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966)
  40. at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:857)
  41. at javax.servlet.http.HttpServlet.service(HttpServlet.java:635)
  42. at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842)
  43. at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
  44. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
  45. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
  46. at org.openmrs.module.web.filter.ForcePasswordChangeFilter.doFilter(ForcePasswordChangeFilter.java:60)
  47. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
  48. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
  49. at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
  50. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
  51. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
  52. at org.openmrs.web.filter.GZIPFilter.doFilterInternal(GZIPFilter.java:64)
  53. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
  54. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
  55. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
  56. at org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:72)
  57. at org.openmrs.module.owa.filter.OwaFilter.doFilter(OwaFilter.java:57)
  58. at org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:70)
  59. at org.openmrs.module.web.filter.ModuleFilter.doFilter(ModuleFilter.java:54)
  60. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
  61. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
  62. at org.openmrs.web.filter.OpenmrsFilter.doFilterInternal(OpenmrsFilter.java:108)
  63. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
  64. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
  65. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
  66. at org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:150)
  67. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
  68. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
  69. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
  70. at org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:105)
  71. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
  72. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
  73. at org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:105)
  74. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
  75. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
  76. at org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:105)
  77. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
  78. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
  79. at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
  80. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
  81. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
  82. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
  83. at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:200)
  84. at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
  85. at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
  86. at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
  87. at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
  88. at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:660)
  89. at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
  90. at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
  91. at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:798)
  92. at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
  93. at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806)
  94. at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)
  95. at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
  96. at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
  97. at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
  98. at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
  99. at java.lang.Thread.run(Thread.java:748)
  100. Caused by: java.lang.NullPointerException
  101. at io.swagger.models.properties.RefProperty.get$ref(RefProperty.java:58)
  102. at sun.reflect.GeneratedMethodAccessor1148.invoke(Unknown Source)
  103. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  104. at java.lang.reflect.Method.invoke(Method.java:498)
  105. at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:689)
  106. at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:755)
  107. ... 94 more
  108.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement