Hi Chris, I am no expert but I found when I am using OpenJPA and eclipse I have to set the OpenJPA library to be added to the boot path, otherwise I get the same issue.
Window->preferences->Java->Build path->User Libraries edit the OpenJPA user lib and check the option "System Library (added to boot class path)" Hth Chris -----Original Message----- From: Christopher Giblin [mailto:c...@zurich.ibm.com] Sent: Monday, 20 July 2009 11:50 PM To: users@openjpa.apache.org Subject: newbie: null Entity Manager Factory in Eclipse 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