Dynamic-Mapping not showing Connections

Hello Community,
we have problems after updating the dynamic-mapper to a new version. Is there a way to reset or delete all dynamic-mapper based configurations?

We have installed the version UI 4.8.0 and also the associated microservice.
Dynamic-mapping-service Version:4.8.0
Dynamic-mapping-UI Version: 4.8.0 → added new Application

In the Connectors configuration we get Connector type “No items”.

and in the Microservice Logs we get “NullPointerException”.

from the update description I have run the scripts : clean_connection_configuration.sh and dynamic-mapping-mgmt.sh but this doesn’t solve the problem.

Is there a solution to this? Have others seen this problem and how was it solved?

Can you state on which instance you wanted to deploy the Dynamic Mapper? (cloud, dedicated or edge and which version).

This error looks like a general issue with the SDK getting access to the tenant where it is deployed to. So it could be an instance issue e.g. microservices are not working properly or a version mismatch.

It doesn’t seem to be related to dynamic mapper.
Can you paste the full stack trace?

Hello Stefan,

the tenant we are trying to get the dynamic-mapper running is Cloud (eu-latest) is our Testtenant. Version is “1021.52.0” The problem is the connection was showing before the update and it was connected to our mqtt-broker.

First of all you can try to unsubscribe and subscribe again. Please also check if the version is 4.8.0.

If this doesn’t help please try to to delete the microservice and re-upload it again.

we are using the 4.8.0 version:


I have also tried to restart the microservice. The output is the same:

MEMORY_LIMIT: 1907MB
190MB is left for system
1717MB is left for application
Using JDK8+ memory settings
Java Memory Settings: -Xmx1546m -XX:MaxMetaspaceSize=171m, memory limit: 2G
heap dumps  /var/log/dynamic-mapping-service/heap-dump-<pid>.hprof
2025-03-26T11:15:30.176Z  INFO 14 --- [           main] c.c.m.l.c.LoggingEnvironmentRunListener  : logging.conf: /etc/dynamic-mapping-service/dynamic-mapping-service-logging.xml
██████╗ ██╗   ██╗███╗   ██╗ █████╗ ███╗   ███╗██╗ ██████╗    ███╗   ███╗ █████╗ ██████╗ ██████╗ ███████╗██████╗
██╔══██╗╚██╗ ██╔╝████╗  ██║██╔══██╗████╗ ████║██║██╔════╝    ████╗ ████║██╔══██╗██╔══██╗██╔══██╗██╔════╝██╔══██╗
██║  ██║ ╚████╔╝ ██╔██╗ ██║███████║██╔████╔██║██║██║         ██╔████╔██║███████║██████╔╝██████╔╝█████╗  ██████╔╝
██║  ██║  ╚██╔╝  ██║╚██╗██║██╔══██║██║╚██╔╝██║██║██║         ██║╚██╔╝██║██╔══██║██╔═══╝ ██╔═══╝ ██╔══╝  ██╔══██╗
██████╔╝   ██║   ██║ ╚████║██║  ██║██║ ╚═╝ ██║██║╚██████╗    ██║ ╚═╝ ██║██║  ██║██║     ██║     ███████╗██║  ██║
╚═════╝    ╚═╝   ╚═╝  ╚═══╝╚═╝  ╚═╝╚═╝     ╚═╝╚═╝ ╚═════╝    ╚═╝     ╚═╝╚═╝  ╚═╝╚═╝     ╚═╝     ╚══════╝╚═╝  ╚═╝

