错误org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [com.fsti.doms.core.model.persistent.Dictionar

 [INFO ] http-8080-Processor21 2008-03-24 10:15:47,656 org.hibernate.event.def.DefaultLoadEventListener     - Error performing load command
org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [com.fsti.doms.core.model.persistent.DictionaryItem#110588]
 at org.hibernate.ObjectNotFoundException.throwIfNull(ObjectNotFoundException.java:27)
 at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:118)
 at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:167)
 at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:79)
 at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:655)
 at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:261)
 at org.hibernate.type.EntityType.resolve(EntityType.java:286)
 at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:105)
 at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:530)
 at org.hibernate.loader.Loader.doQuery(Loader.java:436)
 at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:218)
 at org.hibernate.loader.Loader.doList(Loader.java:1593)
 at org.hibernate.loader.Loader.list(Loader.java:1577)
 at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:395)
 at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:271)
 at org.hibernate.impl.SessionImpl.list(SessionImpl.java:844)
 at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)
 at org.springframework.orm.hibernate3.HibernateTemplate$29.doInHibernate(HibernateTemplate.java:826)
 at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:365)
 at org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:817)
 at com.fsti.doms.core.dao.impl.MaterialHbnDaoImpl.queryMaterial(MaterialHbnDaoImpl.java:70)
 at com.fsti.doms.core.service.impl.MaterialServiceImpl.queryMaterial(MaterialServiceImpl.java:93)
 at com.fsti.doms.baseinfo.action.materialaction.QueryMaterialAction.execute(QueryMaterialAction.java:47)
 at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
 at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
 at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
 at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 at com.fsti.commons.web.filter.ZhEncoderFilter.doFilter(ZhEncoderFilter.java:57)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
 at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
 at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
 at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
 at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
 at java.lang.Thread.run(Thread.java:595)

 

原因是由于在一张物资表mm中对应的.hbm.xml文件中引用了字典表dict对应的model(DictionaryItem)

而在dict表中少了一条记录110588(主键)

因此报错(当查询涉及到110588这条记录的时候就报错误,比如对mm表进行全部查询的时候)

解决方法:加上此条记录就可以了

你可能感兴趣的:(oracle相关)