[hibernate-issues] [Hibernate-JIRA] Resolved: (METAGEN-58) Subsequent processing rounds are trying to reprocess Entities that are already processed, this causes an error.

Hardy Ferentschik (JIRA) noreply at atlassian.com
Mon Jan 16 09:42:10 EST 2012


     [ http://opensource.atlassian.com/projects/hibernate/browse/METAGEN-58?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hardy Ferentschik resolved METAGEN-58.
--------------------------------------

       Resolution: Cannot Reproduce
    Fix Version/s:     (was: 1.2.next)

The test passes for me (after fixing a compilation problem in the test class) and both classes _CarAudit_ and _Car__ got generated.

Also the setup in the pom is imo not optimal. I would use the maven annotation processor to configure the annotation processors and specify _proc:none_ for the default compiler plugin. I would also configure the annotation processor runs separately making it easier to understand which processors are getting run.

> Subsequent processing rounds are trying to reprocess Entities that are already processed, this causes an error.
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: METAGEN-58
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/METAGEN-58
>             Project: Hibernate Metamodel Generator
>          Issue Type: Bug
>          Components: processor
>    Affects Versions: 1.1.1.Final
>         Environment: jdk1.6.0_23, Eclipse 3.6, Maven 2, Hibernate version 3.6.1.Final, MS SQL 2005.
>            Reporter: Viet Trinh
>            Assignee: Hardy Ferentschik
>            Priority: Minor
>
> I have an entity named "Car" and another processor that creates another entity name "CarAudit".
> After the first round, the class "Car_" and class "CarAudit" are created, therefore causing a subsequent round of processing since "CarAudit" is marked with @Entity.
> However, the second round fails with the following error:
> "diagnostic error: Problem with Filer: Attempt to recreate a file for type com.example.Car_"
> This is due to not clearing the "metaEntities" list from the context object after every round. Each processing round will use the same processor and context object and try to create all of the meta entries listed in the context during each round.
> My proposed solution is to clear the metaEntities list from the context object after each round of processing.
> Sorry, I do not have a test case for this right now.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list