2025-03-26T11:15:30.875Z  INFO 14 --- [           main] dynamic.mapping.App                      : Starting App using Java 21.0.6 with PID 14 (/data/dynamic-mapping-service.jar started by root in /)
2025-03-26T11:15:30.877Z  INFO 14 --- [           main] dynamic.mapping.App                      : The following 1 profile is active: "prod"
2025-03-26T11:15:43.572Z  INFO 14 --- [           main] o.s.c.a.ConfigurationClassEnhancer       : @Bean method EnableContextSupportConfiguration.propertySourcesPlaceholderConfigurer is non-static and returns an object assignable to Spring's BeanFactoryPostProcessor interface. This will result in a failure to process annotations such as @Autowired, @Resource and @PostConstruct within the method's declaring @Configuration class. Add the 'static' modifier to this method to avoid these container lifecycle issues; see @Bean javadoc for complete details.
2025-03-26T11:15:43.760Z  INFO 14 --- [           main] o.s.c.a.ConfigurationClassEnhancer       : @Bean method EnableContextSupportConfiguration.contextScopeConfigurer is non-static and returns an object assignable to Spring's BeanFactoryPostProcessor interface. This will result in a failure to process annotations such as @Autowired, @Resource and @PostConstruct within the method's declaring @Configuration class. Add the 'static' modifier to this method to avoid these container lifecycle issues; see @Bean javadoc for complete details.
2025-03-26T11:15:49.880Z  INFO 14 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port 80 (http)
2025-03-26T11:15:49.980Z  INFO 14 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2025-03-26T11:15:49.980Z  INFO 14 --- [           main] o.apache.catalina.core.StandardEngine    : Starting Servlet engine: [Apache Tomcat/10.1.31]
2025-03-26T11:15:50.778Z  INFO 14 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2025-03-26T11:15:50.862Z  INFO 14 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 19399 ms
2025-03-26T11:15:53.164Z  WARN 14 --- [           main] .m.s.s.i.MicroserviceSettingsServiceImpl : Loading tenant options using bootstrap credentials!
2025-03-26T11:15:59.980Z  INFO 14 --- [           main] c.c.m.s.c.TokenCacheConfiguration        : Default Guava implementation for token cache is used.
Parameters:
- max cache size: 10000
- expire after access: 10 minutes. Expire after write 0 seconds
2025-03-26T11:16:00.366Z  WARN 14 --- [           main] r$InitializeUserDetailsManagerConfigurer : Global AuthenticationManager configured with an AuthenticationProvider bean. UserDetailsService beans will not be used for username/password login. Consider removing the AuthenticationProvider bean. Alternatively, consider using the UserDetailsService in a manually instantiated DaoAuthenticationProvider.
2025-03-26T11:16:00.482Z  INFO 14 --- [           main] bleMicroserviceSubscriptionConfiguration : Microservice repository will be build for application 'dynamic-mapping-service'.
2025-03-26T11:16:04.387Z  INFO 14 --- [           main] o.s.boot.web.servlet.RegistrationBean    : Filter cumulocityOAuthMicroserviceFilterRegistration was not registered (disabled)
2025-03-26T11:16:04.387Z  INFO 14 --- [           main] o.s.boot.web.servlet.RegistrationBean    : Filter preAuthenticateFilterRegistration was not registered (disabled)
2025-03-26T11:16:04.387Z  INFO 14 --- [           main] o.s.boot.web.servlet.RegistrationBean    : Filter postAuthenticateFilterRegistration was not registered (disabled)
2025-03-26T11:16:11.275Z  INFO 14 --- [           main] o.s.b.a.e.web.EndpointLinksResolver      : Exposing 4 endpoints beneath base path ''
2025-03-26T11:16:12.365Z  INFO 14 --- [           main] c.c.m.s.TenantOptionPropertySource       : Overriding application settings with tenant options is enabled.
2025-03-26T11:16:17.769Z  INFO 14 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port 80 (http) with context path '/'
2025-03-26T11:16:17.960Z  INFO 14 --- [           main] .s.s.i.MicroserviceSubscriptionScheduler : Start; subscriptionDelay = 10000, subscriptionInitialDelay = 30000
2025-03-26T11:16:17.965Z  INFO 14 --- [           main] dynamic.mapping.App                      : Started App in 51.592 seconds (process running for 56.515)
2025-03-26T11:16:48.471Z  INFO 14 --- [subscriptions-0] dynamic.mapping.core.BootstrapService    : Tenant t1552132465 - Microservice subscribed
2025-03-26T11:16:49.761Z  INFO 14 --- [subscriptions-0] dynamic.mapping.core.C8YAgent            : Tenant t1552132465 - Initialize cache 100000
2025-03-26T11:16:50.264Z  INFO 14 --- [subscriptions-0] dynamic.mapping.core.C8YAgent            : Tenant t1552132465 - Agent with ID d11r_mappingService already exists {"managedObject":{"self":"http://t1552132465.eu-latest.cumulocity.com/inventory/managedObjects/995346910","id":"995346910"},"externalId":"d11r_mappingService","self":"http://t1552132465.eu-latest.cumulocity.com/identity/externalIds/c8y_Serial/d11r_mappingService","type":"c8y_Serial"}
2025-03-26T11:16:51.476Z  INFO 14 --- [subscriptions-0] dynamic.mapping.core.MappingComponent    : Tenant t1552132465 - Loaded mappings outbound: 0 to cache
2025-03-26T11:16:51.668Z  INFO 14 --- [subscriptions-0] dynamic.mapping.core.MappingComponent    : Tenant t1552132465 - Loaded mappings inbound: 2 to cache
2025-03-26T11:16:51.669Z ERROR 14 --- [subscriptions-0] dynamic.mapping.core.BootstrapService    : Tenant t1552132465 - Initialization error: Cannot invoke "String.trim()" because "topic" is null
2025-03-26T11:17:02.979Z  INFO 14 --- [omcat-handler-0] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring DispatcherServlet 'dispatcherServlet'
2025-03-26T11:17:02.980Z  INFO 14 --- [omcat-handler-0] o.s.web.servlet.DispatcherServlet        : Initializing Servlet 'dispatcherServlet'
2025-03-26T11:17:03.061Z  INFO 14 --- [omcat-handler-0] o.s.web.servlet.DispatcherServlet        : Completed initialization in 81 ms
2025-03-26T11:17:05.173Z  INFO 14 --- [omcat-handler-2] d.mapping.controller.MappingController   : Tenant t1552132465 - Get mappings
2025-03-26T11:17:05.363Z  INFO 14 --- [omcat-handler-4] d.mapping.controller.MappingController   : Tenant t1552132465 - Get mappings
2025-03-26T11:17:05.563Z  INFO 14 --- [omcat-handler-6] d.mapping.controller.MappingController   : Tenant t1552132465 - Get mappings
2025-03-26T11:17:05.570Z  INFO 14 --- [omcat-handler-8] d.mapping.controller.MappingController   : Tenant t1552132465 - Get mappings
2025-03-26T11:17:28.095Z  INFO 14 --- [mcat-handler-10] d.m.controller.ConfigurationController   : Tenant t1552132465 - Getting connection properties...
2025-03-26T11:17:28.163Z  INFO 14 --- [mcat-handler-11] d.m.controller.ConfigurationController   : Tenant t1552132465 - Getting connection properties...
2025-03-26T11:17:28.168Z  WARN 14 --- [omcat-handler-9] c.c.m.context.ContextServiceImpl         : execution of task failed within tenant : t1552132465 - jakarta.servlet.ServletException: Request processing failed: java.lang.NullPointerException: Cannot invoke "java.util.Map.size()" because "m" is null 
2025-03-26T11:17:28.169Z  WARN 14 --- [omcat-handler-9] c.c.m.context.ContextServiceImpl         : execution of task failed within tenant : t1552132465 - Error on login attempt 
2025-03-26T11:17:28.169Z  WARN 14 --- [omcat-handler-9] .m.s.t.CumulocityOAuthMicroserviceFilter : Error {}

