openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Curtis <curti...@gmail.com>
Subject Re: newbie: null Entity Manager Factory in Eclipse
Date Mon, 20 Jul 2009 14:06:01 GMT
It sounds like your META-INF/persistence.xml file isn't found on your
classpath when running your RCP application. I really wish that
createEntityManagerFactory would do something other than return null if a
persistence unit isn't found.

I'd suggest taking a close look at the classpath for your RCP application.
Hopefully this helps!

-Rick

On Mon, Jul 20, 2009 at 8:50 AM, Christopher Giblin <CGI@zurich.ibm.com>wrote:

>
> Hi,
> When I run my test as a standalone Java program, things work.
> When I launch the same code from within a plugin in an Eclipse RCP app,
> Persistence.createEntityManagerFactory returns null.
>
> I have called Persistence.createEntityManagerFactory both ways, with and
> without persistence.xml. Get null both ways.
>
> I have googled and have done everything recommended in those posts,
> including initializing the factory with properties and making sure the jdbc
> driver is on the class path. Still get null.
>
> I feel I am now going round in circles. Any hints?
>
> Thanks, chris
>
>
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message