Exception in thread \"main\" org.hibernate.InvalidMappingException: Could not parse mapping document from resource com/lara/Person.hbm.xml
at org.hibernate.cfg.C
InvalidmappingException arise in some condition please to read carefully
we will use instead of id tag we use then this exception occur definitely.
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 .
SQLGrammarException arise when orthis column name not exact match to corresponding database filed.