public void Query()
{
    String hql ="from examples.Cat c where cat_id like '3%'";    //正常(cat_id是主键)
   //String hql ="from examples.Cat c where name like '%name%'"; //使用这句则报下面的错.   Query query = psession.createQuery(hql);
   List l = query .list();
   Iterator  lst = l.iterator();
   while (lst.hasNext())
   {
      Cat c1 = (Cat) lst.next();
      System.out.println(c1.getName());
   }
}