title: Weird formatting "java.lang.NoSuchFieldError: INFO error" on org.springframework.boot.actuate.metrics.export.prometheus.PrometheusScrapeEndpoint
body: <p>I've started to notice recently a weird formatting error reported at the Prometheus integration level. The error stack is available below.</p>
  <p>Any idea what could cause it?</p>
  <p>Thanks!</p>
  <p>I'm on springboot 2.5.2</p>
  <blockquote>
  <p>2021-07-15T11:53:30.530Z &lt;&gt;
  {session=,trace=,span=,user=,client=,thread=http-nio-9099-exec-9}
  ERROR:
  [org.apache.catalina.core.ContainerBase.[Tomcat-1].[localhost].[/].[dispatcherServlet]]
  org.apache.catalina.core.ContainerBase.[Tomcat-1].[localhost].[/].[dispatcherServlet]rlf(Servlet.service()
  for servlet [dispatcherServlet] in context with path [] threw
  exception [Handler dispatch failed; nested exception is
  java.lang.NoSuchFieldError: INFO] with root causeask)
  java.lang.NoSuchFieldError: INFO
  at io.prometheus.client.exporter.common.TextFormat.write004(TextFormat.java:72)
  ~[simpleclient_common-0.10.0.jar!/:?]
  at org.springframework.boot.actuate.metrics.export.prometheus.TextOutputFormat$2.write(TextOutputFormat.java:57)
  ~[spring-boot-actuator-2.5.2.jar!/:2.5.2]
  at org.springframework.boot.actuate.metrics.export.prometheus.PrometheusScrapeEndpoint.scrape(PrometheusScrapeEndpoint.java:58)
  ~[spring-boot-actuator-2.5.2.jar!/:2.5.2]
  at jdk.internal.reflect.GeneratedMethodAccessor53.invoke(Unknown Source)
  ~[?:?]
  at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  ~[?:?]
  at java.lang.reflect.Method.invoke(Method.java:564) ~[?:?]
  at org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:282)
  ~[spring-core-5.3.8.jar!/:5.3.8]
  at org.springframework.boot.actuate.endpoint.invoke.reflect.ReflectiveOperationInvoker.invoke(ReflectiveOperationInvoker.java:74)
  ~[spring-boot-actuator-2.5.2.jar!/:2.5.2]
  at org.springframework.boot.actuate.endpoint.annotation.AbstractDiscoveredOperation.invoke(AbstractDiscoveredOperation.java:60)
  ~[spring-boot-actuator-2.5.2.jar!/:2.5.2]
  at org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$ServletWebOperationAdapter.handle(AbstractWebMvcEndpointHandlerMapping.java:291)
  ~[spring-boot-actuator-2.5.2.jar!/:2.5.2]
  at org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(AbstractWebMvcEndpointHandlerMapping.java:376)
  ~[spring-boot-actuator-2.5.2.jar!/:2.5.2]
  at jdk.internal.reflect.GeneratedMethodAccessor52.invoke(Unknown Source)
  ~[?:?]
  at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  ~[?:?]
  at java.lang.reflect.Method.invoke(Method.java:564) ~[?:?]
  at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:197)
  ~[spring-web-5.3.8.jar!/:5.3.8]
  at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:141)
  ~[spring-web-5.3.8.jar!/:5.3.8]
  at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106)
  ~[spring-webmvc-5.3.8.jar!/:5.3.8]
  at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:894)
  ~[spring-webmvc-5.3.8.jar!/:5.3.8]
  at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)
  ~[spring-webmvc-5.3.8.jar!/:5.3.8]
  at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
  ~[spring-webmvc-5.3.8.jar!/:5.3.8]
  at org.springframework.boot.actuate.autoconfigure.web.servlet.CompositeHandlerAdapter.handle(CompositeHandlerAdapter.java:58)
  ~[spring-boot-actuator-autoconfigure-2.5.2.jar!/:2.5.2]
  at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1063)
  ~[spring-webmvc-5.3.8.jar!/:5.3.8]
  at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)
  ~[spring-webmvc-5.3.8.jar!/:5.3.8]
  at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
  ~[spring-webmvc-5.3.8.jar!/:5.3.8]
  at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)
  ~[spring-webmvc-5.3.8.jar!/:5.3.8]
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:655)
  ~[tomcat-embed-core-9.0.48.jar!/:?]
  at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
  ~[spring-webmvc-5.3.8.jar!/:5.3.8]
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
  ~[tomcat-embed-core-9.0.48.jar!/:?]
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:228)
  ~[tomcat-embed-core-9.0.48.jar!/:?]
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:163)
  ~[tomcat-embed-core-9.0.48.jar!/:?]
  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
  [tomcat-embed-core-9.0.48.jar!/:?]
  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
  [tomcat-embed-core-9.0.48.jar!/:?]
  at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542)
  [tomcat-embed-core-9.0.48.jar!/:?]
  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143)
  [tomcat-embed-core-9.0.48.jar!/:?]
  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
  [tomcat-embed-core-9.0.48.jar!/:?]
  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
  [tomcat-embed-core-9.0.48.jar!/:?]
  at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:764)
  [tomcat-embed-core-9.0.48.jar!/:?]
  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357)
  [tomcat-embed-core-9.0.48.jar!/:?]
  at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:382)
  [tomcat-embed-core-9.0.48.jar!/:?]
  at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
  [tomcat-embed-core-9.0.48.jar!/:?]
  at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893)
  [tomcat-embed-core-9.0.48.jar!/:?]
  at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1723)
  [tomcat-embed-core-9.0.48.jar!/:?]
  at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
  [tomcat-embed-core-9.0.48.jar!/:?]
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
  [?:?]
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
  [?:?]
  at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
  [tomcat-embed-core-9.0.48.jar!/:?]
  at java.lang.Thread.run(Thread.java:832) [?:?]
  2021-07-15T11:53:45.162Z &lt;&gt; {session=,trace=,span=,user=,client=,thread=http-nio-9099-exec-8}
  ERROR:
  [org.apache.catalina.core.ContainerBase.[Tomcat-1].[localhost].[/].[dispatcherServlet]]
  org.apache.catalina.core.ContainerBase.[Tomcat-1].[localhost].[/].[dispatcherServlet]rlf(Servlet.service()
  for servlet [dispatcherServlet] in context with path [] threw
  exception [Handler dispatch failed; nested exception is
  java.lang.NoSuchFieldError: INFO] with root causeask)
  java.lang.NoSuchFieldError: INFO
  at io.prometheus.client.exporter.common.TextFormat.write004(TextFormat.java:72)
  ~[simpleclient_common-0.10.0.jar!/:?]
  at org.springframework.boot.actuate.metrics.export.prometheus.TextOutputFormat$2.write(TextOutputFormat.java:57)
  ~[spring-boot-actuator-2.5.2.jar!/:2.5.2]
  at org.springframework.boot.actuate.metrics.export.prometheus.PrometheusScrapeEndpoint.scrape(PrometheusScrapeEndpoint.java:58)
  ~[spring-boot-actuator-2.5.2.jar!/:2.5.2]
  at jdk.internal.reflect.GeneratedMethodAccessor53.invoke(Unknown Source)
  ~[?:?]
  at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  ~[?:?]
  at java.lang.reflect.Method.invoke(Method.java:564) ~[?:?]
  at org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:282)
  ~[spring-core-5.3.8.jar!/:5.3.8]
  at org.springframework.boot.actuate.endpoint.invoke.reflect.ReflectiveOperationInvoker.invoke(ReflectiveOperationInvoker.java:74)
  ~[spring-boot-actuator-2.5.2.jar!/:2.5.2]
  at org.springframework.boot.actuate.endpoint.annotation.AbstractDiscoveredOperation.invoke(AbstractDiscoveredOperation.java:60)
  ~[spring-boot-actuator-2.5.2.jar!/:2.5.2]
  at org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$ServletWebOperationAdapter.handle(AbstractWebMvcEndpointHandlerMapping.java:291)
  ~[spring-boot-actuator-2.5.2.jar!/:2.5.2]
  at org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(AbstractWebMvcEndpointHandlerMapping.java:376)
  ~[spring-boot-actuator-2.5.2.jar!/:2.5.2]
  at jdk.internal.reflect.GeneratedMethodAccessor52.invoke(Unknown Source)
  ~[?:?]
  at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  ~[?:?]
  at java.lang.reflect.Method.invoke(Method.java:564) ~[?:?]
  at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:197)
  ~[spring-web-5.3.8.jar!/:5.3.8]
  at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:141)
  ~[spring-web-5.3.8.jar!/:5.3.8]
  at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106)
  ~[spring-webmvc-5.3.8.jar!/:5.3.8]
  at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:894)
  ~[spring-webmvc-5.3.8.jar!/:5.3.8]
  at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)
  ~[spring-webmvc-5.3.8.jar!/:5.3.8]
  at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
  ~[spring-webmvc-5.3.8.jar!/:5.3.8]
  at org.springframework.boot.actuate.autoconfigure.web.servlet.CompositeHandlerAdapter.handle(CompositeHandlerAdapter.java:58)
  ~[spring-boot-actuator-autoconfigure-2.5.2.jar!/:2.5.2]
  at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1063)
  ~[spring-webmvc-5.3.8.jar!/:5.3.8]
  at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:963)
  ~[spring-webmvc-5.3.8.jar!/:5.3.8]
  at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
  ~[spring-webmvc-5.3.8.jar!/:5.3.8]
  at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)
  ~[spring-webmvc-5.3.8.jar!/:5.3.8]
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:655)
  ~[tomcat-embed-core-9.0.48.jar!/:?]
  at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
  ~[spring-webmvc-5.3.8.jar!/:5.3.8]
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
  ~[tomcat-embed-core-9.0.48.jar!/:?]
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:228)
  ~[tomcat-embed-core-9.0.48.jar!/:?]
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:163)
  ~[tomcat-embed-core-9.0.48.jar!/:?]
  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
  [tomcat-embed-core-9.0.48.jar!/:?]
  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
  [tomcat-embed-core-9.0.48.jar!/:?]
  at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542)
  [tomcat-embed-core-9.0.48.jar!/:?]
  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143)
  [tomcat-embed-core-9.0.48.jar!/:?]
  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
  [tomcat-embed-core-9.0.48.jar!/:?]
  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
  [tomcat-embed-core-9.0.48.jar!/:?]
  at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:764)
  [tomcat-embed-core-9.0.48.jar!/:?]
  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357)
  [tomcat-embed-core-9.0.48.jar!/:?]
  at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:382)
  [tomcat-embed-core-9.0.48.jar!/:?]
  at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
  [tomcat-embed-core-9.0.48.jar!/:?]
  at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893)
  [tomcat-embed-core-9.0.48.jar!/:?]
  at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1723)
  [tomcat-embed-core-9.0.48.jar!/:?]
  at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
  [tomcat-embed-core-9.0.48.jar!/:?]
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
  [?:?]
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
  [?:?]
  at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
  [tomcat-embed-core-9.0.48.jar!/:?]
  at java.lang.Thread.run(Thread.java:832) [?:?]</p>
  </blockquote>