-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: entities scanning issue in jboss as 7.0.2.Final
PostPosted: Wed Nov 02, 2011 1:31 pm 
Newbie

Joined: Mon Feb 07, 2011 12:21 pm
Posts: 8
I'm migrating an EE application from AS6 to AS7.0.2.Final (with HIB 4.0.0.CR2).

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!

Do I need to change something to make it work with Hib 4?

Thanks in advance

(The exact same file was working with Hib 3.6 on AS6)

Code:
<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>


Top
 Profile  
 
 Post subject: Re: entities scanning issue in jboss as 7.0.2.Final
PostPosted: Thu Nov 03, 2011 9:34 am 
Newbie

Joined: Mon Feb 07, 2011 12:21 pm
Posts: 8
It does not seem to be related to Hibernate but rather to JBoss AS7. Discussion resumes here http://community.jboss.org/message/634723#634723.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.