Hi Gordon,
many thanks for your fast response!
To answer your question:
1.
For testing I try to use eclipselink in Java SE enviroment, without application server.
In production there will be a apache tomcat (but not used as Java EE server)
2.
I think so, here is my persistence.xml
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
<persistence-unit name="">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<class>com.emd.testpersistence.PhaMatLoc</class>
<class>com.emd.testpersistence.PhaMatSales</class>
<class>com.emd.testpersistence.PhaMaterial</class>
<class>com.emd.testpersistence.PhaProduct</class>
<class>com.emd.testpersistence.SecVUserPrivDissolve</class>
<properties>
<property name="eclipselink.session-name" value="my-session"/>
<property name="eclipselink.logging.level" value="FINE"/>
<property name="eclipselink.jdbc.driver" value="oracle.jdbc.OracleDriver"/>
<property name="eclipselink.jdbc.url" value="jdbc:oracle:thin:@d11n02p02.merck.de:1521:rc02"/>
</properties>
</persistence-unit>
with toplink essentials I didn't need to use <provider>...</provider>
But here it doesn't seem to work.
3.
Yes, I see no other exception. And Eclipselink seems to do already something before, I get messages like
[EPS Config]: 2008.03.11 02:34:35.782--ServerSession(471035)--Thread(Thread[main,5,main])--The column name for element [private java.lang.String com.emd.testpersistence.PhaMatLoc.lcomp] is being defaulted to: LCOMP.
before the exception comes.
4.
Currently I use eclipselink-incubation-1.0M5, using eclipselink-incubation-20080228 results in the following error:
Exception in thread "main" Local Exception Stack:
Exception [EclipseLink-30005] (Eclipse Persistence Services - 1.0 (Build SNAPSHOT - 20080228)): org.eclipse.persistence.exceptions.PersistenceUnitLoadingException
Exception Description: An exception was thrown while searching for persistence archives with ClassLoader: sun.misc.Launcher$AppClassLoader@133056f
Internal Exception: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 1.0 (Build SNAPSHOT - 20080228)): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [] failed.
Internal Exception: java.util.ConcurrentModificationException
at org.eclipse.persistence.exceptions.PersistenceUnitLoadingException.exceptionSearchingForPersistenceResources(PersistenceUnitLoadingException.java:121)
at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:86)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
at com.emd.testpersistence.MyEntityManager.main(MyEntityManager.java:89)
Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 1.0 (Build SNAPSHOT - 20080228)): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [] failed.
Internal Exception: java.util.ConcurrentModificationException
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:809)
at org.eclipse.persistence.internal.jpa.JavaSECMPInitializer.callPredeploy(JavaSECMPInitializer.java:130)
at org.eclipse.persistence.internal.jpa.JavaSECMPInitializer.initPersistenceUnits(JavaSECMPInitializer.java:198)
at org.eclipse.persistence.internal.jpa.JavaSECMPInitializer.initialize(JavaSECMPInitializer.java:213)
at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:72)
... 2 more
Caused by: Exception [EclipseLink-28018] (Eclipse Persistence Services - 1.0 (Build SNAPSHOT - 20080228)): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [] failed.
Internal Exception: java.util.ConcurrentModificationException
at org.eclipse.persistence.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:209)
... 7 more
Caused by: java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(Unknown Source)
at java.util.HashMap$ValueIterator.next(Unknown Source)
at org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.processAnnotations(MetadataProcessor.java:239)
at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:272)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:766)
... 6 more
best regards,
Alex
----- Ursprüngliche Mail ----
Von: Gordon Yorke
<gordon.yorke@xxxxxxxxxx>An: EclipseLink User Discussions
<eclipselink-users@xxxxxxxxxxx>Gesendet: Dienstag, den 11. März 2008, 14:16:56 Uhr
Betreff: Re: [eclipselink-users] No Persistence provider for EntityManager - Error when using EclipseLink
Hello Alex,
What application server are you running in? Are you specifying the
Persistence provider in your persistence.xml file? Is that the only
exception that you see? Are you using the latest nightly from
EclipseLink?
--Gordon
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
>
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxxhttps://dev.eclipse.org/mailman/listinfo/eclipselink-users