org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.getSession': 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/DispatcherPortlet: In this case, use RequestContextListener or RequestContextFilter to expose the current request.

Stack Overflow | Iwan Ivanto | 3 months ago
  1. 0

    How to implements Application Listener on spring 4.3.2

    Stack Overflow | 3 months ago | Iwan Ivanto
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.getSession': 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/DispatcherPortlet: In this case, use RequestContextListener or RequestContextFilter to expose the current request.
  2. 0

    Error creating bean scoped in spring application using Neo4j and Scheduled processes

    GitHub | 7 months ago | zeroberto
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.getSession': 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/DispatcherPortlet: In this case, use RequestContextListener or RequestContextFilter to expose the current request.
  3. 0

    Hystrix stopped working behind Zuul Proxy

    GitHub | 2 years ago | NickPadilla
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.oauth2ClientContext': 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/DispatcherPortlet: In this case, use RequestContextListener or RequestContextFilter to expose the current request.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Exception thrown in EventBus.unsubscribe after close a browser window

    GitHub | 3 years ago | LukaszByczynski
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.sessionEventBus': 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/DispatcherPortlet: In this case, use RequestContextListener or RequestContextFilter to expose the current request.
  6. 0

    How to delete session data at a regular time interval, every hour?

    Stack Overflow | 4 years ago | Tiny
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.sessionTokenCleanerService': 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/DispatcherPortlet: In this case, use RequestContextListener or RequestContextFilter to expose the current request.

  1. Andreas Häber 1 times, last 1 month ago
  2. serious2monkeys 6 times, last 4 months ago
4 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. 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/DispatcherPortlet: In this case, use RequestContextListener or RequestContextFilter to expose the current request.

    at org.springframework.web.context.request.RequestContextHolder.currentRequestAttributes()
  2. Spring
    SessionScope.get
    1. org.springframework.web.context.request.RequestContextHolder.currentRequestAttributes(RequestContextHolder.java:131)[spring-web-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    2. org.springframework.web.context.request.SessionScope.get(SessionScope.java:91)[spring-web-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    2 frames
  3. Spring Beans
    AbstractBeanFactory.getBean
    1. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:340)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    2. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    2 frames
  4. Spring AOP
    JdkDynamicAopProxy.invoke
    1. org.springframework.aop.target.SimpleBeanTargetSource.getTarget(SimpleBeanTargetSource.java:35)[spring-aop-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:192)[spring-aop-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    2 frames
  5. com.sun.proxy
    $Proxy61.getTransaction
    1. com.sun.proxy.$Proxy61.getTransaction(Unknown Source)[na:na]
    1 frame
  6. Spring Data Neo4j - Transactions
    Neo4jTransactionManager.getTransaction
    1. org.springframework.data.neo4j.transaction.Neo4jTransactionStatus.<init>(Neo4jTransactionStatus.java:44)[spring-data-neo4j-4.1.2.RELEASE.jar:na]
    2. org.springframework.data.neo4j.transaction.Neo4jTransactionManager.getTransaction(Neo4jTransactionManager.java:42)[spring-data-neo4j-4.1.2.RELEASE.jar:na]
    2 frames
  7. Spring Tx
    TransactionInterceptor.invoke
    1. org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:426)[spring-tx-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    2. org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:275)[spring-tx-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    3. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)[spring-tx-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    3 frames
  8. Spring AOP
    JdkDynamicAopProxy.invoke
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)[spring-aop-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)[spring-aop-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    2 frames
  9. com.sun.proxy
    $Proxy75.initMasterData
    1. com.sun.proxy.$Proxy75.initMasterData(Unknown Source)[na:na]
    1 frame
  10. com.test
    ApplicationStartup.onApplicationEvent
    1. com.test.ApplicationStartup.onApplicationEvent(ApplicationStartup.java:20)[classes/:na]
    2. com.test.ApplicationStartup.onApplicationEvent(ApplicationStartup.java:1)[classes/:na]
    2 frames
  11. Spring Context
    AbstractApplicationContext.finishRefresh
    1. org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:166)[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    2. org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:138)[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    3. org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:382)[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    4. org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:336)[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    5. org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:877)[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    5 frames
  12. Spring Boot
    EmbeddedWebApplicationContext.finishRefresh
    1. org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:144)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
    1 frame
  13. Spring Context
    AbstractApplicationContext.refresh
    1. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:544)[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
    1 frame
  14. Spring Boot
    SpringApplication.run
    1. org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
    2. org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
    3. org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:369)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
    4. org.springframework.boot.SpringApplication.run(SpringApplication.java:313)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
    5. org.springframework.boot.SpringApplication.run(SpringApplication.java:1185)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
    6. org.springframework.boot.SpringApplication.run(SpringApplication.java:1174)[spring-boot-1.4.0.RELEASE.jar:1.4.0.RELEASE]
    6 frames
  15. com.test
    ElasticsearchNeo1Application.main
    1. com.test.ElasticsearchNeo1Application.main(ElasticsearchNeo1Application.java:19)[classes/:na]
    1 frame