Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:3.0
Mapping documents:hello/Category.hbm.xml
Full stack trace of any exception that occurs:
Exception in thread "main" org.hibernate.MappingException: Error reading resourc
e: hello/Category.hbm.xml
at org.hibernate.cfg.Configuration.addResource(Configuration.java:433)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1213)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1169)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1097)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1083)
at console.ConsoleRunner.getSessionFactory(ConsoleRunner.java:28)
at console.ConsoleRunner.persistMessage(ConsoleRunner.java:12)
at console.ConsoleRunner.main(ConsoleRunner.java:34)
Caused by: org.hibernate.MappingException: duplicate import: hello.Category
at org.hibernate.cfg.Mappings.addImport(Mappings.java:100)
at org.hibernate.cfg.HbmBinder.bindClass(HbmBinder.java:153)
at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:426)
at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:1848)
at org.hibernate.cfg.Configuration.add(Configuration.java:344)
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:382
)
at org.hibernate.cfg.Configuration.addResource(Configuration.java:430)
... 7 more
Name and version of the database you are using:MySQL