diff --git a/hibernate-core/src/main/java/org/hibernate/jpa/HibernatePersistenceProvider.java b/hibernate-core/src/main/java/org/hibernate/jpa/HibernatePersistenceProvider.java index cfbefbc7cd..3e4831ebfc 100755 --- a/hibernate-core/src/main/java/org/hibernate/jpa/HibernatePersistenceProvider.java +++ b/hibernate-core/src/main/java/org/hibernate/jpa/HibernatePersistenceProvider.java @@ -58,13 +58,11 @@ public class HibernatePersistenceProvider implements PersistenceProvider { return builder.build(); } } - catch (PersistenceException pe) { - throw pe; - } catch (Exception e) { - log.debug( "Unable to build entity manager factory", e ); - throw new PersistenceException( "Unable to build entity manager factory", e ); + log.debug( "Unable to create EntityManagerFactory", e ); } + + return null; } protected EntityManagerFactoryBuilder getEntityManagerFactoryBuilderOrNull(String persistenceUnitName, Map properties) {