[java] Initial SessionFactory creation failed.org.hibernate.InvalidMappingException: Could not parse mapping document from resource events/Event.hbm.xml [java] Exception in thread "main" java.lang.ExceptionInInitializerError [java] at util.HibernateUtil.<clinit>(Unknown Source) [java] at events.EventManager.createAndStoreEvent(Unknown Source) [java] at events.EventManager.main(Unknown Source) [java] Caused by: org.hibernate.InvalidMappingException: Could not parse mapping document from resource events/Event.hbm.xml
i could not able to find root cause of the problem.
I faced this problem as I had put a paramater name in the <id > tag. e.g:- <id name="custid"> where as my java class didn't have a parameter called custid. It got resolved when I set the correct parameter in name attribute of <id tag.