-
Bug
-
Resolution: Won't Do
-
Major
-
None
-
7.1.0.CR1
-
None
Please find the hibernate native api tests located at :
The tests are working fine with a workaround I have applied to them,hence I would like to request you to run the HibernateNativeAPITransactionTestCase locally to see the issue I have been mentioning before.
Also , please comment the workaround as follows before running the test in order to hit around the issue:
In file SFSBHibernateTransaction please comment:
// configuration.setProperty("hibernate.listeners.envers.autoRegister", "false");
I am simply initialising BootstrapServiceRegistryBuilder and then passing the configuration properties to it to initialize the ServiceRegistry.
I am not using any AuditListner or @Audited anywhere in my configuration/code.
However when I initialize ServiceRegistry it by default AUTORegisters/detects the EnversIntegrator which tries to initialise AuditListner via Auditconfiguration and crashes.
The workaround to this is to set the AUTO_REGISTER in EnversIntegrator to false as above.
Stacktrace:
... 139 more
Caused by: org.hibernate.MappingException: Unable to create AuditStrategy[org.hibernate.envers.strategy.DefaultAuditStrategy] instance.
at org.hibernate.envers.configuration.AuditConfiguration.initializeAuditStrategy(AuditConfiguration.java:114)
at org.hibernate.envers.configuration.AuditConfiguration.<init>(AuditConfiguration.java:101)
at org.hibernate.envers.configuration.AuditConfiguration.getFor(AuditConfiguration.java:135)
at org.hibernate.envers.event.EnversIntegrator.integrate(EnversIntegrator.java:63)
at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:295) [hibernate-core-4.0.0.Final.jar:4.0.0.Final]
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1737) [hibernate-core-4.0.0.Final.jar:4.0.0.Final]
at org.jboss.as.test.integration.hibernate.SFSBHibernateTransaction.setupConfig(SFSBHibernateTransaction.java:81) [beans.jar:]