在我的Web应用程序中使用hibernate3时,我们在NullPointerException
中获得了org.hibernate.engine.loading.CollectionLoadContext.getLoadingCollection(CollectionLoadContext.java:108)
。我们为每个请求(Thread)使用单独的hibernate Session
。
StatefulPersistenceContext.getEntry()
在上面返回null。
见例外:
java.lang.NullPointerException
at org.hibernate.engine.loading.CollectionLoadContext.getLoadingCollection(CollectionLoadContext.java:108)
at org.hibernate.loader.Loader.readCollectionElement(Loader.java:1003)
at org.hibernate.loader.Loader.readCollectionElements(Loader.java:646)
at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:591)
at org.hibernate.loader.Loader.doQuery(Loader.java:701)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
at org.hibernate.loader.Loader.doList(Loader.java:2213)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
at org.hibernate.loader.Loader.list(Loader.java:2099)
at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:94)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1569)
at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:283)
at com.sibisoft.northstar.events.service.EventReservationService.getReservationsByEventId(EventReservationService.java:1075)
at com.sibisoft.northstar.events.service.EventSeatingService.getGuestCountsGroupBySchedule(EventSeatingService.java:832)...