Hi Please check your Persistence Name in your persistance.xml file and the persistence name in your EntityManagerFactory. This might be the case if your classpath does include EclipseLink already.
Ex: peristence.xml file
<? xml version="1.0" encoding="UTF-8"?>
< persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
< persistence-unit name="PersistenceUnitName" transaction-type="RESOURCE_LOCAL">
< exclude-unlisted-classes>false</exclude-unlisted-classes>
</ persistence-unit>
</persistence>
EntityManagerFactory class:
entityManagerFactory = new PersistenceProvider().createEntityManagerFactory("PersistenceUnitName");
Hope this helps.
Thanks
Kris
f u cn rd ths, u cn gt a gd jb n cmptr prgrmmng
--- On Fri, 2/13/09, Tom Ware <tom.ware@xxxxxxxxxx> wrote:
From: Tom Ware <tom.ware@xxxxxxxxxx> Subject: Re: [eclipselink-users] Eclipselink in SE Environment not able to provide persistence To: "EclipseLink User Discussions" <eclipselink-users@xxxxxxxxxxx> Date: Friday, February 13, 2009, 12:02 PM
The fact that you are not seeing any logging information likely indicates that
for some reason your run target is not seeing eclipselink.jar as a service
provider.
That could mean either your classpath is not setup properly or your
eclipselink.jar is somehow corrupt. Are you running a completely standalone
application in java, or are you running your application on some kind of
container. (Tomcat? Spring?)
It might be a good idea to do a quick debug through the persistence code. The
code is fairly simple. You can get the source here:
http://dev.eclipse.org/svnroot/rt/org.eclipse.persistence/trunk/plugins/javax.persistence/persistence-src.zip
-Tom
JMarco wrote:
> I played around with eclipselink logging now. Well is set the setting to
> finest but still don't get any more information.
>
> I also added my User class to the persistence.xml but it's not doing
> anything.
> I still get the same exception.
>
> Running test
> [EL Info]: 2009.02.13 18:22:48.836--Test logging
> Exception in thread "main"
javax.persistence.PersistenceException: No
> Persistence provider for EntityManager named EclipseLinkTest
> at
>
javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:89)
> at
>
javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:60)
> at de.eclipselinktest.RunTest.test(RunTest.java:19)
>
> I could put the zipped eclipse project folder (it's just a small
> testproject) on drop.io so one (you ;)) could have a look on it.
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
|