org.springframework.security.authentication.AuthenticationServiceException: Error on login attempt
	at com.cumulocity.microservice.security.token.CumulocityOAuthMicroserviceFilter.lambda$doFilter$0(CumulocityOAuthMicroserviceFilter.java:78)
	at com.cumulocity.microservice.context.ContextServiceImpl$CallableRunnableWrapper.call(ContextServiceImpl.java:119)
	at com.cumulocity.microservice.context.ContextServiceImpl$CallableRunnableWrapper.call(ContextServiceImpl.java:109)
	at com.cumulocity.microservice.context.ContextServiceImpl.callWithinContext(ContextServiceImpl.java:78)
	at com.cumulocity.microservice.context.ContextServiceImpl.runWithinContext(ContextServiceImpl.java:66)
	at com.cumulocity.microservice.security.token.CumulocityOAuthMicroserviceFilter.doFilter(CumulocityOAuthMicroserviceFilter.java:72)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:240)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:227)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:137)
	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:107)
	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:93)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:240)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:227)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:137)
	at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)
	at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:240)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:227)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:137)
	at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:62)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:240)
	at org.springframework.security.web.ObservationFilterChainDecorator$AroundFilterObservation$SimpleAroundFilterObservation.lambda$wrap$0(ObservationFilterChainDecorator.java:323)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:224)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:137)
	at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:233)
	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:191)
	at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:113)
	at org.springframework.web.servlet.handler.HandlerMappingIntrospector.lambda$createCacheFilter$3(HandlerMappingIntrospector.java:195)
	at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:113)
	at org.springframework.web.filter.CompositeFilter.doFilter(CompositeFilter.java:74)
	at org.springframework.security.config.annotation.web.configuration.WebMvcSecurityConfiguration$CompositeFilterChainProxy.doFilter(WebMvcSecurityConfiguration.java:230)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:362)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:278)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.springframework.web.filter.ServerHttpObservationFilter.doFilterInternal(ServerHttpObservationFilter.java:113)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:483)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
	at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:731)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:384)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:905)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1741)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
	at java.base/java.lang.VirtualThread.run(VirtualThread.java:329)
