title: Hibernate Query.list() is returning no value
body: <p>Hibernate Query.list() is returning no value. even it is generating proper query i have checked the value of sessionFactory also it is also printing nothing</p>
  
  
  
  <p></p>
  
  <p></p>
  
  <p></p>
  
  <pre><code>&lt;property name="hibernate.connection.driver_class"&gt;com.mysql.jdbc.Driver&lt;/property&gt;
  
  &lt;property name="hibernate.connection.url"&gt;jdbc:mysql://localhost:3306/es5&lt;/property&gt;
  
  &lt;property name="hibernate.connection.password"&gt;root&lt;/property&gt;
  
  &lt;property name="hibernate.connection.username"&gt;root&lt;/property&gt;
  
   &lt;property name="hibernate.connection.pool_size"&gt;10&lt;/property&gt;
  
   &lt;property name="show_sql"&gt;true&lt;/property&gt;
  
   &lt;property name="dialect"&gt;org.hibernate.dialect.MySQLDialect&lt;/property&gt;
  
   &lt;mapping resource="com/d2d/bean/hibernate.hbm.xml"/&gt;
  
   &lt;/session-factory&gt;
  </code></pre>
  
  <p></p>
  
  <p>package com.d2d.util;</p>
  
  <p>import org.hibernate.SessionFactory;
    import org.hibernate.cfg.Configuration;</p>
  
  <pre><code>public class HibernateSessionFactory 
   {
    static SessionFactory sf = null;
  
      static 
       {
          Configuration cfg = new Configuration();
         cfg  = cfg.configure("hibernate.cgf.xml");
  
  
          sf = cfg.buildSessionFactory();
           System.out.println(cfg);
         }
  
        public static SessionFactory getSessionFactory()
        {
             return sf;
          }
  
  
         }
  
  
  
  
  
  
  
      ****this is the class where i want to access persistance class****
  </code></pre>
  
  <p>package com.d2d.services;</p>
  
  <pre><code>import java.util.List;
  
    import org.hibernate.Criteria;
   import org.hibernate.Query;
   import org.hibernate.Session;
  import org.hibernate.SessionFactory;
  
   import com.d2d.bean.Seller;
   import com.d2d.util.HibernateSessionFactory;
   import com.d2d.util.HibernateTemplate;
  
    public class SellerManager 
     {
  
        static Seller seller;
      public static Seller getSellerFromId(String id)
      {
         seller = (Seller) HibernateTemplate.getObject(Seller.class, id);
           return       seller;
        }
  
      public static Seller  getSellerByEmail(String email)
      {
  
             SessionFactory sf =                     HibernateSessionFactory.getSessionFactory();
           Session session = sf.openSession();
  
  
  
            Query q =session.createQuery("FROM Seller s where s.email ='"+email+"'");
  
           System.out.println(sf);
            //-----this is printing nothing-----------
           List list = q.list();
  
              boolean status = false;
            Seller seller2 = null;
           for(int i=0;i&lt;list.size();i++)
           {
              Seller seller1 = (Seller)list.get(i);
              if(email.equals(seller1.getEmail()))
              {
                 status = true;
                 seller2 = seller1;                
              }
  
  
         }
          System.out.println("seller is"+seller2);
          return seller2;
  
  
  
         }
  
     }
  
  
  
  
        package com.d2d.util;
  
  import java.io.Serializable;
  
  import org.hibernate.Session;
  import org.hibernate.SessionFactory;
  import org.hibernate.Transaction;
  
  public class HibernateTemplate 
  {
  
      static SessionFactory sf = null ;
      public static Object  addObject(Object user)
       {
          Object id = null;
  
          System.out.println(user);
          try
          {
              System.out.println("add object start...");
  
              sf  = HibernateSessionFactory.getSessionFactory();
  
              Session session = sf.openSession();
  
              Transaction tx = session.beginTransaction();
              id = session.save(user);
              tx.commit();
              session.close();
          }
  
          catch(Exception ex)
          {
              System.out.println(ex);
          }
          return id;
  
       }  
      public static Object getObject(Class obj,Serializable id)
      {
          Object o = null; 
          try
           {
              SessionFactory sf = HibernateSessionFactory.getSessionFactory();
              Session session =  sf.openSession();
  
              Transaction tx = session.beginTransaction();
              o = session.load(obj, id);
              tx.commit();
              session.close();
  
  
           }
          catch(Exception ex)
          {
              System.out.println(ex);
          }
          return o;
  
      }
  
  }
     please help me out................
  </code></pre>