8 Replies Latest reply on Sep 5, 2010 11:46 AM by Jack Jia

    Target Unreachable, identifier (OBJECT) resolved to null

    Caedmon Judd Newbie

      We cannot get past this error:

      Target Unreachable, identifier '(OBJECT)' resolved to null

      OBJECT is any class we implement with SEAM.  When referenced by the web form, it dies and dumps this error.  Here's an example not including the entity classes.  It's just implementing a simple search routine over a database object named Tcompany.  Currently, it's returning all rows from the Tcompany for testing.


      public class TcompanyPersonList implements Serializable{
          EntityManager em;
          List<Tcompany> searchResults;
          Tcompany selectedCompany;
          String searchString;
          public String getsearchString() {
              return searchString;
          public void setsearchString(String searchString) {
               this.searchString = searchString;
          @Begin(join = true)
          public String doSearch() {
               return "";
          private void updateResults() {
               try {
                    List<Tcompany> results = em.createNativeQuery("from Tcompany c").getResultList();
                    searchResults = results;
               } catch (Exception e) {
                    searchResults = null;
          public void reset() { }
          public void destroy() { }

      Web form:

      <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
      <ui:composition xmlns="http://www.w3.org/1999/xhtml"
      <ui:define name="body">
          <h:messages globalOnly="true" styleClass="message" id="globalMessages"/>
          <h:form id="tcompanySearch" styleClass="edit">
              <rich:simpleTogglePanel label="Contact Search" switchType="ajax">
                  <s:decorate template="layout/display.xhtml">
                      <ui:define name="label">Company Name</ui:define>
                      <h:inputText id="cname" value="#{TcompanyPersonList.searchString}"/>
                   <div class="actionButtons">
                       <h:commandButton id="search" value="Search" action="#{TcompanyPersonList.doSearch}"/>

      Anything type of object we implement returns the error.