title: JSON mapping exception: No serializer found for the class
body: <p>I am using spring MVC with restful web services (JACKSON). I have table called p_project which has 3 columns. id, region_id, name. region_id referneces to region table. My entity is as shown in the code.</p>
  
  <pre><code>@Entity
  @XmlRootElement(name="project")
  @Table(name = "P_PROJECT")
  @NamedQueries( {
  
      @NamedQuery(name = "Project.findAll", 
                  query = "select p from Project p order by lower(p.name)", 
                  hints = { 
                           @QueryHint(name = "org.hibernate.cacheable", value = "true") 
                          }
                  ) 
  })
  public class Project extends AbstractSimpleNameEntity&lt;Integer&gt; implements Serializable
  {
  
  private Region region;
  
  private String name;
  
  public Project()
  {
      super();
  }
  
  public Project(Integer id)
  {
      super(id);
  }
  
  public Project(String name)
  {
      super(name);
  }
  
  @Id
  @Column(name = "ID")
  @GeneratedValue(generator = "P_PROJECT_SEQ", strategy = GenerationType.SEQUENCE)
  @SequenceGenerator(name = "P_PROJECT_SEQ", sequenceName = "P_PROJECT_SEQ",    allocationSize = 1)
  public Integer getId()
  {
      return id;
  }
  
  
              @ManyToOne(fetch = FetchType.LAZY)
              @JoinColumn(name = "REGION_ID")
              public Region getRegion() {
                              return region;
              }
  
              public void setRegion(Region region) {
                              this.region = region;
              }
  
  @Column(name = "NAME")
  public String getName()
  {
      return name;
  }
  }
  </code></pre>
  
  <p>While fetching all the project i am getting the following error. Can some one please help?</p>
  
  <pre><code>org.codehaus.jackson.map.JsonMappingException: No serializer found for class       
  org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer and no properties   
  discovered to create BeanSerializer (to avoid exception, disable 
  SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS) ) (through reference chain: 
  java.util.ArrayList[0]-&gt;com.sony.prince.entity.Project["region"]-&gt;
      com.sony.prince.entity.Region_$$_javassist_2["hibernateLazyInitializer"])
  </code></pre>