----- Ursprüngliche Mail ----
Von: Shaun Smith <shaun.smith@xxxxxxxxxx>
An: EclipseLink User Discussions <eclipselink-users@xxxxxxxxxxx>
Gesendet: Dienstag, den 11. März 2008, 14:39:33 Uhr
Betreff: Re: [eclipselink-users] No Persistence provider for EntityManager - Error when using EclipseLink
Hi Alex,
One way this exception can occur is when you have persistence.jar on your classpath but not the JPA provider jar. Make sure you have both persistence.jar and eclipselink.jar on your classpath.
Shaun
Alex_S wrote:
Hi everybody,
I have tried to switch my application from Toplink Essentials to
Eclipselink, but it currently doesn't work.
After replacing the jar library and doing the necessary changes in
persistence.xml and source code I always get an
Exception in thread "main" javax.persistence.PersistenceException: No
Persistence provider for EntityManager named default
at
javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:89)
at com.emd.testpersistence.MyEntityManager.main(MyEntityManager.java:89)
Thx for help,
Alex
--
Shaun Smith | Principal Product Manager, TopLink | +1.905.502.3094
Oracle Fusion Middleware
110 Matheson Boulevard West, Suite 100
Mississauga, Ontario, Canada L5R 3P4