[hibernate-issues] [Hibernate-JIRA] Commented: (HSEARCH-233) EntityNotFoundException during indexing

Hardy Ferentschik (JIRA) noreply at atlassian.com
Fri Nov 14 10:59:15 EST 2008


    [ http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-233?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=31717#action_31717 ] 

Hardy Ferentschik commented on HSEARCH-233:
-------------------------------------------

I have discussed this issue with Emmanuel and we think the only reason why an ENFE would be raised while indexing is because the data is broken (invalid foreign keys).
If so, the problem is not a bug, but should be fixable by correcting the Hibernate mapping and adding @NotFound(action=NotFoundAction.IGNORE) to the associations.

We were also discussing in which thread the exception got raised - the main execution thread or the async worker thread?
We think that an ENFE exception could only be raised during Document creation time which occurs in the main execution thread. We really wold need a stack trace or even better test case to make this behaviour reproducible. 

> EntityNotFoundException during indexing
> ---------------------------------------
>
>                 Key: HSEARCH-233
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-233
>             Project: Hibernate Search
>          Issue Type: Bug
>    Affects Versions: 3.0.1.GA
>         Environment: JBoss AS 4.2.2 Windows
>            Reporter: sam doyle
>            Assignee: Hardy Ferentschik
>             Fix For: 3.1.0.CR1
>
>         Attachments: jiraFiles.tar.gz, jiraFiles.tar.gz
>
>
> This is supposedly pretty basic functionality so perhaps it is my particular case that it is causing it.
> In the attachment files the EmtVenue class is the root of the indexing.
> It contains two @IndexedEmbedded
> @OneToMany( cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "emtVenue" )
>    @IndexedEmbedded
>    public Set<ClientGroupVenue> getClientGroupVenues()
> @Embedded
>    @ManyToOne( fetch = FetchType.LAZY )
>    @JoinColumns( { @JoinColumn( nullable = false, name = "HOST", referencedColumnName = "HOST" ),
>       @JoinColumn( nullable = false, name = "zone", referencedColumnName = "ZONE" ) } )
>    @NotNull
>    @IndexedEmbedded
>    public Zones getZones()
> In this case when I index EmtVenue the resulting index contains only values that correspond to Zones and no ClientGroupVenues.
> When I comment out the @IndexedEmbedded on the Zones the resulting index does show the categories. 
> One side note that might be of interest is indexing of Zones results in referencing some entities which don't exist that I'm catching due to the data not being in sync. 

-- 
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