1 of 1 people found this helpful
that's most probably a bug.
Could you create a JIRA issue and attach the patch there, and assign it to me?
I'll apply the patch as soon as I get home (which hopefully won't involve any volcanoes this time )
Did you maybe create a JIRA for that?
Hi Adam, welcome back!
Not yet! I´m working on it.
I saw that the patch was commited.
I get the similar error ,
Caused by: org.hibernate.MappingException: @AuditMappedBy points to a property that doesn't exist: x.y.EnityClass.auditMappedByProperty
but at a different point.
ClassesAuditingData.updateCalculatedFields() line: 69
EntitiesConfigurator.configure(Configuration, ReflectionManager, GlobalConfiguration, AuditEntitiesConfiguration, Document, Element) line: 84
AuditConfiguration.<init>(Configuration) line: 86
AuditConfiguration.getFor(Configuration) line: 99
CustomAuditEventListener(AuditEventListener).initialize(Configuration) line: 335
EventListeners$1.processListener(Object) line: 198
EventListeners.processListeners(EventListeners$ListenerProcesser) line: 181
EventListeners.initializeListeners(Configuration) line: 194
AnnotationConfiguration(Configuration).getInitializedEventListeners() line: 1396
AnnotationConfiguration(Configuration).buildSessionFactory() line: 1385
AnnotationConfiguration.buildSessionFactory() line: 954
Ejb3Configuration.buildEntityManagerFactory() line: 892
HibernatePersistence.createContainerEntityManagerFactory(PersistenceUnitInfo, Map) line: 74
I am using hibernate 3.5.6.
To me it doesnt explains, how could you, not get this error, but the error which Hernan reported.
This could only happen, if it was introduced in the later builds of 3.5.2 (where HHH-5191 is fixed), and Hernan still uses 3.5.2 and not the later builds where it is was introduced.
The reason I say this is because, If You see the Call Hierarchy of CollectionMetaDataGenerator.getMappedBy, it would collide on EntitiesConfigurator.configure at line number 100.
Whereas the error I get occurs much before in EntitiesConfigurator.configure at line number 84.
As a workaround, I could still not use auditmappedby annotation, and live with the assosiation table.
But, Please help provide a solution.
ClassesAuditingData.java.zip 1.4 KB
I just Attached the Modifed ClassesAuditingData.java file. This helps solve the problem I mentioned. Could this be accepted as a patch in 3.5.6 ?. Please let me know, the feedback on the patch.
There's no more development for the 3.5 branch unforutnately.
Hello Adam .. Thanks for the reply ..
I took a look at the source code of 4.0.1. It looks like the same problem would occur in the ClassesAuditingData.java. The problem would still prevail.
If you could confirm this to be a problem, then it is possible to track the issue on Jira. I have attached the ClassesAuditingData.java with my previous posting. It works well with my use case. May be, it could be accepted as a possible solution.
Please let me know.
Can you try creating an Envers test case demonstrating the problem and attaching it to JIRA?