[hibernate-issues] [Hibernate-JIRA] Commented: (HSEARCH-460) LazyInitializationException while removing entity with @ContainedIn annotation

Emmanuel Bernard (JIRA) noreply at atlassian.com
Thu Apr 8 04:14:42 EDT 2010


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

Emmanuel Bernard commented on HSEARCH-460:
------------------------------------------

The thing is, at this stage (beforeCompletion) the session is supposed to be opened (and HSEARCH relies on it). I cannot find why it is not.

> LazyInitializationException while removing entity with @ContainedIn annotation
> ------------------------------------------------------------------------------
>
>                 Key: HSEARCH-460
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-460
>             Project: Hibernate Search
>          Issue Type: Bug
>          Components: engine
>    Affects Versions: 3.1.1.GA
>            Reporter: Maciej Szulik
>         Attachments: hibsearch.zip, Lazy.stack
>
>
> I attach a Jboss Seam 2.2.0.GA project (without lib directory - one should take it entirely from seam default application generated using seam gen), as a complete illustration of the problem.
> The Problem itself:
> I have 2 entities:
> Color (Long id, String name, Set<Vehicle> vehicles) 
> and Vehicle (Long id, String name, Color color).
> Vehicle is indexed entity (@Indexed), while color has @ContainedIn on Set<Vehicle>.
> Problem arises while managing color objects, strictly speaking while removing colors, LazyInitalizationException is thrown (stack trace is in attachment).
> Every other operation on color entity (inserting, updating) works like a charm. 
> In attached example I created with a simple page for managing colors. It presents a list of already defined color objects in DB. If non present, you should generate some with 'Add random color'. To obtain above error click on 'Remove' link next to one of the colors presented on list.

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