Hibernate Problem in saving records

hi guys
           i have a problem i want to try to save many entities in hibernate entities have also composite keys i am getting this exception on saving i tried to solve it but i couldn't any help would be appreciated

Thank You

at org.hibernate.type.AbstractType.getHashCode(AbstractType.java:112)
09:53:24,859 ERROR [STDERR]       at org.hibernate.type.AbstractType.getHashCode(AbstractType.java:120)
09:53:24,859 ERROR [STDERR]       at org.hibernate.type.EntityType.getHashCode(EntityType.java:402)
09:53:24,859 ERROR [STDERR]       at org.hibernate.type.ComponentType.getHashCode(ComponentType.java:162)
09:53:24,859 ERROR [STDERR]       at org.hibernate.engine.EntityKey.generateHashCode(EntityKey.java:103)
09:53:24,859 ERROR [STDERR]       at org.hibernate.engine.EntityKey.<init>(EntityKey.java:47)
09:53:24,859 ERROR [STDERR]       at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:147)
09:53:24,859 ERROR [STDERR]       at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:114)
09:53:24,859 ERROR [STDERR]       at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:186)
09:53:24,859 ERROR [STDERR]       at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:33)
09:53:24,859 ERROR [STDERR]       at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:175)
09:53:24,859 ERROR [STDERR]       at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:27)
09:53:24,859 ERROR [STDERR]       at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
09:53:24,859 ERROR [STDERR]       at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:530)
09:53:24,859 ERROR [STDERR]       at org.hibernate.impl.SessionImpl.save(SessionImpl.java:518)
09:53:24,859 ERROR [STDERR]       at org.hibernate.impl.SessionImpl.save(SessionImpl.java:514)
09:53:24,859 ERROR [STDERR]       at com.org.siteelf.shipping.dao.ShippingProfileZoneDAO.save(ShippingProfileZoneDAO.java:32)
09:53:24,859 ERROR [STDERR]       at com.org.siteelf.shipping.dao.ShippingProfileZoneHandler.save(ShippingProfileZoneHandler.java:38)
09:53:24,859 ERROR [STDERR]       at com.org.siteelf.shipping.dao.ShippingProfileZoneHandler.makeAction(ShippingProfileZoneHandler.java:160)
09:53:24,859 ERROR [STDERR]       at com.org.siteelf.shipping.businesslogic.ShippingProfileManager.addUpdateShippingProfile(ShippingProfileManager.java:160)
09:53:24,859 ERROR [STDERR]       at com.org.siteelf.shipping.businesslogic.ShippingProfileManager.processRequest(ShippingProfileManager.java:58)
09:53:24,859 ERROR [STDERR]       at com.org.siteelf.workflow.WorkProcessor.startFlow(WorkProcessor.java:87)
09:53:24,859 ERROR [STDERR]       at com.org.siteelf.shipping.businessdelegates.ShippingProfileDelegate.doBusinessService(ShippingProfileDelegate.java:202)
09:53:24,859 ERROR [STDERR]       at com.org.siteelf.shipping.businessdelegates.ShippingProfileDelegate.createRequest(ShippingProfileDelegate.java:128)
09:53:24,859 ERROR [STDERR]       at com.org.siteelf.customermanager.struts.actionforms.ControllerAction.execute(ControllerAction.java:217)
09:53:24,859 ERROR [STDERR]       at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
09:53:24,859 ERROR [STDERR]       at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
09:53:24,859 ERROR [STDERR]       at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
09:53:24,859 ERROR [STDERR]       at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
09:53:24,859 ERROR [STDERR]       at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
09:53:24,875 ERROR [STDERR]       at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
09:53:24,875 ERROR [STDERR]       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
09:53:24,875 ERROR [STDERR]       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
09:53:24,875 ERROR [STDERR]       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
09:53:24,875 ERROR [STDERR]       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
09:53:24,875 ERROR [STDERR]       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
09:53:24,875 ERROR [STDERR]       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
09:53:24,875 ERROR [STDERR]       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
09:53:24,875 ERROR [STDERR]       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
09:53:24,875 ERROR [STDERR]       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
09:53:24,875 ERROR [STDERR]       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
09:53:24,875 ERROR [STDERR]       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
09:53:24,875 ERROR [STDERR]       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
09:53:24,875 ERROR [STDERR]       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
09:53:24,875 ERROR [STDERR]       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
09:53:24,875 ERROR [STDERR]       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
09:53:24,875 ERROR [STDERR]       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
09:53:24,875 ERROR [STDERR]       at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
09:53:24,875 ERROR [STDERR]       at java.lang.Thread.run(Thread.java:595)
LVL 1
SiteElfAsked:
Who is Participating?
 
ulfreich2Connect With a Mentor Commented:
You should declare equals() and hashcode() methods for the persistent classes, which allow hibernate (and java in general) to differentiate 2 objects. Refer to: http://www.hibernate.org/109.html.
0
 
sanjoozCommented:
How about some description of your issue? Nobody can decipher your problem through the stack trace.
0
 
Computer101Commented:
Forced accept.

Computer101
EE Admin
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.