What to expect when submitting a Spring Project specific Issue
search cancel

What to expect when submitting a Spring Project specific Issue

book

Article ID: 410469

calendar_today

Updated On:

Products

VMware Tanzu Spring Essentials

Issue/Introduction

Support Scope on Spring Projects are discussed in detail here. This KB provides more details on what to expect with working Tanzu Support on Spring related issues.

Environment

Supported Spring Projects 

Resolution

Here are some info/files that a Tanzu Support will ask when working with a Spring related Support ticket:

 

  • Spring Application logs showing the error

Provide spring application logs that contains the whole stracktrace of the error. Error stack trace provides detailed information about an exception that occurred within a Spring application. It typically includes the type of exception, a message describing the error, and a list of method calls (stack frames) leading up to the point where the exception was thrown. Here is an example of a stacktrace:

java.lang.NullPointerException: Cannot invoke "com.example.demo.repository.ProductRepository.findById(java.lang.Object)" because "this.productRepository" is null at com.example.demo.service.ProductService.getProductById(ProductService.java:18) at com.example.demo.controller.ProductController.getProduct(ProductController.java:25) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:207) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:152) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:801) at org.springframework.web.servlet.mvc.method.Abstract HandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1071) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:962) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898) at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:655) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883) at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:764) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:59) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) at org.apache.catalina.core.StandardWrapperFacade.doFilter(StandardWrapperFacade.java:103) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:527) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:346) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:271) at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:221) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:177) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:390) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:928) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1794) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Thread.java:833)
  • Spring Application logs with spring packages in debug mode

To get more information on an app behaviour we need to get more info. Putting a specific spring package into debug mode might give more info.

If using spring boot you can set debug mode in your application.properties, Here is an example of putting Spring MVC and Spring batch packages into debug mode:

logging.level.org.springframework.web=debug 
logging.level.org.springframework.batch=debug

 

if using log4j  you can set this in your log4j.properties, Here is an example. 

log4j.category.com.org.springframework.web=DEBUG
log4j.category.com.org.springframework.batch=DEBUG

Restart your application and gather debug logs and attach them to the support ticket

  • Creating a Simplified Application

Tanzu Support does not include debugging custom code, please don't expect support to review your whole application code. It is expected that Support will ask for a working simplified application limited to Spring and minimal additional code. Please remove unnecessary business logic. A lightweight runnable project which include spring configurations and dependencies to replicate the issue. This would make investigation more efficient and faster. Make sure that the application can be compiled with no errors and can be run and specify procedure on how to recreate the issue. 

If an issue would not be replicated using minimal code, sometimes this means that issue might be caused by something else.

  • Maven dependency tree or its equivalent

Sometimes it would take some time to make a simplified application so submitting a maven dependency tree or equivalent will give a glimpse of your environment. This would show what spring libraries you are using and other 3rd party libraries as well as the versions of the libraries

mvn dependency:tree

if using gradle

./gradlew dependencies

 

  • Thread dumps

Analyzing thread dumps are out of support scope so this is more on best effort basis. We encourage customers to use 3rd party thread dump analyser tools to help them self diagnose any latency or performance issue but sometimes support do ask for thread dumps. 

Get several thread dump on different intervals. Get a thread dump when

    • the issue is not happening and
    • when the issue is happening.
      Compare both thread dumps so you can see what changed when the issue is happening this will help you identify what is causing the issue. 

Useful reference:

How to capture thread dumps of a running task in Tanzu Application Service for VMs
Retrieving thread dumps using Spring Boot Actuator
Other ways to capture thread dumps 
  • Heap dumps

Just like thread dumps, heap dumps analysis are out of support scope so this is more on a best effort basis. We encourage customers to use 3rd party heap dump analyser tools to help them self diagnose any memory leak or performance issue but sometimes support do ask for thread dumps. 

Get several heap dump on different intervals. Get a heap dump when

    • the issue is not happening and
    • when the issue is happening.
      Compare both heap dumps so you can see what changed when the issue is happening this will help you identify what is causing the issue. 

Useful reference:

How to generate and download Java Application heap dump from a Tanzu Application Service (TAS) for VMs container
Retrieving heap dumps using Spring Boot Actuator
Other ways to retrieve heap dumps