org.hibernate.InvalidMappingException:Could not parse mapping document from resource com/lara/Person.hbm.xml

前端 未结 4 749
时光取名叫无心
时光取名叫无心 2020-12-12 01:35
Exception in thread \"main\" org.hibernate.InvalidMappingException: Could not parse mapping document from resource com/lara/Person.hbm.xml
    at org.hibernate.cfg.C         


        
4条回答
  •  囚心锁ツ
    2020-12-12 02:12

    InvalidmappingException arise in some condition please to read carefully

    1. we will use instead of id tag we use then this exception occur definitely.

    2. In Pojo class you declare data member like "name" in database u declare "name" ok then in mapping file u write just in brief terms we can say that like whatever u declare in id tag name attribute value its corresponding there is no data member in pojo class then only one error arise InvalidMappingException .

    3. SQLGrammarException arise when orthis column name not exact match to corresponding database filed.

提交回复
热议问题