0 Replies Latest reply: Apr 10, 2012 9:45 AM by Marco Brunelli RSS

CNFE:InfinispanRegionFactory   Bug when running jboss as7.1.1 with hibernate3 ?

Marco Brunelli Newbie

Following the thread https://community.jboss.org/message/726943 it looks like as there is a problem running jboss as7.1.1 with hibernate3. I tried out all the instructions given there to get jboss as7 running with hibernate3, trying to deploy a very basic ear file, however without success. Is there any example app ear or war that runs on jboss7 with hibernate 3? Or can anybody give a hint on what has to be done in order to get it working? Also I d be thankful for experiences of anybody who got any as7.xx running with hibernate 3

I have packaged

*hibernate-annotations

*hibernate-core

*hibernate-entitymanager

in the lib folder of the ear file and I am using following configs

 

persistence.xml:

 

<persistence xmlns="http://java.sun.com/xml/ns/persistence"

    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"

    version="1.0">

      <persistence-unit name="test">

        <provider>org.hibernate.ejb.HibernatePersistence</provider>

        <jta-data-source>java:jboss/datasources/testDS</jta-data-source>

        <class>test.TestEntity</class>

<properties>

            <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect" />

            <property name="hibernate.hbm2ddl.auto" value="validate" />

            <property name="hibernate.generate_statistics" value="true" />

              <property name="jboss.as.jpa.providerModule" value="hibernate3-bundled" />

              <property name="hibernate.cache.use_second_level_cache" value="false" />

   </properties>

</persistence-unit>

</persistence>

 

jboss-deployment-structure.xml:

 

<jboss-deployment-structure>

    <deployment name="myEar-ear.ear">

        <exclusions>

             <module name="org.hibernate" />

             <module name="org.hibernate.validator" />

        </exclusions>

    </deployment>

</jboss-deployment-structure>

 

modules/org/jboss/as/jpa/hibernate/3/module.xml:

 

<module xmlns="urn:jboss:module:1.1" name="org.jboss.as.jpa.hibernate" slot="3">

    <properties>

        <property name="jboss.api" value="private"/>

    </properties>

 

    <resources>

        <resource-root path="jboss-as-jpa-hibernate3-7.1.1.Final.jar"/>

        <!-- Insert resources here -->

    </resources>

 

    <dependencies>

        <module name="javax.annotation.api"/>

        <module name="javax.persistence.api"/>

        <module name="javax.transaction.api"/>

        <module name="org.hibernate" slot="3" optional="true" services="import"/>  <!-- org.hibernate:3 must be created manually with Hibernate 3 jars -->

        <module name="org.hibernate.validator"/>

        <module name="org.infinispan" optional="true"/>

        <module name="org.jboss.as.clustering.infinispan" optional="true"/>

        <module name="org.jboss.as.jpa.spi"/>

        <module name="org.jboss.as.naming"/>

        <module name="org.jboss.as.server"/>

        <module name="org.jboss.jandex"/>

        <module name="org.jboss.logging"/>

        <module name="org.jboss.msc"/>

        <module name="org.jboss.vfs"/>

    </dependencies>

</module>