Caused by: java.lang.RuntimeException: jakarta.servlet.ServletException: Request processing failed: java.lang.NullPointerException: Cannot invoke "java.util.Map.size()" because "m" is null
	at com.google.common.base.Throwables.propagate(Throwables.java:249)
	at com.cumulocity.microservice.security.filter.PostAuthenticateServletFilter$1.run(PostAuthenticateServletFilter.java:46)
	at com.cumulocity.microservice.context.ContextServiceImpl$CallableRunnableWrapper.call(ContextServiceImpl.java:119)
	at com.cumulocity.microservice.context.ContextServiceImpl$CallableRunnableWrapper.call(ContextServiceImpl.java:109)
	at com.cumulocity.microservice.context.ContextServiceImpl.callWithinContext(ContextServiceImpl.java:78)
	at com.cumulocity.microservice.context.ContextServiceImpl.runWithinContext(ContextServiceImpl.java:66)
	at com.cumulocity.microservice.context.ContextServiceImpl$4.run(ContextServiceImpl.java:129)
	at com.cumulocity.microservice.security.filter.PostAuthenticateServletFilter.doFilterInternal(PostAuthenticateServletFilter.java:79)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:240)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:227)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:137)
	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:100)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:240)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:227)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:137)
	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:179)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:240)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:227)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:137)
	at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:181)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:240)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:227)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:137)
	at com.cumulocity.microservice.security.filter.PreAuthenticateServletFilter$1.run(PreAuthenticateServletFilter.java:39)
	at com.cumulocity.microservice.security.filter.PreAuthenticateServletFilter.doFilterInternal(PreAuthenticateServletFilter.java:72)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:240)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:227)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:137)
	at com.cumulocity.microservice.security.token.CumulocityOAuthMicroserviceFilter.lambda$doFilter$0(CumulocityOAuthMicroserviceFilter.java:76)
	... 62 common frames omitted
Caused by: jakarta.servlet.ServletException: Request processing failed: java.lang.NullPointerException: Cannot invoke "java.util.Map.size()" because "m" is null
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1022)
	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:903)
	at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:564)
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885)
	at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:195)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:108)
	at org.springframework.security.web.FilterChainProxy.lambda$doFilterInternal$3(FilterChainProxy.java:231)
	at org.springframework.security.web.ObservationFilterChainDecorator$FilterObservation$SimpleFilterObservation.lambda$wrap$1(ObservationFilterChainDecorator.java:479)
	at org.springframework.security.web.ObservationFilterChainDecorator$AroundFilterObservation$SimpleAroundFilterObservation.lambda$wrap$1(ObservationFilterChainDecorator.java:340)
	at org.springframework.security.web.ObservationFilterChainDecorator.lambda$wrapSecured$0(ObservationFilterChainDecorator.java:82)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:128)
	at org.springframework.security.web.access.intercept.AuthorizationFilter.doFilter(AuthorizationFilter.java:100)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:240)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:227)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:137)
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:126)
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:120)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:240)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:227)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:137)
	at com.cumulocity.microservice.security.filter.PostAuthenticateServletFilter$1.run(PostAuthenticateServletFilter.java:44)
	... 92 common frames omitted
Caused by: java.lang.NullPointerException: Cannot invoke "java.util.Map.size()" because "m" is null
	at java.base/java.util.HashMap.putMapEntries(HashMap.java:503)
	at java.base/java.util.HashMap.putAll(HashMap.java:791)
	at dynamic.mapping.controller.MonitoringController.getConnectorsStatus(MonitoringController.java:122)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:255)
	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:188)
	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:118)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:926)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:831)
	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1089)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:979)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1014)
	... 117 common frames omitted

2025-03-26T11:17:28.173Z  WARN 14 --- [omcat-handler-9] .m.s.t.CumulocityOAuthMicroserviceFilter : org.springframework.security.authentication.AuthenticationServiceException: Error on login attempt
2025-03-26T11:17:28.174Z ERROR 14 --- [omcat-handler-9] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception

java.lang.NullPointerException: Cannot invoke "org.springframework.security.web.AuthenticationEntryPoint.commence(jakarta.servlet.http.HttpServletRequest, jakarta.servlet.http.HttpServletResponse, org.springframework.security.core.AuthenticationException)" because "this.authenticationEntryPoint" is null
	at com.cumulocity.microservice.security.token.CumulocityOAuthMicroserviceFilter.doFilter(CumulocityOAuthMicroserviceFilter.java:89)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:240)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:227)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:137)
	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:107)
	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:93)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:240)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:227)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:137)
	at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)
	at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:240)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:227)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:137)
	at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:62)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:240)
	at org.springframework.security.web.ObservationFilterChainDecorator$AroundFilterObservation$SimpleAroundFilterObservation.lambda$wrap$0(ObservationFilterChainDecorator.java:323)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:224)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:137)
	at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:233)
	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:191)
	at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:113)
	at org.springframework.web.servlet.handler.HandlerMappingIntrospector.lambda$createCacheFilter$3(HandlerMappingIntrospector.java:195)
	at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:113)
	at org.springframework.web.filter.CompositeFilter.doFilter(CompositeFilter.java:74)
	at org.springframework.security.config.annotation.web.configuration.WebMvcSecurityConfiguration$CompositeFilterChainProxy.doFilter(WebMvcSecurityConfiguration.java:230)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:362)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:278)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.springframework.web.filter.ServerHttpObservationFilter.doFilterInternal(ServerHttpObservationFilter.java:113)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:483)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
	at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:731)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:384)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:905)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1741)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
	at java.base/java.lang.VirtualThread.run(VirtualThread.java:329)


