[SOLVED] org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.sessionUserKeyHolder': Scope 'session' is not active for the current thread; consider defining a scoped proxy for this bean if you intend to refer to it from a singleton; nested exception is java.lang.IllegalStateException: No thread-bound request found: Are you referring to request attributes outside of an actual web request, or processing a request outside of the originally receiving thread? If you are actually operating within a web request and still receive this message, your code is probably running outside of DispatcherServlet: In this case, use RequestContextListener or RequestContextFilter to expose the current request.

Error added: 2020-10-18T09:36:42Z

0 people waiting for the answer...

1 answers found.

Answer 2618 (50.0% helpful)

SessionUserKeyHolder is already defined as @SessionScope.
I got this error when I added this config:

	@Bean(name = "applicationEventMulticaster")
	public ApplicationEventMulticaster simpleApplicationEventMulticaster() {
		SimpleApplicationEventMulticaster eventMulticaster = new SimpleApplicationEventMulticaster();

		eventMulticaster.setTaskExecutor(new SimpleAsyncTaskExecutor());
		return eventMulticaster;

No solution though :(

Add an answer/solution

If you know the answer, please add your own solution below.
If you don't know, but find out later, please come back and share your answer - there will be other people struggling with this too.

Please enter 61948 here

If you want to be notified via email when this is solved, enter your email address here: