title: Lazy Loadng error in JSON serializer
body: <p>I have such kind of @OneToOne Hibernate relationShip</p>
  
  <pre><code>public class Address implements Serializable {
  
      private String id;
      private String city;
      private String country;
  //setter getters ommitted
  }
  
  public class Student implements Serializable {
  
      private String id;
      private String firstName;
      private String lastName;    
      private Address address;
  }
  </code></pre>
  
  <p>address Item is mapped as LAZY.</p>
  
  <p>Now I want to fetch user and it's address using </p>
  
  <pre><code>session.load(Student.class,id);
  </code></pre>
  
  <p>In my daoService.</p>
  
  <p>Then I return it as JSON from my Spring MVC controller:</p>
  
  <pre><code>@RequestMapping(value="/getStudent.do",method=RequestMethod.POST)
      @ResponseBody
      public Student getStudent(@RequestParam("studentId") String id){
          Student student = daoService.getStudent(id);
          return student;
      }
  </code></pre>
  
  <p>Unfortunately, it's not working because of Lazy clasees and I fails with: </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: com.vanilla.objects.Student_$$_javassist_1["address"]-&gt;com.vanilla.objects.Address_$$_javassist_0["handler"])
      at org.codehaus.jackson.map.ser.StdSerializerProvider$1.serialize(StdSerializerProvider.java:62)
  </code></pre>
  
  <p>I do use OpenSessionInViewInterceptor and it works just fine.
  I understand that I can user left join HQL query and retrieve student and address that way and solve the problem. I also understand that changing relation to EAGER will solve it. </p>
  
  <p>But how can I serialize to JSON lazy classes using standard jackson message converter which of cause I added to my XML file. </p>