[hibernate-issues] [Hibernate-JIRA] Created: (HSEARCH-146) ObjectLoader doesn't catch javax.persistence.EntityNotFoundException

Christian Bauer (JIRA) noreply at atlassian.com
Sun Jan 6 10:34:55 EST 2008


ObjectLoader doesn't catch javax.persistence.EntityNotFoundException
--------------------------------------------------------------------

                 Key: HSEARCH-146
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-146
             Project: Hibernate Search
          Issue Type: Bug
          Components: engine
            Reporter: Christian Bauer


If an entity id is present in the search index but not in the database, this exception bubbles up to the top and the app crashes:

Caused by: javax.persistence.EntityNotFoundException: Unable to find org.jboss.seam.wiki.core.model.WikiDocument with id 1330
        at org.hibernate.ejb.Ejb3Configuration$Ejb3EntityNotFoundDelegate.handleEntityNotFound(Ejb3Configuration.java:109)
        at org.hibernate.proxy.AbstractLazyInitializer.checkTargetState(AbstractLazyInitializer.java:79)
        at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:68)
        at org.hibernate.Hibernate.initialize(Hibernate.java:306)
        at org.hibernate.search.engine.ObjectLoader.load(ObjectLoader.java:49)
        at org.hibernate.search.query.FullTextQueryImpl.list(FullTextQueryImpl.java:244)
        at org.jboss.seam.wiki.core.search.WikiSearch.executeSearch(WikiSearch.java:186)

The code in ObjectLoader.java is supposed to prevent this but it only catches org.hibernate.ObjectNotFoundException.



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the hibernate-issues mailing list