Ok, there seems to be an issue with your existing configuration of connectors which might not be compatible with 4.8.0.

We should try to start with a clean service & connector config.

try this to first retrieve the existing config and then deleting it. This deletes the service config:

c8y tenantoptions get --raw --category dynamic.mapper.service --key service.configuration
c8y tenantoptions delete  --category dynamic.mapper.service --key service.configuration

Next we might need to remove the connectors:

./dynamic-mapping-mgmt.sh deleteConnectors

Afterwards try to restart the microservice (unsubscribe - subscribe) and check if the issue is resolved.
Unfortunately you might need to re-create the connectors

I fear this breaking change was introduced with the new HTTP Connector + WebHook Connector where we needed to enhaned the connector model.

thank you for the information. I have executed this commands and restartes the microservice

but still get the same problem.

MEMORY_LIMIT: 1907MB
190MB is left for system
1717MB is left for application
Using JDK8+ memory settings
Java Memory Settings: -Xmx1546m -XX:MaxMetaspaceSize=171m, memory limit: 2G
heap dumps  /var/log/dynamic-mapping-service/heap-dump-<pid>.hprof
2025-03-26T13:21:17.263Z  INFO 14 --- [           main] c.c.m.l.c.LoggingEnvironmentRunListener  : logging.conf: /etc/dynamic-mapping-service/dynamic-mapping-service-logging.xml
██████╗ ██╗   ██╗███╗   ██╗ █████╗ ███╗   ███╗██╗ ██████╗    ███╗   ███╗ █████╗ ██████╗ ██████╗ ███████╗██████╗
██╔══██╗╚██╗ ██╔╝████╗  ██║██╔══██╗████╗ ████║██║██╔════╝    ████╗ ████║██╔══██╗██╔══██╗██╔══██╗██╔════╝██╔══██╗
██║  ██║ ╚████╔╝ ██╔██╗ ██║███████║██╔████╔██║██║██║         ██╔████╔██║███████║██████╔╝██████╔╝█████╗  ██████╔╝
██║  ██║  ╚██╔╝  ██║╚██╗██║██╔══██║██║╚██╔╝██║██║██║         ██║╚██╔╝██║██╔══██║██╔═══╝ ██╔═══╝ ██╔══╝  ██╔══██╗
██████╔╝   ██║   ██║ ╚████║██║  ██║██║ ╚═╝ ██║██║╚██████╗    ██║ ╚═╝ ██║██║  ██║██║     ██║     ███████╗██║  ██║
╚═════╝    ╚═╝   ╚═╝  ╚═══╝╚═╝  ╚═╝╚═╝     ╚═╝╚═╝ ╚═════╝    ╚═╝     ╚═╝╚═╝  ╚═╝╚═╝     ╚═╝     ╚══════╝╚═╝  ╚═╝

2025-03-26T13:21:17.967Z  INFO 14 --- [           main] dynamic.mapping.App                      : Starting App using Java 21.0.6 with PID 14 (/data/dynamic-mapping-service.jar started by root in /)
2025-03-26T13:21:17.969Z  INFO 14 --- [           main] dynamic.mapping.App                      : The following 1 profile is active: "prod"
2025-03-26T13:21:30.169Z  INFO 14 --- [           main] o.s.c.a.ConfigurationClassEnhancer       : @Bean method EnableContextSupportConfiguration.propertySourcesPlaceholderConfigurer is non-static and returns an object assignable to Spring's BeanFactoryPostProcessor interface. This will result in a failure to process annotations such as @Autowired, @Resource and @PostConstruct within the method's declaring @Configuration class. Add the 'static' modifier to this method to avoid these container lifecycle issues; see @Bean javadoc for complete details.
2025-03-26T13:21:30.270Z  INFO 14 --- [           main] o.s.c.a.ConfigurationClassEnhancer       : @Bean method EnableContextSupportConfiguration.contextScopeConfigurer is non-static and returns an object assignable to Spring's BeanFactoryPostProcessor interface. This will result in a failure to process annotations such as @Autowired, @Resource and @PostConstruct within the method's declaring @Configuration class. Add the 'static' modifier to this method to avoid these container lifecycle issues; see @Bean javadoc for complete details.
2025-03-26T13:21:35.866Z  INFO 14 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port 80 (http)
2025-03-26T13:21:35.964Z  INFO 14 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2025-03-26T13:21:35.964Z  INFO 14 --- [           main] o.apache.catalina.core.StandardEngine    : Starting Servlet engine: [Apache Tomcat/10.1.31]
2025-03-26T13:21:36.772Z  INFO 14 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2025-03-26T13:21:36.773Z  INFO 14 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 18298 ms
2025-03-26T13:21:38.866Z  WARN 14 --- [           main] .m.s.s.i.MicroserviceSettingsServiceImpl : Loading tenant options using bootstrap credentials!
2025-03-26T13:21:45.363Z  INFO 14 --- [           main] c.c.m.s.c.TokenCacheConfiguration        : Default Guava implementation for token cache is used.
Parameters:
- max cache size: 10000
- expire after access: 10 minutes. Expire after write 0 seconds
2025-03-26T13:21:45.764Z  WARN 14 --- [           main] r$InitializeUserDetailsManagerConfigurer : Global AuthenticationManager configured with an AuthenticationProvider bean. UserDetailsService beans will not be used for username/password login. Consider removing the AuthenticationProvider bean. Alternatively, consider using the UserDetailsService in a manually instantiated DaoAuthenticationProvider.
2025-03-26T13:21:45.882Z  INFO 14 --- [           main] bleMicroserviceSubscriptionConfiguration : Microservice repository will be build for application 'dynamic-mapping-service'.
2025-03-26T13:21:49.565Z  INFO 14 --- [           main] o.s.boot.web.servlet.RegistrationBean    : Filter cumulocityOAuthMicroserviceFilterRegistration was not registered (disabled)
2025-03-26T13:21:49.565Z  INFO 14 --- [           main] o.s.boot.web.servlet.RegistrationBean    : Filter preAuthenticateFilterRegistration was not registered (disabled)
2025-03-26T13:21:49.565Z  INFO 14 --- [           main] o.s.boot.web.servlet.RegistrationBean    : Filter postAuthenticateFilterRegistration was not registered (disabled)
2025-03-26T13:21:56.062Z  INFO 14 --- [           main] o.s.b.a.e.web.EndpointLinksResolver      : Exposing 4 endpoints beneath base path ''
2025-03-26T13:21:56.986Z  INFO 14 --- [           main] c.c.m.s.TenantOptionPropertySource       : Overriding application settings with tenant options is enabled.
2025-03-26T13:22:01.884Z  INFO 14 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port 80 (http) with context path '/'
2025-03-26T13:22:02.070Z  INFO 14 --- [           main] .s.s.i.MicroserviceSubscriptionScheduler : Start; subscriptionDelay = 10000, subscriptionInitialDelay = 30000
2025-03-26T13:22:02.075Z  INFO 14 --- [           main] dynamic.mapping.App                      : Started App in 48.799 seconds (process running for 53.755)
2025-03-26T13:22:30.566Z  INFO 14 --- [omcat-handler-0] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring DispatcherServlet 'dispatcherServlet'
2025-03-26T13:22:30.566Z  INFO 14 --- [omcat-handler-0] o.s.web.servlet.DispatcherServlet        : Initializing Servlet 'dispatcherServlet'
2025-03-26T13:22:30.569Z  INFO 14 --- [omcat-handler-0] o.s.web.servlet.DispatcherServlet        : Completed initialization in 2 ms
2025-03-26T13:22:32.860Z  INFO 14 --- [subscriptions-0] dynamic.mapping.core.BootstrapService    : Tenant t1552132465 - Microservice subscribed
2025-03-26T13:22:33.973Z  INFO 14 --- [omcat-handler-4] d.mapping.controller.MappingController   : Tenant t1552132465 - Get mappings
2025-03-26T13:22:34.170Z  INFO 14 --- [omcat-handler-3] d.mapping.controller.MappingController   : Tenant t1552132465 - Get mappings
2025-03-26T13:22:34.762Z  INFO 14 --- [omcat-handler-6] d.mapping.controller.MappingController   : Tenant t1552132465 - Get mappings
2025-03-26T13:22:34.764Z  INFO 14 --- [omcat-handler-7] d.mapping.controller.MappingController   : Tenant t1552132465 - Get mappings
2025-03-26T13:22:34.971Z  INFO 14 --- [subscriptions-0] dynamic.mapping.core.C8YAgent            : Tenant t1552132465 - Initialize cache 100000
2025-03-26T13:22:35.264Z  INFO 14 --- [subscriptions-0] dynamic.mapping.core.C8YAgent            : Tenant t1552132465 - Agent with ID d11r_mappingService already exists {"managedObject":{"self":"http://t1552132465.eu-latest.cumulocity.com/inventory/managedObjects/995346910","id":"995346910"},"externalId":"d11r_mappingService","self":"http://t1552132465.eu-latest.cumulocity.com/identity/externalIds/c8y_Serial/d11r_mappingService","type":"c8y_Serial"}
2025-03-26T13:22:36.466Z  INFO 14 --- [subscriptions-0] dynamic.mapping.core.MappingComponent    : Tenant t1552132465 - Loaded mappings outbound: 0 to cache
2025-03-26T13:22:36.667Z  INFO 14 --- [subscriptions-0] dynamic.mapping.core.MappingComponent    : Tenant t1552132465 - Loaded mappings inbound: 2 to cache
2025-03-26T13:22:36.669Z ERROR 14 --- [subscriptions-0] dynamic.mapping.core.BootstrapService    : Tenant t1552132465 - Initialization error: Cannot invoke "String.trim()" because "topic" is null
2025-03-26T13:22:54.248Z  INFO 14 --- [mcat-handler-10] d.m.controller.ConfigurationController   : Tenant t1552132465 - Getting connection properties...
2025-03-26T13:22:54.265Z  INFO 14 --- [mcat-handler-11] d.m.controller.ConfigurationController   : Tenant t1552132465 - Getting connection properties...
2025-03-26T13:22:54.282Z  WARN 14 --- [omcat-handler-9] c.c.m.context.ContextServiceImpl         : execution of task failed within tenant : t1552132465 - jakarta.servlet.ServletException: Request processing failed: java.lang.NullPointerException: Cannot invoke "java.util.Map.size()" because "m" is null 
2025-03-26T13:22:54.282Z  WARN 14 --- [omcat-handler-9] c.c.m.context.ContextServiceImpl         : execution of task failed within tenant : t1552132465 - Error on login attempt 
2025-03-26T13:22:54.282Z  WARN 14 --- [omcat-handler-9] .m.s.t.CumulocityOAuthMicroserviceFilter : Error {}

