title: How to fix BeanCreateException for a request scope bean used with Spring MVC framework
body: <p>I define a bean with scope request and get an error when i start my application:</p>
  
  <blockquote>
    <p>"Cannot resolve reference to bean 'accountDS' while setting bean property 'accountDS'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'accountDS': <strong>Scope 'request' 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</strong>; nested exception is java.lang.IllegalStateException: No thread-bound request found"</p>
  </blockquote>
  
  <p>I am using this bean from within my controller which is a singleton. Is this why i can't get a request? If so how can i create a scoped proxy? I also have RequestContextListener in my web.xml but it doesn't help. </p>
  
  <pre><code>    &lt;listener&gt;
      &lt;listener-class&gt;org.springframework.web.context.request.RequestContextListener&lt;/listener-class&gt;
  &lt;/listener&gt;
  </code></pre>