2 Replies Latest reply on Aug 7, 2009 2:33 PM by guy bashan

    Target Unreachable

    guy bashan Apprentice

      Hi,


      I have a simple form and simple converstion bean.
      When submitting the form I get  this exception:


      javax.servlet.ServletException: /signup.xhtml @41,87 value="#{company.name}": Target Unreachable, identifier 'company' resolved to null
              javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)
              org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
              org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
              org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
              org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
              org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
              org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
              org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              org.jboss.seam.web.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:42)
              org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
              org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
              org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)
              org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)
              org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
              org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
              org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)




      Does anyone know why it happen?

        • 1. Re: Target Unreachable
          Nicklas Karlsson Master

          Because you have no @Name(company) anywhere?

          • 2. Re: Target Unreachable
            guy bashan Apprentice

            Thanks for your answer.


            This is how my Company bean looks like:




            @Entity
            @Name("company")
            @Table(name="company")
            public class Company {
            
              @Id
              @Column(name="company_id")
              @GeneratedValue
              private Integer companyId;
            
              @Column(name="name")
              @NotNull
              @Length(min=2, max = 50)
              private String name;
            
              @Column(name="details")
              @NotNull
              @Length(max = 5000)
              private String details;
            
              @OneToMany(mappedBy = "company")
              @JoinColumn(name="company_id")
              private Set<User> users;
            
              public Company()
              {    
              }
            
              public Integer getCompanyId() {
                return companyId;
              }
            
              public void setCompanyId(Integer companyId) {
                this.companyId = companyId;
              }
            
              public String getName() {
                return name;
              }
            
              public void setName(String name) {
                this.name = name;
              }
            
              public String getDetails() {
                return details;
              }
            
              public void setDetails(String details) {
                this.details = details;
              }
            
              public Set<User> getUsers() {
                return users;
              }
            
              public void setUsers(Set<User> users) {
                this.users = users;
              }
            }