An error that occurs in Hibernate in Spring. The error message is as follows:

xiaoxiao2021-03-06  64

org.springframework.orm.hibernate.HibernateObjectRetrievalFailureException: No row with the given identifier exists: 2001, of class: com.hl.security.bo.Menu; nested exception is net.sf.hibernate.UnresolvableObjectException: No row with the given identifier Exists: 2001, of class: com.hl.security.bo.Menu

Net.sf.hibernate.unResolvableObjectException: No Row with the Given Identifier Exists: 2001, of class: com.hl.security.bo.Menu

At Net.sf.Hibernate.unResolvableObjectException.throwifnull (unresolvableObjectException.java: 38)

At Net.sf.Hibernate.Impl.Session Impl.InternalLoad (sessionimumpl.java: 1881)

At Net.sf.Hibernate.Type.ManyToonType.ResolveIdentifier (manytooetype.java: 68)

At Net.sf.Hibernate.Type.EntityType.ResolveIdentifier (entitytype.java: 215)

At Net.sf.Hibernate.Impl.Session Impl.initializeEntity (sessionimumpl.java: 2132)

At Net.sf.hibernate.Loader.Loader.doQuery (loadinger.java: 239)

At Net.sf.hibernate.Loader.Loader.doQueryandInitializenonlazyCollections (loadinger.java: 132)

At Net.sf.hibernate.Loader.Loader.Loadentity (loadinger.java: 830)

At Net.sf.hibernate.Loader.Loader.Loadentity (loadinger.java:850)

At Net.Sf.hibernate.Loader.EntityLoader.Load (EntityLoader.java: 57)

At Net.sf.hibernate.Loader.EntityLoader.Load (EntityLoader.java: 49)

At Net.sf.Hibernate.Persister.EntityPersister.load (EntityPersister.java: 420)

At Net.sf.Hibernate.impl.Session Impl.doload (sessionimumpl.java: 2014)

At Net.sf.Hibernate.impl.Session Impl.doloadbyClass (sessionimuml.java: 1918)

At Net.sf.Hibernate.Impl.Session Impl.Load (sessionimumpl.java: 1847)

At Org.SpringFramework.orm.hibernate.hibernateTemplate $ 3.Doinhibernate (HibernateTemplate.java: 198)

At Org.SpringFramework.orm.hibernate.hibernateTemplate.execute (HibernateTemplate.java: 150)

At Org.SpringFramework.orm.hibernate.HibernateTemplate.load (HibernateTemplate.java: 196) at com.hl.security.service.dao.imp.menudaOimp.FindbyMenuid (Menudaoimp.java: 19)

At com.hl.security.service.spring.securityServiceImp.FindByMenuid (SecurityServiceImp.java: 64)

... (Click for Full Stack TRACE) ...

At Org.SpringFramework.aop.framework.aopproxyutils.InvokeJoinPointUsingReflection (AopproxyUtils.java: 59)

At Org.SpringFramework.aop.framework.reflectiveMethodInvocation.InvokeJoinPoint (ReflectiveMethodInvocation.java: 149)

At Org.SpringFramework.aop.framework.reflectiveMethodInvocation.Proceed (ReflectiveMethodInvocation.java: 118)

At Org.SpringFramework.Transaction.Interceptor.Transaction Interceptor.invoke (Transaction Interceptor.java: 169)

At Org.SpringFramework.aop.framework.reflectiveMethodInvocation.Proceed (ReflectiveMethodInvocation.java: 138)

At Org.SpringFramework.Aop.Framework.jdkdyNamicaopProxy.Invoke (jdkdynamicaopproxy.java:148)

AT $ proxy0.FindByMenuid (Unknown Source)

At com.hl.security.Service.testiseCurityService.TestFindByMenuid (TestiseCurityService.java: 62)

...

wrong reason:

Data caused Hibernate error.

In a recursive data model, such as a table structure is as follows

ID, Name, ParentId, DESC.

Where data in the ParentID must be included in the ID column. If there is an exception.

The above fault will be reported when using Hibernate queries.

If you have this error, please check your data first!

转载请注明原文地址:https://www.9cbs.com/read-85773.html

New Post(0)