我用S2SH合成的一个项目,在修改时出现以下错误,哪位高手帮忙解决下?The server encountered an internal error () that prevented it from fulfilling this request.
exception 
org.springframework.dao.InvalidDataAccessApiUsageException: The given object has a null identifier: com.ztcx.pet.petinfo.pojo.Petinfo; nested exception is org.hibernate.TransientObjectException: The given object has a null identifier: com.ztcx.pet.petinfo.pojo.Petinfo

解决方案 »

  1.   

    The given object has a null identifier id 为空
      

  2.   

    没有更对信息无法确定,不是struts2的问题,是你配置没有弄好或者没有取得ID的值
      

  3.   

    是你的mapping文件中配置的主键的创建方式不对。
    注意,如果在Hibernate中设置了主键由数据库生成的话,那数据库一定要设置主键自动增长。
      

  4.   

    com.ztcx.pet.petinfo.pojo.Petinfo 
    这个实体的id为空。你的前台页面上没有传它的值,用个hidden
      

  5.   

    看一下这个文件com.ztcx.pet.petinfo.pojo.Petinfo 说有一个空的标识符,看一下是传的值有问题还是映射的问题