Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-14310

Nullpointer on GET /engine-rest/telemetry/data with 7.17.0-alpha3

XMLWordPrintable

    • Icon: Bug Report Bug Report
    • Resolution: Fixed
    • Icon: L3 - Default L3 - Default
    • 7.17.0, 7.17.0-alpha4
    • 7.17.0-alpha2, 7.17.0-alpha3
    • engine
    • None

      As requested by Niall Deehan I'm creating this issue.

      Environment (Required on creation):

      Spring Boot, Java 11, Camunda 7.17-0-alpha3

      Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket):

      Calling "GET http://localhost:8080/engine-rest/telemetry/data" results in a null pointer exception on 7.17.0-alpha3

      Steps to reproduce (Required on creation):

      Observed Behavior (Required on creation):

      Response is

      {"type":"NullPointerException","message":null}"
      

      Log says:

      2022-01-21 16:42:09.649  WARN 17945 --- [nio-8080-exec-1] org.camunda.bpm.engine.rest.exception    : ENGINE-REST-HTTP500 java.lang.NullPointerException
          at org.camunda.bpm.engine.rest.dto.telemetry.LicenseKeyDataDto.fromEngineDto(LicenseKeyDataDto.java:98)
          at org.camunda.bpm.engine.rest.dto.telemetry.InternalsDto.fromEngineDto(InternalsDto.java:127)
          at org.camunda.bpm.engine.rest.dto.telemetry.ProductDto.fromEngineDto(ProductDto.java:72)
          at org.camunda.bpm.engine.rest.dto.telemetry.TelemetryDataDto.fromEngineDto(TelemetryDataDto.java:50)
          at org.camunda.bpm.engine.rest.impl.TelemetryRestServiceImpl.getTelemetryData(TelemetryRestServiceImpl.java:55)
          at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
          at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.base/java.lang.reflect.Method.invoke(Method.java:566)
          at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory.lambda$static$0(ResourceMethodInvocationHandlerFactory.java:52)
          at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:124)
          at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:167)
          at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:219)
          at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:79)
          at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:475)
          at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:397)
          at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:81)
          at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:255)
          at org.glassfish.jersey.internal.Errors$1.call(Errors.java:248)
          at org.glassfish.jersey.internal.Errors$1.call(Errors.java:244)
          at org.glassfish.jersey.internal.Errors.process(Errors.java:292)
          at org.glassfish.jersey.internal.Errors.process(Errors.java:274)
          at org.glassfish.jersey.internal.Errors.process(Errors.java:244)
          at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:265)
          at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:234)
          at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:680)
          at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:394)
          at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:346)
          at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:366)
          at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:319)
          at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:205)
          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:53)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
          at org.camunda.bpm.engine.rest.filter.CacheControlFilter.doFilter(CacheControlFilter.java:45)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
          at org.camunda.bpm.engine.rest.filter.EmptyBodyFilter.doFilter(EmptyBodyFilter.java:101)
          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.StandardWrapperValve.invoke(StandardWrapperValve.java:197)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:357)
          at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:382)
          at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
          at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:893)
          at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1726)
          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:834)
      

      Expected behavior (Required on creation):

      HTTP 200 with the telemetry data

      Root Cause (Required on prioritization):

      The current code doesn't perform a null-check when the Camunda license data is loaded. For this reason, an NPE is thrown when the CE version is used. The error doesn't occur when Camunda EE is used since a license is present there.

      Solution Ideas (Optional):

      A null-check is performed before Camunda license data is loaded.

      Hints (optional):

      I initially observed this error with alpha2 while integrating this into https://github.com/camunda-community-hub/micronaut-camunda-bpm but actually it can also be reproduced with the Spring Boot integration.

      I haven't looked at it in detail. To me it looks as if the error is triggered because I'm using the Camunda community edition which does not have license data (I haven't tried the enterprise version yet). Probably a null check or something similar is missing in Camunda core.

        This is the controller panel for Smart Panels app

              thorben.lindhauer Thorben Lindhauer
              tobias.schaefer Tobias Schäfer
              Thorben Lindhauer Thorben Lindhauer
              Nikola Koevski Nikola Koevski
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: