java.lang.IllegalArgumentException: Principal must not be null Stack trace: java.lang.IllegalArgumentException: Principal must not be null

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
Expert tip

If you're unit testing, you should instantiate only the service and mock the dependencies. If you're testing integration, you should add all the mocking to the configurations file.

Solutions on the web

via Stack Overflow by Ali Dufour
, 1 year ago
Principal must not be null Stack trace: java.lang.IllegalArgumentException: Principal must not be null
via Stack Overflow by Green Lei
, 1 year ago
Null key returned for cache operation (maybe you are using named params on classes without debug info?) CacheableOperation[public java.lang.String com.eliteams.quick4j.web.service.ExcelDataService.getCarData()] caches=[movieFindCache] | key='#name' | condition='' | unless=''
via piemonte.it by Unknown author, 1 year ago
Bean object must not be null
java.lang.IllegalArgumentException: Principal must not be null Stack trace: java.lang.IllegalArgumentException: Principal must not be null
at org.springframework.boot.actuate.audit.AuditEvent.(AuditEvent.java:83)
at org.springframework.boot.actuate.audit.AuditEvent.(AuditEvent.java:59)
at org.springframework.boot.actuate.security.AuthenticationAuditListener.onAuthenticationFailureEvent(AuthenticationAuditListener.java:67)
at org.springframework.boot.actuate.security.AuthenticationAuditListener.onApplicationEvent(AuthenticationAuditListener.java:50)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:166)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:138)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:382)
at org.springframework.security.authentication.DefaultAuthenticationEventPublisher.publishAuthenticationFailure(DefaultAuthenticationEventPublisher.java:124)
at org.springframework.security.authentication.ProviderManager.prepareException(ProviderManager.java:240)
at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:233)
at org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter$AuthenticationManagerDelegator.authenticate(WebSecurityConfigurerAdapter.java:454)
at com.icentia.tracking.security.JwtFilter.doFilterInternal(JwtFilter.java:49)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
12 times, 1 day ago
Once, 8 months ago
Once, 9 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.