title: No serializer found for class org.hibernate.proxy.pojo.javassist.Javassist?
body: <p>I am working on <code>SpringMVC</code>, <code>Hibernate</code> &amp; <code>JSON</code> but I am getting this error. </p>
  
  <pre><code>HTTP Status 500 - Could not write JSON: No serializer found for class org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationConfig.SerializationFeature.FAIL_ON_EMPTY_BEANS) ) 
  </code></pre>
  
  <p>Please check my Entity below</p>
  
  <pre><code>    @Entity
  @Table(name="USERS")
  public class User {
  
      @Id
      @GeneratedValue
      @Column(name="USER_ID")
      private Integer userId;
  
      @Column(name="USER_FIRST_NAME")
      private String firstName;
  
      @Column(name="USER_LAST_NAME")
      private String lastName;
  
  
      @Column(name="USER_MIDDLE_NAME")
      private String middleName;
  
      @Column(name="USER_EMAIL_ID")
      private String emailId;
  
      @Column(name="USER_PHONE_NO")
      private Integer phoneNo;
  
      @Column(name="USER_PASSWORD")
      private String password;
  
      @Column(name="USER_CONF_PASSWORD")
      private String  confPassword;
  
      @Transient
      private String token;
  
      @Column(name="USER_CREATED_ON")
      private Date createdOn;
  
      @OneToMany(fetch=FetchType.EAGER,cascade=CascadeType.ALL)
      @Fetch(value = FetchMode.SUBSELECT)
      @JoinTable(name = "USER_ROLES", joinColumns = { @JoinColumn(name = "USER_ID") }, inverseJoinColumns = { @JoinColumn(name = "ROLE_ID") })
      private List&lt;ActifioRoles&gt; userRole = new ArrayList&lt;ActifioRoles&gt;();
  
  
      @OneToMany(fetch=FetchType.EAGER,cascade=CascadeType.ALL,mappedBy="userDetails")
      @Fetch(value = FetchMode.SUBSELECT)
      private List&lt;com.actifio.domain.Address&gt; userAddress = new ArrayList&lt;com.actifio.domain.Address&gt;();
  
      @OneToOne(cascade=CascadeType.ALL)
      private Tenant tenantDetails;
  
  
      public Integer getUserId() {
          return userId;
      }
      public void setUserId(Integer userId) {
          this.userId = userId;
      }
      public String getFirstName() {
          return firstName;
      }
      public void setFirstName(String firstName) {
          this.firstName = firstName;
      }
      public String getLastName() {
          return lastName;
      }
      public void setLastName(String lastName) {
          this.lastName = lastName;
      }
      public String getEmailId() {
          return emailId;
      }
      public void setEmailId(String emailId) {
          this.emailId = emailId;
      }
      public String getPassword() {
          return password;
      }
      public void setPassword(String password) {
          this.password = password;
      }
      public String getConfPassword() {
          return confPassword;
      }
      public void setConfPassword(String confPassword) {
          this.confPassword = confPassword;
      }
      public Date getCreatedOn() {
          return createdOn;
      }
      public void setCreatedOn(Date createdOn) {
          this.createdOn = createdOn;
      }
  
      public List&lt;ActifioRoles&gt; getUserRole() {
          return userRole;
      }
  
      public void setUserRole(List&lt;ActifioRoles&gt; userRole) {
          this.userRole = userRole;
      }
      public String getMiddleName() {
          return middleName;
      }
      public void setMiddleName(String middleName) {
          this.middleName = middleName;
      }
      public Integer getPhoneNo() {
          return phoneNo;
      }
      public void setPhoneNo(Integer phoneNo) {
          this.phoneNo = phoneNo;
      }
  
      public List&lt;com.actifio.domain.Address&gt; getUserAddress() {
          return userAddress;
      }
      public void setUserAddress(List&lt;com.actifio.domain.Address&gt; userAddress) {
          this.userAddress = userAddress;
      }
      public Tenant getTenantDetails() {
          return tenantDetails;
      }
      public void setTenantDetails(Tenant tenantDetails) {
          this.tenantDetails = tenantDetails;
      }
      public String getToken() {
          return token;
      }
      public void setToken(String token) {
          this.token = token;
      }
  
      }
  </code></pre>
  
  <p>How can I Solve this?</p>