openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From BluesBrothers <j...@objectivelogic.com>
Subject Re: Possible reasons for Persistence.createEntityManagerFactory returning null
Date Thu, 12 Nov 2009 03:20:34 GMT

KK,

I realize that this thread is over a year old, but I had to thank you for
posting the resolution to your problem. I had the same issue (createEMF()
silently returned null) and had searched for a long time before happening
upon this thread. I did the same thing: I overlooked the obvious: the
openjpa.jar file is located in a top-level directory above the other
dependent jars, and I had neglected to copy it to my lib/ folder. Without
any exception or messages to go by, I was completely stumped as to why
OpenJPA seemed to ignore my persistence.xml file and return null for the
EMF. Anyway, I found and copied the missing JAR file, and voila! I put an
end to several hours of wasted time. ;-)


Kamlesh123 wrote:
> 
> Thanks Kevin,
> 
> Sorry for replying late. The emf was coming as null because I have not set
> the jar openjpa-1.1.0.jar in the classpath. Actually in OpenJPA
> distribution there is a lib folder containg some other jars. I have
> assumed that all the required libraries are in the lib folder and did not
> bother to see that there is one more jar lying on the root.
> 
> Regards,
> KK
> 

-- 
View this message in context: http://n2.nabble.com/Possible-reasons-for-Persistence-createEntityManagerFactory-returning-null-tp721529p3990562.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Mime
View raw message