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
|