openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Linskey (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (OPENJPA-449) Under concurrent access, createEntityManager() fails with NPE.
Date Wed, 21 Nov 2007 03:40:44 GMT

     [ https://issues.apache.org/jira/browse/OPENJPA-449?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Patrick Linskey resolved OPENJPA-449.
-------------------------------------

    Resolution: Duplicate

Duplicate of OPENJPA-437

> Under concurrent access, createEntityManager() fails with NPE.
> --------------------------------------------------------------
>
>                 Key: OPENJPA-449
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-449
>             Project: OpenJPA
>          Issue Type: Bug
>            Reporter: Pinaki Poddar
>
> Under concurrent access, new Broker construction fails with NPE.
> The observed scenario (when many threads are asking for new Brokers) shows the following:
>  Caused by: <openjpa-0.0.0-rnull nonfatal general error> org.apache.openjpa.persistence.PersistenceException:
null
> 	at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:206)
> 	at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:142)
> 	at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:192)
> 	at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:145)
> 	at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:1)
> Caused by: java.lang.NullPointerException
> 	at org.apache.openjpa.kernel.AbstractBrokerFactory.loadPersistentTypes(AbstractBrokerFactory.java:263)
> 	at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:198)
> The cause is an uninitialzed instance variable _pcClassLoaders in AbstractBrokerFactory.
It is *conditionally* initialized within loadPersistentTypes() which is invoked during broker
creation. Safer option is to intialize this variable on class constructor. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message