-->
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: Mapping OK, execute failed
PostPosted: Mon Apr 16, 2007 3:28 am 
Newbie

Joined: Sat Jan 13, 2007 1:43 am
Posts: 5
Hello Hibernate members!

I am using MyEclipse to mapping a schema on OracleAS Portal - PORTAL, after mapping process I try to get all rows from a table inside but something wrong happended like following! I don't know why?

07/04/16 14:20:49 %%%% Error Creating SessionFactory %%%%

org.hibernate.MappingException: Could not read mappings from resource: com/ncs/survey/portaldb/model/WwsecPerson.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.ncs.survey.portaldb.factory.HibernateSessionFactory.rebuildSessionFactory(HibernateSessionFactory.java:59)

at com.ncs.survey.portaldb.factory.HibernateSessionFactory.getSession(HibernateSessionFactory.java:43)

at com.ncs.survey.portaldb.model.BaseHibernateDAO.getSession(BaseHibernateDAO.java:14)

at com.ncs.survey.portaldb.model.WwsecPersonDAO.findByProperty(WwsecPersonDAO.java:135)

at com.ncs.survey.portaldb.model.WwsecPersonDAO.findByUserName(WwsecPersonDAO.java:162)

at _nss._surveyuser._jspService(surveyuser.jsp:202)

at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:57)

at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:347)

at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)

at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)

at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)

at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:649)

at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322)

at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:251)

at oracle.portal.provider.v2.render.http.AbstractResourceRenderer.renderBody(Unknown Source)

at oracle.portal.provider.v2.render.RenderManager.render(Unknown Source)

at oracle.portal.provider.v2.DefaultPortletInstance.render(Unknown Source)

at oracle.webdb.provider.v2.adapter.soapV1.ProviderAdapter.showPortlet(Unknown Source)

at oracle.webdb.provider.v2.adapter.soapV1.ProviderAdapter.handleHttp(Unknown Source)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java)

at oracle.webdb.provider.v2.adapter.SOAPServlet.doHTTPCall(Unknown Source)

at oracle.webdb.provider.v2.adapter.SOAPServlet.service(Unknown Source)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)

at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)

at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:649)

at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322)

at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)

at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)

at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)

at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)

at java.lang.Thread.run(Thread.java:534)

Caused by: org.hibernate.DuplicateMappingException: Duplicate collection role mapping com.ncs.survey.portaldb.model.WwsecPerson.wwsecFlats

at org.hibernate.DuplicateMappingException.<init>(DuplicateMappingException.java:16)

at org.hibernate.cfg.Mappings.addCollection(Mappings.java:124)

at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2030)

at org.hibernate.cfg.HbmBinder.createClassProperties(HbmBinder.java:2006)

at org.hibernate.cfg.HbmBinder.bindRootPersistentClassCommonValues(HbmBinder.java:368)

at org.hibernate.cfg.HbmBinder.bindRootClass(HbmBinder.java:283)

at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:153)

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)

... 42 more





While the code of this method is:
public List getAll() {
List lstResult = null;

try {
Query query = getSession().createQuery("SELECT * FROM WwsecPerson");
lstResult = query.list();
}
catch (Exception ex) {
System.out.println("Exception: " + ex.getMessage());
}
return lstResult;
}


Does Hibernate allow get data from a table contain $ character?


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.