#14352·pinpoint

StackOverflowError on re-login in Pinpoint Web with custom Spring Security

Author: feiflyCreated Sep 23, 2026Updated Sep 30, 2026

Describe the bug

Pinpoint Web 3.1, after enabling custom Spring Security authentication. The first login after server startup works fine. But after clearing browser cookie & cache, re-login triggers StackOverflowError. The stack shows infinite recursive call between ProviderManager.authenticate() and ResourceBundleMessageSource.getMessage().

To Reproduce

  1. Enable custom authentication in pinpoint web (add DaoAuthenticationProvider, UserDetailsService)
  2. Start pinpoint web server, login successfully for the first time.
  3. Clear browser cookies/cache, open incognito window.
  4. Submit login form, server throws StackOverflowError.

Stack trace

java.lang.StackOverflowError at org.springframework.context.support.ResourceBundleMessageSource.getResourceBundle (ResourceBundleMessageSource.java:201) at org.springframework.context.support.ResourceBundleMessageSource.resolveCodeWithoutArguments (ResourceBundleMessageSource.java:152) at org.springframework.context.support.AbstractMessageSource.getMessageInternal (AbstractMessageSource.java:224) at org.springframework.context.support.AbstractMessageSource.getMessage (AbstractMessageSource.java:142) at org.springframework.context.support.AbstractApplicationContext.getMessage (AbstractApplicationContext.java:1506) at org.springframework.context.support.MessageSourceAccessor.getMessage (MessageSourceAccessor.java:87) at org.springframework.security.authentication.dao.DaoAuthenticationProvider.additionalAuthenticationChecks (DaoAuthenticationProvider.java:107) at org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider.authenticate (AbstractUserDetailsAuthenticationProvider.java:150) at org.springframework.security.authentication.ProviderManager.authenticate (ProviderManager.java:182) ... repeated infinite Proxy169.authenticate loop

Expected behavior

Login should work normally after clearing cookies, no stack overflow.

Environment

  • Pinpoint version: 3.1
  • JDK: JDK17
  • OS: openEuler20.03

Additional context: The root cause seems to be conflict between custom global ResourceBundleMessageSource bean and SpringSecurity's SpringSecurityMessageSource. When DaoAuthenticationProvider tries to resolve error message by getMessage(), loading resource bundle triggers authentication again, forming infinite recursion. Removing the globally registered messageSource bean fixes this problem.