Details
-
Bug
-
Resolution: Done
-
Major
-
7.0.2.Final
Description
I'm migrating an EE application from AS6 to AS7.0.2.Final.
My app is bundled as an EAR. The persistence xml references entities with the jar-file xml element but it seems the jar files are not scanned at all!
The persistence.xml file is inside an ejb-jar module and the jar files are in the ear lib directory.
I also tried to setup Hibernate 3 thinking that the version 4 bundled with the server could be the problem but I have the same result.
(was working with JBoss AS 6.0.0.Final)
<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_2_0.xsd"
version="2.0">
<persistence-unit name="acme">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:/acmeDatasource</jta-data-source>
<jar-file>lib/acme-release-domain-0.0.1-SNAPSHOT.jar</jar-file>
<jar-file>lib/acme-lvs-domain-0.0.1-SNAPSHOT.jar</jar-file>
<jar-file>lib/acme-rmd-domain-0.0.1-SNAPSHOT.jar</jar-file>
<jar-file>lib/acme-another-domain-0.0.1-SNAPSHOT.jar</jar-file>
<jar-file>lib/acme-parties-domain-0.0.1-SNAPSHOT.jar</jar-file>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect" />
<!-- TODO define a m2 profile to filter this out -->
<property name="hibernate.hbm2ddl.auto" value="create-drop" />
<property name="hibernate.show_sql" value="true" />
<property name="hibernate.format_sql" value="true" />
<property name="javax.persistence.validation.group.pre-update" value="com.acme.validation.MyPersistRules"/>
<property name="jboss.entity.manager.factory.jndi.name" value="java:/acmeEntityManagerFactory" />
<property name="hibernate.ejb.interceptor" value="com.acme.interceptor.EntityMaintenanceFieldsInterceptor" />
</properties>
</persistence-unit>
</persistence>