更新你的hibernate 的版本吧! 我怀疑是老版本的一个BUG

解决方案 »

  1.   

    我用的是myeclipse 6.0啊,这个不是最新的吗
      

  2.   

    表字段id为java.lang.String;
    查询的xu.id 值为java.lang.int
    查询语句错误!
      

  3.   

    ls的意思是说:
    <property   name="id"   type="java.lang.String"> 
           <column   name="ID"   not-null="true"   /> 
    </property> 
    和你的HQL语句
    HQL:from   XsxtUser   xu   where   xu.id=456 
    根本不匹配。一个是string一个是int。(真服了cowboy了。眼真细)解决方法:改一个呗~!!
      

  4.   

    HQL:from       XsxtUser       xu       where       xu.id='456'
    这样怎么样?
    还是一样的不行   
      

  5.   

    另。更换hibernate包试过了吗?(竹子的方法)