The spec says that calls to javax.persistence.spi.PersistenceProvider#createEntityManagerFactory should return null rather than throwing an exception when the EMF cannot be built.
There are cases where we do not do that currently