-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: org.hibernate.DuplicateMappingException
PostPosted: Wed Oct 24, 2007 3:09 am 
Newbie

Joined: Wed Oct 24, 2007 2:19 am
Posts: 2
Hi All,
i am using hibernate with resin3 server, when i restart resin server and try to log-in into my site first time, login fails because of this exception.


%%%% Error Creating SessionFactory %%%%
org.hibernate.MappingException: Could not read mappings from resource: com/buyspace/hibernate/UpperMenu.hbm.xml
at org.hibernate.cfg.Configuration.addResource(Configuration.java:485)
at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1465)
at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1433)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1414)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1390)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1310)
at com.buyspace.dao.factory.HibernateSessionFactory.currentSession(HibernateSessionFactory.java:50)
at com.buyspace.users.dao.MySqlRatailerMasterDAO.getUser(MySqlRatailerMasterDAO.java:82)
at com.buyspace.users.action.LoginAction.login(LoginAction.java:105)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.talentbeat.talent.actions.DispatchAction.perform(DispatchAction.java:236)
at com.talentbeat.talent.action.ActionServlet.processActionPerform(ActionServlet.java:1787)
at com.talentbeat.talent.action.ActionServlet.process(ActionServlet.java:1586)
at com.talentbeat.talent.action.ActionServlet.doPost(ActionServlet.java:510)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:154)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:92)
at com.caucho.server.dispatch.ServletFilterChain.doFilter(ServletFilterChain.java:106)
at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:173)
at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:229)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:274)
at com.caucho.server.port.TcpConnection.run(TcpConnection.java:511)
at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:516)
at com.caucho.util.ThreadPool.run(ThreadPool.java:442)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.hibernate.DuplicateMappingException: Duplicate class/entity mapping com.buyspace.hibernate.UpperMenuTO
at org.hibernate.cfg.Mappings.addClass(Mappings.java:118)
at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:154)
at org.hibernate.cfg.Configuration.add(Configuration.java:386)
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:427)
at org.hibernate.cfg.Configuration.addResource(Configuration.java:482)
... 26 more

But i am not using duplicate entries for UpperMenu.hbm.xml. i tryied to change the order of hbm.xml file in hibernate.cfg.xml but still i am getting this error for the first hbm.xml file i add.
e.g
<mapping resource="com/buyspace/hibernate/User.hbm.xml" />
<mapping resource="com/buyspace/hibernate/RetailerMaster.hbm.xml" />
<mapping resource="com/buyspace/hibernate/UserType.hbm.xml" />
<mapping resource="com/buyspace/hibernate/UpperMenu.hbm.xml" />

in this case i get same error for User.hbm.xml


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.