Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error : No row with the given identifier exists

 
Abdul Kader
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I am getting the following exception in hibernate when I am loading the application in the test server. However I am not getting any exception in my development server. Can you please update if you know the solution or the root cause.


com.xyz.sspglobal.admin.dao.AdminDaoException: No row with the given identifier exists: 307, of class: com.xyz.sspglobal.admin.models.BusinessInfo; nested exception is net.sf.hibernate.UnresolvableObjectException: No row with the given identifier exists: 307, of class: com.xyz.sspglobal.admin.models.BusinessInfo: org.springframework.orm.hibernate.HibernateObjectRetrievalFailureException: No row with the given identifier exists: 307, of class: com.xyz.sspglobal.admin.models.BusinessInfo; nested exception is net.sf.hibernate.UnresolvableObjectException: No row with the given identifier exists: 307, of class: com.xyz.sspglobal.admin.models.BusinessInfo
at com.xyz.sspglobal.admin.dao.HbBusinessDao.loadSB(HbBusinessDao.java:25)
at com.xyz.sspglobal.admin.AdminBusinessManagerImpl.reload(AdminBusinessManagerImpl.java:49)
at com.xyz.sspglobal.admin.AdminBusinessManagerImpl.init(AdminBusinessManagerImpl.java:40)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:996)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:966)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:354)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:223)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:277)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:312)
at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:82)
at org.springframework.context.support.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:67)
at com.xyz.reuse.spring.util.BeanRetrieveUtil.retrieveContext(BeanRetrieveUtil.java:40)
at com.xyz.reuse.spring.SpringSupportManager.init(SpringSupportManager.java:42)
at com.xyz.reuse.framework.AppModuleLoader.initModule(AppModuleLoader.java:69)
at com.xyz.reuse.framework.AppModuleLoader.init(AppModuleLoader.java:49)
at com.xyz.reuse.framework.WebApp2.loadAppModules(WebApp2.java:110)
at com.xyz.reuse.framework.WebApp2.init(WebApp2.java:68)
at com.xyz.reuse.framework.WebServlet$WebAppInitializer.run(WebServlet.java:102)
at java.lang.Thread.run(Thread.java:568)

[ July 03, 2007: Message edited by: Yousuff Mohammed ]
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No row with the given identifier exists: 307, of class: com.xyz.sspglobal.admin.models.BusinessInfo;

Looks like you are trying to populate an object called BusinessInfo with the ID of 307 that doesn't exist in the database.
 
Charan kumar sarvepalli
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am also getting same exception that is seems to be happening because of ehcache.

The id which it is showing was changed object and updated,
it does not exists no more in data base. But it trying to load those objects (i think those objects are may be resided in cache).


 
Charan kumar sarvepalli
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
not-found = "ignore" is added to <one-to-many> element to avoid the exception then works fine.
 
John Landon
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Charan kumar sarvepalli wrote:not-found = "ignore" is added to <one-to-many> element to avoid the exception then works fine.


I am having same exception but not-found = "ignore" does not compile.
Anyone can explain this exception?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic