Buggy code:
public class PersistenceProviderImpl implements PersistenceProvider , ProviderUtil { static final String CLASS_TRANSFORMER_OPTIONS = "ClassTransformerOptions" ; private static final String EMF_POOL = "EntityManagerFactoryPool" ; private static final Localizer _loc = Localizer . forPackage ( PersistenceProviderImpl . class ) ; private Log _log ; public OpenJPAEntityManagerFactory createEntityManagerFactory ( String name , String resource , Map m ) { } private BrokerFactory getBrokerFactory ( ConfigurationProvider cp , Object poolValue , ClassLoader loader ) { } public OpenJPAEntityManagerFactory createEntityManagerFactory ( String name , Map m ) { } public OpenJPAEntityManagerFactory createContainerEntityManagerFactory ( PersistenceUnitInfo pui , Map m ) { PersistenceProductDerivation pd = new PersistenceProductDerivation ( ) ; try { Object poolValue = Configurations . removeProperty ( PersistenceProviderImpl . EMF_POOL , m ) ; ConfigurationProvider cp = pd . load ( pui , m ) ; if ( cp == null ) return null ; Exception transformerException = null ; String ctOpts = ( ( String ) ( Configurations . getProperty ( PersistenceProviderImpl . CLASS_TRANSFORMER_OPTIONS , pui . getProperties ( ) ) ) ) ; try { pui . addTransformer ( new PersistenceProviderImpl . ClassTransformerImpl ( cp , ctOpts , pui . getNewTempClassLoader ( ) , newConfigurationImpl ( ) ) ) ; } catch ( Exception e ) { transformerException = e ; } if ( ! ( Configurations . containsProperty ( KEY , cp . getProperties ( ) ) ) ) { cp . addProperty ( ( "openjpa." + ( BrokerValue . KEY ) ) , getDefaultBrokerAlias ( ) ) ; } BrokerFactory factory = getBrokerFactory ( cp , poolValue , pui . getClassLoader ( ) ) ; if ( transformerException != null ) { Log log = factory . getConfiguration ( ) . getLog ( LOG_RUNTIME ) ; if ( log . isTraceEnabled ( ) ) { log . warn ( PersistenceProviderImpl . _loc . get ( "transformer-registration-error-ex" , pui ) , transformerException ) ; } else { log . warn ( PersistenceProviderImpl . _loc . get ( "transformer-registration-error" , pui ) ) ; } } OpenJPAConfiguration conf = factory . getConfiguration ( ) ; <START_BUG> conf . setPuRootUrl ( pui . getPersistenceUnitRootUrl ( ) ) ; <END_BUG> _log = conf . getLog ( LOG_RUNTIME ) ; loadValidator ( _log , conf ) ; preloadMetaDataRepository ( factory ) ; return JPAFacadeHelper . toEntityManagerFactory ( factory ) ; } catch ( Exception e ) { throw PersistenceExceptions . toPersistenceException ( e ) ; } } public ProviderUtil getProviderUtil ( ) { } protected String getDefaultBrokerAlias ( ) { } protected OpenJPAConfiguration newConfigurationImpl ( ) { } private void preloadMetaDataRepository ( BrokerFactory factory ) { } private static class ClassTransformerImpl implements ClassTransformer { private final ClassFileTransformer _trans ; private ClassTransformerImpl ( ConfigurationProvider cp , String props , final ClassLoader tmpLoader , OpenJPAConfiguration conf ) { } public byte [ ] transform ( ClassLoader cl , String name , Class < ? > previousVersion , ProtectionDomain pd , byte [ ] bytes ) throws IllegalClassFormatException { } } private void loadAgent ( Log log , OpenJPAConfiguration conf ) { } private void loadValidator ( Log log , OpenJPAConfiguration conf ) { } public LoadState isLoaded ( Object obj ) { } public LoadState isLoadedWithReference ( Object obj , String attr ) { } public LoadState isLoadedWithoutReference ( Object obj , String attr ) { } }

Fix:
conf . setPersistenceUnitRootUrl ( pui . getPersistenceUnitRootUrl ( ) ) ;