You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by Pinaki Poddar <pp...@apache.org> on 2011/12/21 17:52:55 UTC

Re: Exception initializing openJPA - the named BrokerFactory is not valid

Most likely the problem lies with the packaging layout of your application
classes + openjpa libraries + JPA spec library.
What is the layout of the deployed application package?


-----
Pinaki Poddar
Chair, Apache OpenJPA Project
--
View this message in context: http://openjpa.208410.n2.nabble.com/Exception-initializing-openJPA-the-named-BrokerFactory-is-not-valid-tp7108046p7115825.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Re: Exception initializing openJPA - the named BrokerFactory is not valid

Posted by Pinaki Poddar <pp...@apache.org>.
I do not have time to download and analyze the package layout of a
deployment.
The JPA bootstrap (Persistence.createEntityMangerFactory(...)), I believe,
uses thread context classloader to load the provider's implementation (i.e.
OpenJPA classes). So make sure that
Persistence.createEntityMangerFactory(...) is called by a thread whose
context classloader can load OpenJPA classes. 
Given different classloading regime in JEE/Servlet or other containers, I am
sorry that I can not give you a more accurate answer.


-----
Pinaki Poddar
Chair, Apache OpenJPA Project
--
View this message in context: http://openjpa.208410.n2.nabble.com/Exception-initializing-openJPA-the-named-BrokerFactory-is-not-valid-tp7108046p7117036.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.