Uploaded image for project: 'Hibernate Search'
  1. HSEARCH-146

ObjectLoader doesn't catch javax.persistence.EntityNotFoundException

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects versions: 3.0.0.GA
    • Fix versions: 3.0.1.GA
    • Components: engine
    • Labels:
      None
    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              c.bauer Christian Bauer
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: