Caused by:org.hibernate.ObjectNotFoundException:No row with
来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/11/07 21:37:18
Caused by:org.hibernate.ObjectNotFoundException:No row with the given identifier exists:[cn.ipanel.itd.asset.entity.UserView2#1602]
\x05at org.hibernate.impl.SessionFactoryImpl$1.handleEntityNotFound(SessionFactoryImpl.java:377)
\x05at org.hibernate.proxy.AbstractLazyInitializer.checkTargetState(AbstractLazyInitializer.java:79)
\x05at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:68)
\x05at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:111)
\x05at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:150)
\x05at cn.ipanel.itd.asset.entity.UserView2$$EnhancerByCGLIB$$7314bb97.getToDay()
\x05at sun.reflect.GeneratedMethodAccessor321.invoke(Unknown Source)
\x05at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
\x05at java.lang.reflect.Method.invoke(Method.java:585)
\x05at org.directwebremoting.impl.PropertyDescriptorProperty.getValue(PropertyDescriptorProperty.java:62)
\x05...36 more
\x05at org.hibernate.impl.SessionFactoryImpl$1.handleEntityNotFound(SessionFactoryImpl.java:377)
\x05at org.hibernate.proxy.AbstractLazyInitializer.checkTargetState(AbstractLazyInitializer.java:79)
\x05at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:68)
\x05at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:111)
\x05at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:150)
\x05at cn.ipanel.itd.asset.entity.UserView2$$EnhancerByCGLIB$$7314bb97.getToDay()
\x05at sun.reflect.GeneratedMethodAccessor321.invoke(Unknown Source)
\x05at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
\x05at java.lang.reflect.Method.invoke(Method.java:585)
\x05at org.directwebremoting.impl.PropertyDescriptorProperty.getValue(PropertyDescriptorProperty.java:62)
\x05...36 more
楼主用了opensessioninview机制吗,
刷新出现这个错误,莫非你页面还有查询数据库的代码?!
一般view,control,Po三层分离,用onpensessioninview不会出现这种问题
_____________________________________________
hibernate二级缓存没有用吗,你删除怎么删的是
先查询到某个po然后删的吧
Po po=dao.findby(id);
dao.delete(po);
或者用session直接删除po吧,那么应该不会有错,
然后你没有用spring的hibernateTempter话,应该用一个
Transcation ta=session.beginTranscation();
Po po=dao.findby(id);
dao.delete(po);
ta.commit();
事务把删除事务包装起来,再不行楼主
do?showlist中的代码贴出来或者发给我我可以帮你看看
刷新出现这个错误,莫非你页面还有查询数据库的代码?!
一般view,control,Po三层分离,用onpensessioninview不会出现这种问题
_____________________________________________
hibernate二级缓存没有用吗,你删除怎么删的是
先查询到某个po然后删的吧
Po po=dao.findby(id);
dao.delete(po);
或者用session直接删除po吧,那么应该不会有错,
然后你没有用spring的hibernateTempter话,应该用一个
Transcation ta=session.beginTranscation();
Po po=dao.findby(id);
dao.delete(po);
ta.commit();
事务把删除事务包装起来,再不行楼主
do?showlist中的代码贴出来或者发给我我可以帮你看看
Caused by:org.hibernate.ObjectNotFoundException:No row with
org.hibernate.Session是什么
Exception in thread "main" org.hibernate.HibernateException:
org.hibernate.HibernateException:createCriteria is not valid
org.hibernate.HibernateException: Could not find datasource
org.hibernate.hql.ast.QuerySyntaxException:3Q
javax.persistence.PersistenceException: org.hibernate.except
org.hibernate.exception.SQLGrammarException:could not execut
org.hibernate.hql.ast.QuerySyntaxException: expecting OPEN,
org.hibernate.hql.ast.QuerySyntaxException:, found '>' near
be connected with BE CAUSED BY 区别
org.hibernate.mappingException:Could not read mappings from