1 Reply Latest reply on May 30, 2008 10:27 PM by Matt Davis

    Conversational bean not found on any scope

    Vinicius Carvalho Newbie

      Hello there I'm creating a search component using my own extended datamodel.
      But after clicking on search button, I get an exception:

      /search.xhtml @27,55 binding="#{searchBean.dataTable}": Target Unreachable, identifier 'searchBean' resolved to null"

      The debug pages shows my component searchBean on the conversational scope, why is this happening?


      public class SearchResultsBean {
              private Log log;
              private String queryString;
              private Boolean isExactPhrase = false;
              private Query query;
          @In(required = false)
          @Out(required = false)
              private UIData dataTable;
              private SearchHitDataModel dataModel;
              private DocumentSearchStrategy searchStrategy = new DocumentSearchStrategy();
              public void init(){
                      log.info("Iniciando objeto de busca");
                      this.dataTable = new UIData();
              public void search(){
                      try {
                              query = QueryBuilder.buildQuery(queryString, isExactPhrase);
                              dataModel = new SearchHitDataModel(query);
                      } catch (ParseException e) {


      <ui:define name="body">
        <h:messages globalOnly="true" styleClass="message"/>
       <h:form id="searchForm" styleClass="edit">
               <h:inputText value="#{searchBean.queryString}"></h:inputText>
               <h:commandButton id="searchBtn" 
              <f:facet name="header">Resultados</f:facet>
                <div class="results">
                <h:dataTable id="resultsTable" var="hit"
                            rows="10" binding="#{searchBean.dataTable}"
                                      <h:outputText value="#{hit.title}"/><br/>
                                      <h:outputText value="#{hit.contents}"/>
                <rich:datascroller for="resultsTable" align="left"/>

        • 1. Re: Conversational bean not found on any scope
          Matt Davis Newbie

          This error most commonly occurs when you're using a bean that is in a package hierarchy with no seam.properties file at the base.

          That file is a marker for seam to let it know that there are entities in the packages and it should scan them.

          That said, I've struggled with this error even when I have the seam.properties file. One time it was a problem with my deployment... it wasn't putting the class files in the ejb jar for some reason.

          I'd suggest checking your actual deployed code to ensure that you have the .class file for your entity bean in the correct package, and that there is a seam.properties file at the base.