title: Primefaces 2.2.1 to 3.0.1 Upgrade Issue with Mapping/Locating Spring Managed Beans
body: <p><strong>Background:</strong></p>
  
  <p>I'm using the below two classes (Search.java and SearchBean.java) in a Primefaces web application (version 2.2.1). All of my classes in the <code>com.actions</code> package are request scoped beans that handle the business logic in my application (actionListeners, Listeners, etc).  The classes in the <code>com.beans</code> package are all session scoped beans that maintain state about the application. Each request scoped has an instance of a session scoped bean injected using CDI and each are managed by Spring.</p>
  
  <p><strong>Issue:</strong></p>
  
  <p>When I upgraded to 3.0.1 the classes are not getting registered by Primefaces and I get an error message like <em>Property 'test' not found on type com.actions.Search</em>.  This happens on every single method that's mapped from a Primefaces component to either the request or session beans below. Any ideas on what are the appropriate changes?</p>
  
  <p><strong>Exception:</strong></p>
  
  <pre><code>javax.el.ELException: /WEB-INF/facelet/components/test.xhtml: Property 'process' not found on type com.actions.Search
  com.sun.faces.facelets.compiler.AttributeInstruction.write(AttributeInstruction.java:94)
      com.sun.faces.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java:82)
      com.sun.faces.facelets.compiler.UILeaf.encodeAll(UILeaf.java:183)
      javax.faces.render.Renderer.encodeChildren(Renderer.java:168)
      javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:853)
      javax.faces.component.UIComponent.encodeAll(UIComponent.java:1652)
      javax.faces.component.UIComponent.encodeAll(UIComponent.java:1655)
      javax.faces.component.UIComponent.encodeAll(UIComponent.java:1655)
      javax.faces.component.UIComponent.encodeAll(UIComponent.java:1655)
      com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:399)
      com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
      com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)
      com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
      com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:313)
      org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79)
      org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:115)
      org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
      org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
      com.dc.api.service.impl.CacheControlFilter.doFilter(CacheControlFilter.java:31)
      com.dc.api.service.impl.HttpsCookieFilter.doFilter(HttpsCookieFilter.java:46)
  </code></pre>
  
  <p>Class that handles business logic and holds an instance of a session scoped bean</p>
  
  <pre><code>package com.actions;
  
  import javax.inject.Inject;
  import javax.inject.Named;
  import org.springframework.context.annotation.Scope;
  import com.beans.SearchBean;
  
  @Named
  @Scope("request")
  public class Search{
      @Inject
      private SearchBean searchBean;
  
      public void process() { 
          //business logic here
          searchBean.get...
      }
  }
  </code></pre>
  
  <p>Bean that maintains data in session state</p>
  
  <pre><code>package com.beans;
  
  import javax.inject.Named;
  import org.springframework.context.annotation.Scope;
  
  @Named
  @Scope("session")
  public class SearchBean {
      private String text="test";
      //getters and setters
  }
  </code></pre>
  
  <p>The below alternate approach also is not working (just using one bean):</p>
  
  <pre><code>package com.actions;
  
  import org.springframework.context.annotation.Scope;
  import org.springframework.stereotype.Component;
  
  @Component
  @Scope("session")
  public class Search {
  
      public void sessionIdleListener() { 
      }
  }
  </code></pre>