读书人

hibernate duplicate import,种重名

发布时间: 2012-08-22 09:50:35 作者: rapoo

hibernate duplicate import,类重名
严重: Exception sending context initialized event to listener instance of class com.htsoft.core.web.listener.StartupListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [conf/app-resources.xml]: Invocation of init method failed; nested exception is org.hibernate.DuplicateMappingException: duplicate import: WorkPlan refers to both com.htsoft.oa.model.work.WorkPlan and com.htsoft.oa.model.task.WorkPlan (try using auto-import="false")

关键是duplicate import

我在不同的包里有相同的类名,所以报错了```

改掉其中一个类名就可以了

黑色头发:http://heisetoufa.iteye.com/

读书人网 >软件架构设计

热点推荐