[jboss-jira] [JBoss JIRA] (AS7-3291) EnversIntegrator is always detected by default while initializing Serviceregistry using Native Hibernate API causing a MappingException even when Envers is not used

Strong Liu (JIRA) jira-events at lists.jboss.org
Thu Feb 2 16:19:48 EST 2012


     [ https://issues.jboss.org/browse/AS7-3291?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Strong Liu resolved AS7-3291.
-----------------------------

           Labels:   (was: eap6_prd_req)
    Fix Version/s:     (was: 7.1.1.Final)
       Resolution: Rejected


rejecting this one, since this doesn't require any AS code change, it is already fixed and will be released in hibernate core 4.1.0.

NOTE, this is totally a hibernate bug, I don't think we need a AS7 jira for it.
                
> EnversIntegrator is always detected by default while initializing Serviceregistry using Native Hibernate API causing a MappingException even when Envers is not used
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AS7-3291
>                 URL: https://issues.jboss.org/browse/AS7-3291
>             Project: Application Server 7
>          Issue Type: Bug
>          Components: JPA / Hibernate, Test Suite
>    Affects Versions: 7.1.0.CR1
>            Reporter: Madhumita Sadhukhan
>            Assignee: Strong Liu
>
>  Please find the hibernate native api tests located at :
> https://github.com/madhumita12/jboss-as/tree/master/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/hibernate
>      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:]

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list