Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Object Relational Mapping and the fly likes Impossible to retrieve entity Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Impossible to retrieve entity" Watch "Impossible to retrieve entity" New topic
Author

Impossible to retrieve entity

Vitaliy Kravchenko
Greenhorn

Joined: Dec 02, 2010
Posts: 10
I have a problem, with retrieving entity, I'm using Spring MVC + Hibernate.
I have a DAO layer

mapping....


Spring MVC controller


and I have got an error

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.orm.hibernate3.HibernateSystemException: identifier of an instance of jtforum.entites.Rank was altered from 1 to 1; nested exception is org.hibernate.HibernateException: identifier of an instance of jtforum.entites.Rank was altered from 1 to 1
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:656)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

root cause

org.springframework.orm.hibernate3.HibernateSystemException: identifier of an instance of jtforum.entites.Rank was altered from 1 to 1; nested exception is org.hibernate.HibernateException: identifier of an instance of jtforum.entites.Rank was altered from 1 to 1
org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:679)
org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)
org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411)
org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:912)
org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:904)
jtforum.dao.RankDAO.getAllRank(RankDAO.java:21)
ru.jt.forum.web.controller.RegistrationController.populateRank(RegistrationController.java:53)

I don't know what to do, for the first glance everything is ok,thanks
P.s. sorry for my English
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Impossible to retrieve entity
 
Similar Threads
exception while mapping boolean object to char table field
Issues with @PrimaryKeyJoinColumn
Hibernate System Exception
natural-id immutable problem
Problem with Updating Foreign key values