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.
Supported Spring Projects
Here are some info/files that a Tanzu Support will ask when working with a Spring related Support ticket:
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)
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
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.
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
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
Useful reference:
How to capture thread dumps of a running task in Tanzu Application Service for VMsJust 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
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