title: spring and hibernate integration with annotation causes PojoEntityTuplizer
body: <p>how can i solve this exception?
  Exception:</p>
  
  <pre><code>     Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [com/home/app/database/Hibernate-ctx.xml]: 
          Invocation of init method failed; nested exception is org.hibernate.HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer]
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)
              at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
              at org.spr......
  Caused by: org.hibernate.HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntityTuplizer]
      at org.hibernate.tuple.entity.EntityTuplizerFactory.constructTuplizer(EntityTuplizerFactory.java:108)
      at org.hibernate.tuple.entity.EntityTuplizerFactory.constructDefaultTuplizer(EntityTuplizerFactory.java:133)
  </code></pre>
  
  <p>model class:</p>
  
  <pre><code>@Entity
  @Table(name = "LOGIN")
  public class UserLogin extends Home implements Serializable {
  
      private static final long serialVersionUID = 1L;
      private Integer loginID;
      private String loginName;
      private String loginPassword;
  
      public UserLogin() {
      }
  
      @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY)
      @Column(name = "LOGIN_ID")
      public Integer getLoginID() {
          return this.loginID;
      }
  
      @Column(name = "LOGIN_NAME")
      public String getLoginName() {
          return loginName;
      }
  
      @Column(name = "LOGIN_PASSWORD")
      public String getLoginPassword() {
          return loginPassword;
      }
  </code></pre>
  
  <p>and it's corresponding setter method.</p>
  
  <p>spring context file:</p>
  
  <pre><code> &lt;context:annotation-config /&gt;
        &lt;context:component-scan base-package="com.home.app" /&gt;
        &lt;bean id="sessionFactory" 
              class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"&gt;        
                      &lt;property name="dataSource"&gt;
                          &lt;ref bean="dataSource" /&gt;
                      &lt;/property&gt;
  
  ...
  
      &lt;bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"&gt;
              &lt;property name="driverClassName" value="${jdbc.driverClassName}" /&gt;
              &lt;property name="url" value="${jdbc.url}" /&gt;
              &lt;property name="username" value="${jdbc.username}" /&gt;
              &lt;property name="password" value="${jdbc.password}" /&gt;
          &lt;/bean&gt;
  </code></pre>
  
  <p>query in mysql:</p>
  
  <pre><code>CREATE TABLE LOGIN
  (
  LOGIN_NAME varchar(255),
  LOGIN_PASSWORD varchar(255),
  LOGIN_ID int(11) not null
  );
  </code></pre>
  
  <p>DAO classes:</p>
  
  <pre><code>public class LoginDetailsDAOImpl implements LoginDetailsDAO {
      HibernateTemplate hibernateTemplate;
  
      public void setSessionFactory(SessionFactory sessionFactory)  {
          this.hibernateTemplate = new HibernateTemplate(sessionFactory);
      }
  
      @Transactional(readOnly = true)
      public List&lt;UserLogin&gt; loginDetails(UserLogin login) {
  
          return hibernateTemplate.find("from Login");
      }
  }
  </code></pre>