org.springframework.security.authentication.AuthenticationServiceException: Error on login attempt
	at com.cumulocity.microservice.security.token.CumulocityOAuthMicroserviceFilter.lambda$doFilter$0(CumulocityOAuthMicroserviceFilter.java:78)
	at com.cumulocity.microservice.context.ContextServiceImpl$CallableRunnableWrapper.call(ContextServiceImpl.java:119)
	at com.cumulocity.microservice.context.ContextServiceImpl$CallableRunnableWrapper.call(ContextServiceImpl.java:109)
	at com.cumulocity.microservice.context.ContextServiceImpl.callWithinContext(ContextServiceImpl.java:78)
	at com.cumulocity.microservice.context.ContextServiceImpl.runWithinContext(ContextServiceImpl.java:66)
	at com.cumulocity.microservice.security.token.CumulocityOAuthMicroserviceFilter.doFilter(CumulocityOAuthMicroserviceFilter.java:72)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:240)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:227)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:137)
	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:107)
	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:93)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:240)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:227)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:137)
	at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)
	at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:240)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:227)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:137)
	at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:62)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:240)
	at org.springframework.security.web.ObservationFilterChainDecorator$AroundFilterObservation$SimpleAroundFilterObservation.lambda$wrap$0(ObservationFilterChainDecorator.java:323)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:224)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:137)
	at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:233)
	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:191)
	at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:113)
	at org.springframework.web.servlet.handler.HandlerMappingIntrospector.lambda$createCacheFilter$3(HandlerMappingIntrospector.java:195)
	at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:113)
	at org.springframework.web.filter.CompositeFilter.doFilter(CompositeFilter.java:74)
	at org.springframework.security.config.annotation.web.configuration.WebMvcSecurityConfiguration$CompositeFilterChainProxy.doFilter(WebMvcSecurityConfiguration.java:230)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:362)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:278)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.springframework.web.filter.ServerHttpObservationFilter.doFilterInternal(ServerHttpObservationFilter.java:113)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:483)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
	at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:731)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:384)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:905)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1741)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
	at java.base/java.lang.VirtualThread.run(VirtualThread.java:329)
Caused by: java.lang.RuntimeException: jakarta.servlet.ServletException: Request processing failed: java.lang.NullPointerException: Cannot invoke "java.util.Map.size()" because "m" is null
	at com.google.common.base.Throwables.propagate(Throwables.java:249)
	at com.cumulocity.microservice.security.filter.PostAuthenticateServletFilter$1.run(PostAuthenticateServletFilter.java:46)
	at com.cumulocity.microservice.context.ContextServiceImpl$CallableRunnableWrapper.call(ContextServiceImpl.java:119)
	at com.cumulocity.microservice.context.ContextServiceImpl$CallableRunnableWrapper.call(ContextServiceImpl.java:109)
	at com.cumulocity.microservice.context.ContextServiceImpl.callWithinContext(ContextServiceImpl.java:78)
	at com.cumulocity.microservice.context.ContextServiceImpl.runWithinContext(ContextServiceImpl.java:66)
	at com.cumulocity.microservice.context.ContextServiceImpl$4.run(ContextServiceImpl.java:129)
	at com.cumulocity.microservice.security.filter.PostAuthenticateServletFilter.doFilterInternal(PostAuthenticateServletFilter.java:79)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:240)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:227)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:137)
	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:100)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:240)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:227)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:137)
	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:179)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:240)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:227)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:137)
	at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:181)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:240)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:227)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:137)
	at com.cumulocity.microservice.security.filter.PreAuthenticateServletFilter$1.run(PreAuthenticateServletFilter.java:39)
	at com.cumulocity.microservice.security.filter.PreAuthenticateServletFilter.doFilterInternal(PreAuthenticateServletFilter.java:72)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:240)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:227)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:137)
	at com.cumulocity.microservice.security.token.CumulocityOAuthMicroserviceFilter.lambda$doFilter$0(CumulocityOAuthMicroserviceFilter.java:76)
	... 62 common frames omitted
Caused by: jakarta.servlet.ServletException: Request processing failed: java.lang.NullPointerException: Cannot invoke "java.util.Map.size()" because "m" is null
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1022)
	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:903)
	at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:564)
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885)
	at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:195)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:108)
	at org.springframework.security.web.FilterChainProxy.lambda$doFilterInternal$3(FilterChainProxy.java:231)
	at org.springframework.security.web.ObservationFilterChainDecorator$FilterObservation$SimpleFilterObservation.lambda$wrap$1(ObservationFilterChainDecorator.java:479)
	at org.springframework.security.web.ObservationFilterChainDecorator$AroundFilterObservation$SimpleAroundFilterObservation.lambda$wrap$1(ObservationFilterChainDecorator.java:340)
	at org.springframework.security.web.ObservationFilterChainDecorator.lambda$wrapSecured$0(ObservationFilterChainDecorator.java:82)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:128)
	at org.springframework.security.web.access.intercept.AuthorizationFilter.doFilter(AuthorizationFilter.java:100)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:240)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:227)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:137)
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:126)
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:120)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:240)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:227)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:137)
	at com.cumulocity.microservice.security.filter.PostAuthenticateServletFilter$1.run(PostAuthenticateServletFilter.java:44)
	... 92 common frames omitted
Caused by: java.lang.NullPointerException: Cannot invoke "java.util.Map.size()" because "m" is null
	at java.base/java.util.HashMap.putMapEntries(HashMap.java:503)
	at java.base/java.util.HashMap.putAll(HashMap.java:791)
	at dynamic.mapping.controller.MonitoringController.getConnectorsStatus(MonitoringController.java:122)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:255)
	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:188)
	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:118)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:926)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:831)
	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1089)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:979)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1014)
	... 117 common frames omitted

2025-03-26T13:22:54.286Z  WARN 14 --- [omcat-handler-9] .m.s.t.CumulocityOAuthMicroserviceFilter : org.springframework.security.authentication.AuthenticationServiceException: Error on login attempt
2025-03-26T13:22:54.361Z ERROR 14 --- [omcat-handler-9] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception

java.lang.NullPointerException: Cannot invoke "org.springframework.security.web.AuthenticationEntryPoint.commence(jakarta.servlet.http.HttpServletRequest, jakarta.servlet.http.HttpServletResponse, org.springframework.security.core.AuthenticationException)" because "this.authenticationEntryPoint" is null
	at com.cumulocity.microservice.security.token.CumulocityOAuthMicroserviceFilter.doFilter(CumulocityOAuthMicroserviceFilter.java:89)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:240)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:227)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:137)
	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:107)
	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:93)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:240)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:227)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:137)
	at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)
	at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:240)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:227)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:137)
	at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:62)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:240)
	at org.springframework.security.web.ObservationFilterChainDecorator$AroundFilterObservation$SimpleAroundFilterObservation.lambda$wrap$0(ObservationFilterChainDecorator.java:323)
	at org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:224)
	at org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:137)
	at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:233)
	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:191)
	at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:113)
	at org.springframework.web.servlet.handler.HandlerMappingIntrospector.lambda$createCacheFilter$3(HandlerMappingIntrospector.java:195)
	at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:113)
	at org.springframework.web.filter.CompositeFilter.doFilter(CompositeFilter.java:74)
	at org.springframework.security.config.annotation.web.configuration.WebMvcSecurityConfiguration$CompositeFilterChainProxy.doFilter(WebMvcSecurityConfiguration.java:230)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:362)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:278)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.springframework.web.filter.ServerHttpObservationFilter.doFilterInternal(ServerHttpObservationFilter.java:113)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:483)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
	at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:731)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:384)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:905)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1741)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
	at java.base/java.lang.VirtualThread.run(VirtualThread.java:329)


The issue was that an “old” mapping got inconsistent during migration. Therfor a required field mappingTopic for mappings were empty leading into some very bad chain of errors that in the end the microservice could not be properly initialized.

Solution: Delete the “old” mapping, restart the microservice, re-create the mapping now properly.

We will fix that the mapper will stop initializing if just one mapping is inconsistent. It should be just ignored with a warning in the log file.

Stefan, thank you for solving this issue. The dynamic-mapper now works again. I could re-create the connector again and the mapper could connect to our mqtt-broker.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.