SourceForge.net Logo
Main Overview Wiki Issues Forum Build Fisheye
Issue Details (XML | Word | Printable)

Key: CMP-552
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Shay Banon
Reporter: Lauri
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Compass

org.hibernate.ObjectNotFoundException should be handled gracefully in ScrollableHibernateIndexEntitiesIndexer

Created: 24/Feb/08 07:10 AM   Updated: 24/Feb/08 03:04 PM
Component/s: Compass::Gps
Affects Version/s: 2.0.0 M2
Fix Version/s: 2.0.0 M3


 Description  « Hide
If I delete a row from the data base while the index is being built, an exception appears:

Caused by: org.hibernate.ObjectNotFoundException: No row with the given identifier exists: com.mycompany.MyBusinessObject#17365
at org.hibernate.impl.SessionFactoryImpl$1.handleEntityNotFound(SessionFactoryImpl .java:377)
at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener. java:145)
at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventLi stener.java:195)
at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListene r.java:103)
at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:878)
at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:846)
at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:557)
at org.hibernate.type.EntityType.resolve(EntityType.java:379)
at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:116) at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:854)
at org.hibernate.loader.Loader.loadSingleRow(Loader.java:288)
at org.hibernate.impl.ScrollableResultsImpl.prepareCurrentRow(ScrollableResultsImp l.java:231)
at org.hibernate.impl.ScrollableResultsImpl.next(ScrollableResultsImpl.java:100)
at org.compass.gps.device.hibernate.indexer.ScrollableHibernateIndexEntitiesIndexe r.performIndex(ScrollableHibernateIndexEntitiesIndexer.java:120)
... 11 more

This causes the whole indexing process to stop.

It would be very useful to me if org.hibernate.ObjectNotFoundException would be handled in a way that does not cause the indexing to stop. An error message would be sufficient.



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.