|
Around line 13466, I see:
2013-11-21 10:34:37,574 TRACE [org.jboss.as.jpa.messages] (default task-1) returning global (module) Persistence Provider org.hibernate.jpa.HibernatePersistenceProvider 2013-11-21 10:34:37,574 TRACE [org.jboss.as.jpa.messages] (default task-1) returning global (module) Persistence Provider org.hibernate.ejb.HibernatePersistence 2013-11-21 10:34:37,577 WARN [org.hibernate.ejb.HibernatePersistence] (default task-1) HHH015016: Encountered a deprecated javax.persistence.spi.PersistenceProvider [org.hibernate.ejb.HibernatePersistence]; use [org.hibernate.jpa.HibernatePersistenceProvider] instead. 2013-11-21 10:34:37,579 WARN [org.hibernate.ejb.HibernatePersistence] (default task-1) HHH015016: Encountered a deprecated javax.persistence.spi.PersistenceProvider [org.hibernate.ejb.HibernatePersistence]; use [org.hibernate.jpa.HibernatePersistenceProvider] instead.
It looks like someone is calling Persistence.createEntityManagerFactory() which loops through all available persistence providers, until a match is found. From the above trace logging, I can see that the WildFly implementation of [javax.persistence.spi.PersistenceProviderResolverhttp://docs.oracle.com/javaee/6/api/javax/persistence/spi/PersistenceProviderResolver.html], is returning an ArrayList with org.hibernate.jpa.HibernatePersistenceProvider added first.
The javax.persistence.Persistence bootstrap code contains:
public static EntityManagerFactory createEntityManagerFactory(String persistenceUnitName, Map properties) {
EntityManagerFactory emf = null;
List<PersistenceProvider> providers = getProviders();
for ( PersistenceProvider provider : providers ) {
emf = provider.createEntityManagerFactory( persistenceUnitName, properties );
if ( emf != null ) {
break;
}
}
if ( emf == null ) {
throw new PersistenceException( "No Persistence provider for EntityManager named " + persistenceUnitName );
}
return emf;
}
You might have to set a breakpoint in the above code and see if this code is getting the warning and the order that the providers are processed in from the list.
|