[Hibernate-JIRA] Created: (HHH-3779) "org.hibernate.MappingException: An audited relation to a non-audited entity" during schema-export ant task
by Joe Spears (JIRA)
"org.hibernate.MappingException: An audited relation to a non-audited entity" during schema-export ant task
-----------------------------------------------------------------------------------------------------------
Key: HHH-3779
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3779
Project: Hibernate Core
Issue Type: Bug
Components: envers
Environment: hibernate version 3.3.1, annotations 3.4.0, em 3.4.0 envers latest snapshot (svn revision 16019)
Reporter: Joe Spears
Attachments: HHH3740-jlspea01-a.zip
This is a re-submit of symptoms described in HHH-3740.
This time, however, I cannot create a schema for an audited entity that has a manyToOne to a non audited entity using the Envers ant task. When I do, I get a org.hibernate.MappingException: An audited relation to a non-audited entity xxx.xxx
For example:
org.hibernate.MappingException: An audited relation to a non-audited entity com.mynamespace.MyNonAuditedClass!
at org.hibernate.tool.ant.HibernateToolTask.reportException(HibernateToolTask.java:226)
at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:189)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
at org.apache.tools.ant.Main.runBuild(Main.java:698)
at org.apache.tools.ant.Main.startAnt(Main.java:199)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: org.hibernate.MappingException: An audited relation to a non-audited entity com.mynamespace.MyNonAuditedClass!
at org.hibernate.envers.configuration.metadata.ToOneRelationMetadataGenerator.addToOne(ToOneRelationMetadataGenerator.java:59)
at org.hibernate.envers.configuration.metadata.AuditMetadataGenerator.addValue(AuditMetadataGenerator.java:126)
at org.hibernate.envers.configuration.metadata.AuditMetadataGenerator.addProperties(AuditMetadataGenerator.java:161)
at org.hibernate.envers.configuration.metadata.AuditMetadataGenerator.generateSecondPass(AuditMetadataGenerator.java:348)
at org.hibernate.envers.configuration.EntitiesConfigurator.configure(EntitiesConfigurator.java:96)
at org.hibernate.envers.configuration.AuditConfiguration.<init>(AuditConfiguration.java:86)
at org.hibernate.envers.configuration.AuditConfiguration.getFor(AuditConfiguration.java:99)
at org.hibernate.envers.ant.JPAConfigurationTaskWithEnvers.doConfiguration(JPAConfigurationTaskWithEnvers.java:36)
at org.hibernate.tool.ant.ConfigurationTask.getConfiguration(ConfigurationTask.java:55)
at org.hibernate.tool.ant.HibernateToolTask.getConfiguration(HibernateToolTask.java:302)
at org.hibernate.tool.ant.Hbm2DDLExporterTask.createExporter(Hbm2DDLExporterTask.java:51)
at org.hibernate.tool.ant.ExporterTask.execute(ExporterTask.java:39)
at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:186)
... 17 more
--- Nested Exception ---
org.hibernate.MappingException: An audited relation to a non-audited entity com.mynamespace.MyNonAuditedClass!
at org.hibernate.envers.configuration.metadata.ToOneRelationMetadataGenerator.addToOne(ToOneRelationMetadataGenerator.java:59)
at org.hibernate.envers.configuration.metadata.AuditMetadataGenerator.addValue(AuditMetadataGenerator.java:126)
at org.hibernate.envers.configuration.metadata.AuditMetadataGenerator.addProperties(AuditMetadataGenerator.java:161)
at org.hibernate.envers.configuration.metadata.AuditMetadataGenerator.generateSecondPass(AuditMetadataGenerator.java:348)
at org.hibernate.envers.configuration.EntitiesConfigurator.configure(EntitiesConfigurator.java:96)
at org.hibernate.envers.configuration.AuditConfiguration.<init>(AuditConfiguration.java:86)
at org.hibernate.envers.configuration.AuditConfiguration.getFor(AuditConfiguration.java:99)
at org.hibernate.envers.ant.JPAConfigurationTaskWithEnvers.doConfiguration(JPAConfigurationTaskWithEnvers.java:36)
at org.hibernate.tool.ant.ConfigurationTask.getConfiguration(ConfigurationTask.java:55)
at org.hibernate.tool.ant.HibernateToolTask.getConfiguration(HibernateToolTask.java:302)
at org.hibernate.tool.ant.Hbm2DDLExporterTask.createExporter(Hbm2DDLExporterTask.java:51)
at org.hibernate.tool.ant.ExporterTask.execute(ExporterTask.java:39)
at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:186)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
at org.apache.tools.ant.Main.runBuild(Main.java:698)
at org.apache.tools.ant.Main.startAnt(Main.java:199)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
My hope was that this issue was resolved in the current revision based on the feedback of HHH-3740, but when I compiled that revision I still got the stack-trace.
re-attaching my simple, simple ant project here (as I did before I discovered I cannot reopen HHH-3740)
--
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....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years
[Hibernate-JIRA] Created: (HHH-3049) Add the performance test attached to HHH-2645 to test suite
by Gail Badner (JIRA)
Add the performance test attached to HHH-2645 to test suite
-----------------------------------------------------------
Key: HHH-3049
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3049
Project: Hibernate3
Issue Type: Improvement
Components: testsuite
Reporter: Gail Badner
Assignee: Gail Badner
Fix For: 3.3
The performance test attached to HHH-2645 compares the following Map implementations used by org.hibernate.tuple.EntityModeToTuplizerMapping.:
Collections.synchronizedMap( new org.apache.commons.collections.SequencedHashMap() ) <= used in pre-3.2.6
org.apache.commons.collections.FastHashMap()
org.hibernate.util.FastHashMap <= used in 3.2.6
java.util.concurrent.ConcurrentHashMap() <= need Java 1.5 for this
new EDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap()
EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap()
This test should be added to the test suite as an integration test.
Reminder: Read Paul Cowan's comment from 16/Nov/07 for corrections to the attached test.
--
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....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years