No Persistence provider for EntityManager

Hi everybody,
this problem has been haunting me for days now.
I have this JSE application that uses toplink essentias for his persistence layer.
Everything works fine in Eclipse, but when i try to execute it outside eclipse i get the following error:
javax.persistence.PersistenceException: No Persistence provider for EntityManager named analise: The following providers:
oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider
oracle.toplink.essentials.PersistenceProvider
Returned null to createEntityManagerFactory.
     at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:154)
     at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
     at synergia.persistencia.principal.CorretorPersistencia.<init>(CorretorPersistencia.java:87)
     at synergia.persistencia.principal.CorretorPersistencia.criarNovaInstancia(CorretorPersistencia.java:646)
     at synergia.persistencia.principal.CorretorPersistencia.getUnicaInstancia(CorretorPersistencia.java:223)
my persistence.xml looks like this:
<?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"
xsi:schemaLocation=
"http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0">
<persistence-unit name="analise">
          <provider>
               oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider
          </provider>           
classes
     <properties>
          <property name="toplink.jdbc.driver"
          value="oracle.jdbc.driver.OracleDriver"/>
          <property name="toplink.jdbc.user"
          value="usu_anual3"/>
          <property name="toplink.jdbc.password"
          value="usu_anual3siace01"/>
          <property name="toplink.jdbc.url"
          value="jdbc:oracle:thin:@172.30.9.66:1521:siace01"/>
               <property name="toplink.weaving.lazy"
          value="true" />
               <property name="toplink.weaving"
          value="static" />
               <property name="toplink.logging.level"
          value="FINEST"/>
               <property name="toplink.target-database"
     value="oracle.toplink.essentials.platform.oracle.OraclePlatform"/>
          </properties>
     </persistence-unit>
</persistence>
what i dont get is that the application finds the persistence.xml, and predeploy it or at least i think so.
this is from the log:
it starts like this:
[TopLink Finest]: 2008.02.20 12:47:03.204--ServerSession(19864560)--Thread(Thread[main,5,main])--property=toplink.weaving; value=static
[TopLink Finest]: 2008.02.20 12:47:03.250--ServerSession(19864560)--Thread(Thread[main,5,main])--property=toplink.orm.throw.exceptions; default value=true
[TopLink Finer]: 2008.02.20 12:47:03.250--ServerSession(19864560)--Thread(Thread[main,5,main])--Searching for default mapping file in file:/C:/Arquivos%20de%20programas/SIACE%20PCA%20Análise%202007%20-%20ALPHA/lib/
...then does lots of stuff like this
--The column name for element [private java.lang.String synergia.persistencia.principal.ObjetoPersistenteAbstrato.id] is being defaulted to: ID.
... Finally it ends like this
12:47:10.031--ServerSession(19864560)--Thread(Thread[main,5,main])--end predeploying Persistence Unit analise; state Predeployed; factoryCount 0
[TopLink Finer]: 2008.02.20 12:47:10.031--Thread(Thread[main,5,main])--cmp_init_transformer_is_null
the log whe i run in eclipse is just like it
but it adds this to the end
[TopLink Finer]: 2008.02.19 09:03:17.710--Thread(Thread[main,5,main])--cmp_init_transformer_is_null
[TopLink Finest]: 2008.02.19 09:03:17.710--ServerSession(30969271)--Thread(Thread[main,5,main])--begin predeploying Persistence Unit analise; state Predeployed; factoryCount 0
[TopLink Finest]: 2008.02.19 09:03:17.710--ServerSession(30969271)--Thread(Thread[main,5,main])--end predeploying Persistence Unit analise; state Predeployed; factoryCount 1
[TopLink Finest]: 2008.02.19 09:03:17.725--ServerSession(30969271)--Thread(Thread[main,5,main])--begin deploying Persistence Unit analise; state Predeployed; factoryCount 1
[TopLink Finest]: 2008.02.19 09:03:18.632--ServerSession(30969271)--Thread(Thread[main,5,main])--property=toplink.session-name; value=teste
[TopLink Finest]: 2008.02.19 09:03:18.632--ServerSession(30969271)--Thread(Thread[main,5,main])--property=toplink.logging.level; value=FINEST; translated value=FINEST
[TopLink Finest]: 2008.02.19 09:03:18.632--ServerSession(30969271)--Thread(Thread[main,5,main])--property=toplink.logging.level; value=FINEST; translated value=FINEST
[TopLink Finest]: 2008.02.19 09:03:18.632--ServerSession(30969271)--Thread(Thread[main,5,main])--property=toplink.jdbc.user; value=usu_anual3
[TopLink Finest]: 2008.02.19 09:03:18.632--ServerSession(30969271)--Thread(Thread[main,5,main])--property=toplink.jdbc.password; value=xxxxxx
[TopLink Finest]: 2008.02.19 09:03:20.413--ServerSession(30969271)--Thread(Thread[main,5,main])--property=toplink.jdbc.driver; value=oracle.jdbc.driver.OracleDriver
[TopLink Finest]: 2008.02.19 09:03:20.413--ServerSession(30969271)--Thread(Thread[main,5,main])--property=toplink.jdbc.url; value=jdbc:oracle:thin:@172.30.9.66:1521:siace01
[TopLink Info]: 2008.02.19 09:03:20.413--ServerSession(30969271)--Thread(Thread[main,5,main])--TopLink, version: Oracle TopLink Essentials - 2.0 (Build b58g-fcs (09/07/2007))
[TopLink Finest]: 2008.02.19 09:03:21.460--Thread(Thread[main,5,main])--DBPlatform: oracle.toplink.essentials.platform.database.InformixPlatform, RegularExpression: (?i)informix.*.
[TopLink Finest]: 2008.02.19 09:03:21.491--Thread(Thread[main,5,main])--DBPlatform: oracle.toplink.essentials.platform.database.PointBasePlatform, RegularExpression: (?i)pointbase.*.
[TopLink Finest]: 2008.02.19 09:03:21.491--Thread(Thread[main,5,main])--DBPlatform: oracle.toplink.essentials.platform.database.DB2Platform, RegularExpression: (?i).*db2.*.
[TopLink Finest]: 2008.02.19 09:03:21.491--Thread(Thread[main,5,main])--DBPlatform: oracle.toplink.essentials.platform.database.SQLServerPlatform, RegularExpression: (?i)microsoft.*.
[TopLink Finest]: 2008.02.19 09:03:21.491--Thread(Thread[main,5,main])--DBPlatform: oracle.toplink.essentials.platform.database.PostgreSQLPlatform, RegularExpression: (?i)postgresql.*.
[TopLink Finest]: 2008.02.19 09:03:21.491--Thread(Thread[main,5,main])--DBPlatform: oracle.toplink.essentials.platform.database.SybasePlatform, RegularExpression: (?i)(sybase.*)|(adaptive server enterprise.*)|(SQL Server).
[TopLink Finest]: 2008.02.19 09:03:21.491--Thread(Thread[main,5,main])--DBPlatform: oracle.toplink.essentials.platform.database.JavaDBPlatform, RegularExpression: (?i).*derby.
[TopLink Finest]: 2008.02.19 09:03:21.491--Thread(Thread[main,5,main])--DBPlatform: oracle.toplink.essentials.platform.database.oracle.OraclePlatform, RegularExpression: (?i)oracle.*.
[TopLink Fine]: 2008.02.19 09:03:21.491--Thread(Thread[main,5,main])--Detected Vendor platform: oracle.toplink.essentials.platform.database.oracle.OraclePlatform
Does anyone knows why this happen?
currently im using the latest build from v2: V2_build_58g (V2 Final)
but i used othes from v2.1 branch, and got the same results.
thanks for the help.
p.s.: Sorry for my bad english

Hi,
If you are having the same error as the first post where your PU was not found - even though you have all the correct jars in your classpath (and you don't have the problem with %20 spaces or unrecognized UTF-8 chars in the path to your persistence.xml - then you may have one of the following issues...
- dependent jars like toplink*.jar are not visible to your application-managed EM's classloader - IE the TopLink library is lower
- your server's classpath is incorrectly modified
- you do not have references specified in one or all of your *application.xml, .MANIFEST, ejb-jar or web.xml reference descriptors.
- another provider library is being loaded ahead of TopLink.
- several other scenarios I still need to expand on....
I am able to reproduce recently the same issue on demand on several application servers if I remove jars, hack the server's classpath or attempt to override a partial set of dependent jars via several application-managed scenarios.
thank you
/michael
http://www.eclipselink.org

Similar Messages

  • JPA Error "No Persistence provider for EntityManager",using org.eclipse.per

    Hello Colleagues,
    I have created JPA project, with out any error have done mapping also. with orm.xml and persistense .xml
    I am getting No Persistence provider for EntityManager error when calling Entity Manager in Entity class
    Error >>> EntityManagerFactory emf = Persistence.createEntityManagerFactory("Personalization_JPA");
    { No Persistence provider for EntityManager named Personalization_JPA }
    Persistence Provider as "org.eclipse.persistence.jpa.PersistenceProvider
    In persistence.xml for my JPA project , I have included following in respective tabs
    1) GENERAL Tab of Persistence.xml
    a) Persistence Provider as "org.eclipse.persistence.jpa.PersistenceProvider"
    b) In Managed classes included my Entity class and test application that calls the entity manager
    c) orm.xml in xml mapping files
    2) Connections Tab of Persistence.xml
    a) Transaction Type as Resource Local, not using any JTA datasourse name in database field
    3) Properties Tab of Persistence.xml
    property name="driver" value="com.sap.dbtech.jdbc.DriverSapDB"
    property name="url" value="jdbc:sapdb://localhost/w15"
    property name="username" value="SAPW15DB"
    property name="password" value="sapsapr3"
    If anything wrong is specified please kindly inform me.

    Hello colleague,
    As per your suggestion I removed Persistence Provider as "org.eclipse.persistence.jpa.PersistenceProvider", made it blank in persistence.xml, but still I get the same error saying No Persistence provider for EntityManager, please have a look at other attributes of persistence.xml
    In persistence.xml for my JPA project , I have included following in respective tabs
    1) GENERAL Tab of Persistence.xml
    a) Persistence Provider as  blank or "org.eclipse.persistence.jpa.PersistenceProvider" makes no difference
    b) In Managed classes included my Entity class and test application that calls the entity manager
    c) orm.xml in xml mapping files
    2) Connections Tab of Persistence.xml
    a) Transaction Type as Resource Local, not using any JTA datasourse name in database field
    3) Properties Tab of Persistence.xml (connecting to maxdb, so is this necessary or not )
    property name="driver" value="com.sap.dbtech.jdbc.DriverSapDB"
    property name="url" value="jdbc:sapdb://localhost/w15"
    property name="username" value="SAPW15DB"
    property name="password" value="sapsapr3"
    If anything wrong is specified please kindly inform me.

  • WebChannel JPA Error "No Persistence provider for EntityManager"

    Hello Colleagues,
    In WebChannel  for Personalization, we are using Java Persistence API JPA project to connect to java stack Max DB .
    Here I have created JPA project, with out any error done mapping also. with orm.xml and persistense .xml
    I am getting No Persistence provider for EntityManager error when calling Entity Manager in Entity class
    > EntityManagerFactory emf = Persistence.createEntityManagerFactory("Personalization_JPA");
              EntityManager em = emf.createEntityManager();
              Attribute_entity ae = new Attribute_entity();
              ae.setEMPID(56);
              ae.setPreferences("Raghu");
              Transaction tx = (Transaction) em.getTransaction();
              em.persist(ae);
    I am using org.eclipse.persistence.jpa.PersistenceProvider as Persistence Provider
    <?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="Personalization_JPA">
              <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
              <mapping-file>META-INF/orm.xml</mapping-file>
              <class>personalization.model.PersonalizationEntity</class>
              <class>personalization.model.Attribute_entity</class>
              <class>personalization.model.Test</class>
              </persistence-unit>
    </persistence>
    Can any one please tell me how to solve this issue.?

    Hello colleague,
    As per your suggestion I removed Persistence Provider as "org.eclipse.persistence.jpa.PersistenceProvider", made it blank in persistence.xml, but still I get the same error saying No Persistence provider for EntityManager, please have a look at other attributes of persistence.xml
    In persistence.xml for my JPA project , I have included following in respective tabs
    1) GENERAL Tab of Persistence.xml
    a) Persistence Provider as  blank or "org.eclipse.persistence.jpa.PersistenceProvider" makes no difference
    b) In Managed classes included my Entity class and test application that calls the entity manager
    c) orm.xml in xml mapping files
    2) Connections Tab of Persistence.xml
    a) Transaction Type as Resource Local, not using any JTA datasourse name in database field
    3) Properties Tab of Persistence.xml (connecting to maxdb, so is this necessary or not )
    property name="driver" value="com.sap.dbtech.jdbc.DriverSapDB"
    property name="url" value="jdbc:sapdb://localhost/w15"
    property name="username" value="SAPW15DB"
    property name="password" value="sapsapr3"
    If anything wrong is specified please kindly inform me.

  • Unable to load persistence provider

    hi,
    i'm using spring context to reimplement some java methods in SOA suite.
    I have a deplyed and runnable Spring MVC project, which use hibernate to connect between database and project POJO classes. i use this spring project's java methods which are used those POJO classes and DAO classes by which we access database.
    Now i want to implement each methods in SOA suite . for that I define some spring contexts corresponding to each methods.
    i added required jar files in project class path and added persistance.xml, orm.xml and spring project's MANIFEST.MF. after that for checking, i added main() method in ech spring context's impplementation classes to check if those methods are individual running or not. but yes, they are running in JDeveloper.
    now i deploy this SOA project in weblogic enterprise manager, then test the service. its not work at all. in stacktrace i got following error/
    WARNING: Unable to load persistence provider "oracle.toplink.essentials.PersistenceProvider" due to "oracle.classloade
    util.AnnotatedClassNotFoundException:
    Missing class: oracle.toplink.essentials.PersistenceProvider
    Dependent class: org.apache.openjpa.persistence.PersistenceProductDerivation
    Loader: sun.misc.Launcher$AppClassLoader@27770641
    Code-Source: /C:/Fusion11g/Middleware11g_3/modules/org.apache.openjpa_1.1.0.0_1-1-1-SNAPSHOT.jar
    Configuration: /C:/Fusion11g/Middleware11g_3/modules/org.apache.openjpa_1.1.0.0_1-1-1-SNAPSHOT.jar
    This load was initiated at default.composite.RulesForLoanOrigination.soa_75e4602c-da8d-4a9d-b6b3-747aa3ee5372:1.0 usin
    the Class.forName() method.
    INFO: Found persistence provider "oracle.toplink.essentials.PersistenceProvider". OpenJPA will not be used.
    WARNING: Unable to load persistence provider "oracle.toplink.essentials.PersistenceProvider" due to "oracle.classloade
    util.AnnotatedClassNotFoundException:
    Missing class: oracle.toplink.essentials.PersistenceProvider
    Dependent class: org.apache.openjpa.persistence.PersistenceProductDerivation
    Loader: sun.misc.Launcher$AppClassLoader@27770641
    Code-Source: /C:/Fusion11g/Middleware11g_3/modules/org.apache.openjpa_1.1.0.0_1-1-1-SNAPSHOT.jar
    Configuration: /C:/Fusion11g/Middleware11g_3/modules/org.apache.openjpa_1.1.0.0_1-1-1-SNAPSHOT.jar
    This load was initiated at default.composite.RulesForLoanOrigination.soa_75e4602c-da8d-4a9d-b6b3-747aa3ee5372:1.0 usin
    the Class.forName() method.
    INFO: Found persistence provider "oracle.toplink.essentials.PersistenceProvider". OpenJPA will not be used.
    java.lang.ExceptionInInitializerError
    at com.originator.dao.LoanDAO.findByPK(LoanDAO.java:23)
    at com.origination.business.RiskCalculation.calculateRisk(RiskCalculation.java:24)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at weblogic.sca.engine.WlsScaService.invokeTargetBeanMethod(WlsScaService.java:128)
    at weblogic.sca.engine.WlsScaService.messageInvoker(WlsScaService.java:92)
    at weblogic.sca.engine.WlsScaService.invoke(WlsScaService.java:39)
    at weblogic.sca.engine.WlsScaEngine.messageInvoker(WlsScaEngine.java:114)
    at weblogic.sca.engine.WlsScaEngine.invoke(WlsScaEngine.java:66)
    at oracle.integration.platform.blocks.java.SpringServiceEngine.request(SpringServiceEngine.java:148)
    at oracle.integration.platform.blocks.mesh.SynchronousMessageHandler.doRequest(SynchronousMessageHandler.java:
    9)
    at oracle.integration.platform.blocks.mesh.MessageRouter.request(MessageRouter.java:179)
    at oracle.integration.platform.blocks.mesh.MeshImpl.request(MeshImpl.java:155)
    at sun.reflect.GeneratedMethodAccessor1874.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.jav
    182)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    at oracle.integration.platform.metrics.PhaseEventAspect.invoke(PhaseEventAspect.java:59)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    at $Proxy272.request(Unknown Source)
    at oracle.integration.platform.blocks.soap.WebServiceEntryBindingComponent.doMessageProcessing(WebServiceEntry
    ndingComponent.java:1169)
    at oracle.integration.platform.blocks.soap.WebServiceEntryBindingComponent.processIncomingMessage(WebServiceEn
    yBindingComponent.java:768)
    at oracle.integration.platform.blocks.soap.FabricProvider.processMessage(FabricProvider.java:113)
    at oracle.j2ee.ws.server.provider.ProviderProcessor.doEndpointProcessing(ProviderProcessor.java:1168)
    at oracle.j2ee.ws.server.WebServiceProcessor.invokeEndpointImplementation(WebServiceProcessor.java:996)
    at oracle.j2ee.ws.server.provider.ProviderProcessor.doRequestProcessing(ProviderProcessor.java:562)
    at oracle.j2ee.ws.server.WebServiceProcessor.processRequest(WebServiceProcessor.java:222)
    at oracle.j2ee.ws.server.WebServiceProcessor.doService(WebServiceProcessor.java:185)
    at oracle.j2ee.ws.server.WebServiceServlet.doPost(WebServiceServlet.java:430)
    at oracle.integration.platform.blocks.soap.FabricProviderServlet.doPost(FabricProviderServlet.java:477)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:330)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3684)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: javax.persistence.PersistenceException: No Persistence provider for EntityManager named OriginatorModel: T
    following providers:
    org.eclipse.persistence.jpa.PersistenceProvider
    kodo.persistence.PersistenceProviderImpl
    org.apache.openjpa.persistence.PersistenceProviderImpl
    Returned null to createEntityManagerFactory.
    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:154)
    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
    at com.originator.dao.EntityManagerHelper.<clinit>(EntityManagerHelper.java:21)
    ... 53 more
    what i guess, after deploy, projects sca.jar do not takes those dependent jars (jpa.jar, toplink.jar,toplink-essential.jar etc) which i given in classpath.
    but i don't khonw what is the actual problem.
    please help me

    stick them into sca-inf/lib directory, and they are deployed and loaded.
    hth clemens

  • Weblogic 10 - JPA - Hibernate as Persistence Provider

    Where can I find documentations about using HIBERNATE as Persistence Provider for Weblogic 10?

    I still haven't found documentations about HIBERNATE as Persistence Provider for Weblogic 10. So, can i assume that is an impossible task? The only way is use KODO? This not looks compliant...

  • NulPointerException for EntityManager

    Hi all
    I am facing a really strange problem and I would appreciate any hint that can help me with this. When i call the session bean from main.java it works fine but when I try to call from NewClass I get NulPointerException for EntityManager. I read some post suggesting configuration on persistence.xml but since it works on one way i guess it has to be smth else.
    Thanks
    ytsahin
    Ps:the application is created in netbeans6.1(Toplink,GlassFish,Derby).
    Error message:
    Jun 19, 2008 11:30:48 AM com.sun.enterprise.appclient.MainWithModuleSupport <init>
    WARNING: ACC003: Application threw an exception.
    java.lang.NullPointerException
    NewEntity.java
    @Entity
    public class NewEntity implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    private String name;
    / / / / getter and setter methods here
    PersonFacadeSessionBean.java
    @Stateless
    public class PersonFacadeSessionBean implements PersonFacadeSessionRemote {
    @PersistenceContext
    private EntityManager em;
    public void insert(NewEntity newEntity) {
    em.persist(newEntity); ****** here I receive nullPointerException for em
    NewClass.java
    public class NewClass {
    @EJB
    private static PersonFacadeSessionRemote personFacadeSessionBean;
    public NewClass() {
    personFacadeSessionBean=new PersonFacadeSessionBean();
    public void dosmth() {
    NewEntity e = new NewEntity();
    e.setName("aaaaa");
    personFacadeSessionBean.insert(e);
    ***Error Version***
    Main.java
    public class Main {
    public static void main(String[] args) {
    NewClass newClass=new NewClass();
    newClass.dosmth();
    ****Ok Version*****
    Main.java
    public class Main {
    @EJB
    private static PersonFacadeSessionRemote personFacadeSessionBean;
    public static void main(String[] args) {
    NewEntity e=new NewEntity();
    e.setName("eeee");
    personFacadeSessionBean.insert(e);
    }

    There is support for controlling the life-cycle of
    the connection TopLink holds within an EntityManager.That would mean that we would use the Toplink Implementaion API's vs the JPA's standardized Interfaces? That's an option, we would like to look, if we don't have any others, but still a "good" option ;-).... what would have to look at?
    >
    Which edition and version of TopLink are you using?We are using Toplink Essential as jar , here the pom.xml dependency entry :
    <groupId>toplink.essentials</groupId>
    <artifactId>toplink-essentials</artifactId>
    <version>2.0-58</version>
    We are using Toplink outside a Container in a Java Desktop Applikation running against an Oracle Database (Two - Tier ;-)
    It doesn't have to be Toplink Essential. I understand their is a difference between the "open-sourced" Toplink Version and Oracle's Version?
    Would Oracle's Version help us?
    >
    Are you using TopLink's internal JDBC connection pool
    or your container's data source?We are actually using Toplink with a Connection Pool (c3p09), but outside a container.
    Ideally we would like to retain the Connection obtained from the Pool for the Life-Cycle of an Entity Manager.
    >
    I am sure TopLink lazy connection assignment and
    dedicated connection options will be able to provide
    the same capabilities you require very easily. Great. Where could find out? Consultancy is for us an option ;-)
    >
    DougBest thanx for your reply
    Christoph

  • Exception Description: No conversion value provided for the attribute

    Hi!,
    The following is printed when I try to persist an entity with a an enum attribute in it. It deployted succuessfully and mapped fine a table, my configuration is, Windows2003, SJSAS 9 FCS, Derby DB.
    Exception [TOPLINK-115] (Oracle TopLink Essentials - 2006.4 (Build 060412)): ora
    cle.toplink.essentials.exceptions.DescriptorException
    Exception Description: No conversion value provided for the attribute [NEW].
    Mapping: oracle.toplink.essentials.mappings.DirectToFieldMapping[status-->REPORT
    .STATUS]
    Descriptor: RelationalDescriptor(com.namespace1.reports.persistence.Report --> [
    DatabaseTable(REPORT)])
    The Entity class is the following:
    * Report.java
    * Created on 25 ����� �����, 2006, 06:07 �
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    package com.namespace1.reports.persistence;
    import java.io.*;
    import java.util.*;
    import javax.persistence.*;
    * @author Administrator
    @javax.persistence.Entity(name="Report")//name used in EJB-QL.
    public class Report implements Serializable {
    public enum ReportStatus{
    NEW,
    OPEN,
    SUBMITTED,
    ACCEPTED,
    REJECTED
    @javax.persistence.Id
    @javax.persistence.GeneratedValue(strategy = javax.persistence.GenerationType.AUTO)
    private long id;
    @Transient
    private int currentEntryId;
    @Column(length=256)
    private String title;
    private String ownerName;
    @Enumerated(EnumType.ORDINAL)
    @Basic
    private ReportStatus status;
    @OneToMany(mappedBy="report",targetEntity=ReportEntry.class,cascade=CascadeType.ALL)
    private Map<Integer,ReportEntry> reportEntries;
    /** Creates a new instance of Report */
    public Report() {
    public long getId() {
    return id;
    public void setId(long id) {
    this.id = id;
    public int hashCode() {
    int hash = 0;
    hash += (int)getId();
    return hash;
    public boolean equals(Object object) {
    // TODO: Warning - this method won't work in the case the id fields are not set
    if (!(object instanceof Report)) {
    return false;
    Report other = (Report)object;
    if (this.getId() != other.getId()) return false;
    return true;
    public String toString() {
    return "com.namespace1.reports.persistence.Report[id=" + getId() + "]";
    public int getCurrentEntryId() {
    return currentEntryId;
    public void setCurrentEntryId(int currentEntryId) {
    this.currentEntryId = currentEntryId;
    public String getTitle() {
    return title;
    public void setTitle(String title) {
    this.title = title;
    public String getOwnerName() {
    return ownerName;
    public void setOwnerName(String ownerName) {
    this.ownerName = ownerName;
    public ReportStatus getStatus() {
    return status;
    public void setStatus(ReportStatus status) {
    this.status = status;
    public Map<Integer, ReportEntry> getReportEntries() {
    return reportEntries;
    public void setReportEntries(Map<Integer, ReportEntry> reportEntries) {
    this.reportEntries = reportEntries;
    }

    This problem is side effect of issue 193 (https://glassfish.dev.java.net/issues/show_bug.cgi?id=193) and is described in details in issue 634 (https://glassfish.dev.java.net/issues/show_bug.cgi?id=634). Your choices are to use the work around described in the above issue or switch to the GlassFish build with the fix.
    regards,
    -marina

  • EclipseLink persistence provider issue with weblogic 10.3

    Hi All,
    I have been trying to deploy and run an EAR in weblogic but when I run the application I get the following warning: WARNING: Found unrecognized persistence provider "org.eclipse.persistence.jpa.PersistenceProvider" in place of OpenJPA provider. This provider's properties will not be used.
    The following is my persistence.xml:
    <persistence 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 persistence_1_0.xsd" version="1.0">
    <persistence-unit name="default" transaction-type="JTA">
    <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
    <jta-data-source>DataSourceName</jta-data-source>
    <class>oracle.communications.platform.entity.impl.CharacteristicSpecificationDAO</class>
    <properties>
    <property name="eclipselink.logging.level" value="FINEST" />
    <property name="eclipselink.target-database" value="org.eclipse.persistence.platform.database.oracle.OraclePlatform" />
    <property name="eclipselink.target-server" value="WebLogic_10" />
    <property name="eclipselink.session-event-listener" value="oracle.communications.platform.persistence.impl.PomsSessionEventListener" />
    <property name="eclipselink.session.customizer" value="oracle.communications.platform.util.EclipseLinkSessionCustomizer" />
    <property name="poms.cache.coordination.implementation" value="jms" />
    <property name="poms.cache.coordination.ipaddress" value="10.178.139.64" />
    <property name="poms.cache.coordination.port" value="7101" />
    <property name="poms.cache.coordination.multicast.group.address" value="226.10.12.64" />
    <property name="poms.cache.coordination.multicast.port" value="3121" />
    <property name="poms.cache.coordination.topic.connection.factory.name" value="EclipseLinkTopicConnectionFactory" />
    <property name="poms.cache.coordination.topic.name" value="EclipseLinkTopic" />
    <property name="poms.cache.coordination.username" value="weblogic" />
    <property name="poms.cache.coordination.password" value="weblogic" />
    <property name="poms.cache.coordination.password.encrypted" value="false" />
    </properties>
    </persistence-unit>
    </persistence>
    I have written a session customizer that reads properties from the persistence.xml and initializes stuff. But because of the warning i mentioned earlier... I am getting null for all property entries.
    I moved the eclipselink jar entry up ahead of openjpa jar entry in weblogic.server.modules_10.3.1.0.xml and refcount.xml in /modules/features directory. I am still getting the same problem.
    I read in many posts for workarounds for this issue but didnt find anything which worked for me. I would be grateful if someone could provide me a hint as to how to make it work.
    Thanks in advance,
    Prashanth.

    Prashanth,
    Hi, there should be no issue running EclipseLink on WebLogic while you see this warning. If you are getting null properties it may be the result of another issue, could you post specific exceptions and the part of your client code that is having a problem.
    1) The warning below normally appears only when running your persistence unit with an "application managed" JTA datasource as opposed to a "globally defined server scoped datasource". Even then it can be ignored as there are still parts of WebLogic that depend on OpenJPA. Even though the warning states that properties are ignored - they are not and you should see your persistence unit loaded properly.
    I encountered this issue when running an "application managed" JTA - here is an extract of the log showing the warning and the full functioning of the pu later - the persistence unit and example code can be found on the weblogic tutorial examples link below
    "[EL Finer]: 2008.10.29 13:03:55.565--ClientSession(30346337)--Thread(Thread[[ACTIVE] ExecuteThread: '20' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--client released
    WARNING: Found unrecognized persistence provider "org.eclipse.persistence.jpa.PersistenceProvider" in place of OpenJPA provider. This provider's properties will not be used.
    [EL Info]: 2008.10.29 13:03:56.079--ServerSession(14772987)--EclipseLink, version: Eclipse Persistence Services - 1.1.0 (Build 20081023)
    [EL Info]: 2008.10.29 13:03:56.391--ServerSession(14772987)--file:/C:/view_w34r1a/examples/org.eclipse.persistence.example.jpa.server.weblogic.enterpriseEJB/build/classes/-exampleLocal login successful
    15 Entities in storage: 15
    [EL ExampleLocal EM]: enterprise: Object: [email protected]( id: 6 state: null parent: HashSet@15794734 references: HashSet@15794734)
    [EL ExampleLocal EM]: enterprise: Object: [email protected]( id: 26 state: null parent: HashSet@8800655 references: HashSet@8800655)
    I raised the following minor issue with our WebLogic Server team in Oct for reference - however this warning did not affect proper functioning of EclipseLink JPA.
    https://bug.oraclecorp.com/pls/bug/webbug_edit.edit_info_top?rptno=7520161
    You may reference the following tutorial on running EclipseLink JPA on WebLogic 10.3, it details all the steps necessary to get a JTA container managed persistence unit running via a stateless session bean and a servlet client. It also details and links to application managed datasource configuration details.
    http://wiki.eclipse.org/EclipseLink/Examples/JPA/WebLogic_Web_Tutorial
    2) eclipselink.jar location in WebLogic?
    The eclipselink.jar library should stay in the modules or patch_* directory depending on whether you are running a standalone WebLogic server or as part of a Fusion Middleware JDeveloper environment.
    See the following link that details deployment options for WebLogic and EclipseLink
    http://wiki.eclipse.org/EclipseLink/Examples/JPA/WebLogic_Web_Tutorial#EclipseLink_JAR_location
    Note: I have not modified the load order of EclipseLink, OpenJPA or Kodo, I am running all including this version of OpenJPA in my modules directory. [org.apache.openjpa_1.0.0.0_1-1-1-SNAPSHOT.jar]
    3) I noticed that you are defining the target-database property in your persistence unti but you are running as JTA not RESOURCE_LOCAL. This property can be removed if your JTA datasource is defined as a Transactional server scoped datasource via the WebLogic console.
    thank you
    /michael
    http://www.eclipselink.org

  • AQ Database Persistence Provider

    Hi ,
    i am trying to configure a Database Persistence Provider on OC4J 10.1.3.3 for an AQ database queue , i have defined a Connection Pool and Data Source for that DataBase Connection , and then (through the EM Deploy Database Persistence Provider) i do specify the Resource Adapter Module Name and select the defined DataSource , but it gives me the following error :
    Error
    An error has occurred.
    connectors\ojms.rar (The system cannot find the path specified)
    connectors\ojms.rar (The system cannot find the path specified)
    any hints,
    Thanks in advance.

    Check the comments at the end of this blog post...
    http://mike-lehmann.blogspot.com/2006/09/simple-mdb-with-oracle-database-jms.html
    Hope that helps.
    Rod

  • JPA - PERSISTENCE PROVIDER NOT FOUND

    Hi,
    I am using JPA to connect to my SQL Database and using web logic 9.2 server..
    I get an No Persistence Provider exception
    any idea what this cud be
    Thanks
    Karthik

    Well, i've never worked with WebLogic, but you need a JPA implementation provider, like toplink-essentials or hibernate-entity-manager.
    You can also check your persistence.xml and look for some missing configuration.
    Here's an example from the hibernate documentation:
    <persistence 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"
       version="1.0">
       <persistence-unit name="sample">
          <jta-data-source>java:/DefaultDS</jta-data-source>
          <properties>
             <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>
             <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
          </properties>
       </persistence-unit>
    </persistence>Hope it helps...

  • Wrong exception thrown by persistence provider

    Hi.
    I am using EclipseLink as persistence provider.
    I am invoking getReference() on a non-existing entity.
    Then the provider throws:
    org.eclipse.persistence.exceptions.DatabaseException
    Internal Exception: java.sql.SQLIntegrityConstraintViolationException: INSERT on table 'TTTT' caused a violation of foreign key constraint 'CCCCC' for key (1000000).  The statement has been rolled back.I am expecting an EntityNotFoundException.
    What is wrong here ?
    Thanks

    Hmmm.. you have a point..
    but the getReference spec says raising that exception might be deffered to the end of transaction/on flush, if not being raised on the method invocation itself.
    So isnt it legal the construct:
    EntityInstance e = new EntityInstance();
    e.setProperty(em.getReference(PropertyClass.class, id));
    em.persist(e);How can I be sure if the reference is valid ?
    Isnt the exception the proper mechanic to get informed about a problem ?

  • Error in registering a provider for External Application for Web Clipping

    Getting Error: The provider URL specified may be wrong or the provider is not running. (WWC-43176)
    when trying to register a provider for an external application for Web Clipping

    Hi Vineet,
    The admins applied a patch to my version of the OracleAS 10g Version 9.0.4. and now I able to register a provider with the same URL but different Provider Name. I added My Yahoo Web Clipping from the Portlet Staging Area. That works fine but when I click on the check mail link in the Web Clipping Studio it gives me the following error. I have tried several times and I get the same error....
    An exception has occured : WCS-514 -- Get status code 403 to URL http://us.rd.yahoo.com/my/prop/mail/*http://mail.yahoo.com/ by method get
    Please click "Cancel" or "Back" in the above panel (if present) to retry. Otherwise, please try to click "Back" (from the browser) to go back to the Oracle Portal page to restart.

  • Custom authorization provider for WL7 problem (not getting all parameters from ContextHandler)

    I'm implementing a custom authorization provider for WebLogic 7.
    In my Access Decision isAccessAllowed method I need to check values of
    the parameters passed to an EJB method. Now, if an EJB method I have
    two parameters of the same type, for example int, when I get
    ContextElement array from ContextHandler and iterate through it to get
    names and values of the parameters I get the same value (value of the
    first int parameter) from both ContextElement's.
    Here is the code:
    String [] names = ch.getNames();
    for (int i = 0; i < names.length; i++)
    String name = names;
    System.out.println("name = " + name);//here it gets array of
    Strings, which contains two parameter names: "int","int",
    which are the types of EJB method parameters
    ContextElement[] ces= ch.getValues(names);
    for (int j = 0; j < ces.length; j++)
         ContextElement ce = ces[j];
         System.out.println(ce.getName()+ " = " + ce.getValue());
    //here if the value of the first int was 2 and the second 0,
    it would get 2 from both ContextElements (each of ContextElements will
    have name "int"
    If I try this with method parameters of different types, for example
    int with value 2 and long with value 0, then this code work fine -
    first ContextEleement has name int and value 2 and the second has name
    long and value 0.
    Thanks,
    -Oleg Kozlov.

    I'm implementing a custom authorization provider for WebLogic 7.
    In my Access Decision isAccessAllowed method I need to check values of
    the parameters passed to an EJB method. Now, if an EJB method I have
    two parameters of the same type, for example int, when I get
    ContextElement array from ContextHandler and iterate through it to get
    names and values of the parameters I get the same value (value of the
    first int parameter) from both ContextElement's.
    Here is the code:
    String [] names = ch.getNames();
    for (int i = 0; i < names.length; i++)
    String name = names;
    System.out.println("name = " + name);//here it gets array of
    Strings, which contains two parameter names: "int","int",
    which are the types of EJB method parameters
    ContextElement[] ces= ch.getValues(names);
    for (int j = 0; j < ces.length; j++)
         ContextElement ce = ces[j];
         System.out.println(ce.getName()+ " = " + ce.getValue());
    //here if the value of the first int was 2 and the second 0,
    it would get 2 from both ContextElements (each of ContextElements will
    have name "int"
    If I try this with method parameters of different types, for example
    int with value 2 and long with value 0, then this code work fine -
    first ContextEleement has name int and value 2 and the second has name
    long and value 0.
    Thanks,
    -Oleg Kozlov.

  • How to fix this error "this iPad is not able to complete the activation process. Please press Home and start over. If the issue persists, please visit your nearest Apple Store or Authorized service provider for more information or replacement"?

    How to fix this error "this iPad is not able to complete the activation process. Please press Home and start over. If the issue persists, please visit your nearest Apple Store or Authorized service provider for more information or replacement"? When I plugged in my iPad this popped up!

    Hi csreddy, 
    If you are receiving a message to contact an Apple Retail Store or Authorized Service Provider for help updating from iOS 3, click on the link below to initiate that support:
    Update the iOS software on your iPhone, iPad, and iPod touch - Apple Support
    http://support.apple.com/en-us/HT204204
    Update your device using iTunes
    If you can’t update wirelessly, or if you want to update with iTunes, follow these steps:
    Install the latest version of iTunes on your computer.
    Plug in your device to your computer.
    In iTunes, select your device.
    In the Summary pane, click Check for Update. 
    Click Download and Update.
    If you don't have enough free space to update using iTunes, you'll need to delete content manually from your device.
    Find out what to do if you get other error messages while updating your device.
    Last Modified: Jan 12, 2015
    Apple - Find Locations
    https://locate.apple.com
    Contact Apple for support and service - Apple Support
    http://support.apple.com/en-us/HT201232
    Regards,
    - Judy

  • Yours sincerely! I just bought a Sony DCR-SD1000 camera only when installing the cd drivers not supported by the operating system Machintosh. I've contacted the seller said the store did not provide for the apple os. How can I move all the files on the ca

    Yours sincerely! I just bought a Sony DCR-SD1000 camera only when installing the cd drivers not supported by the operating system Machintosh. I've contacted the seller said the store did not provide for the apple os. How can I move all the files on the camera the port out is to use a USB data cable to a laptop for my macbookpro can not read the contents of the file and the camera. I also want to use the lens on the camera as a substitute for the embedded camera on my macbookpro, what should I do to replace the embedded camera on macbookpro with sony camera so that the camera could be more variety and can I record when I turned macbookpro . Please help for this so that I can quickly capture the results from sony camera to my macbookpro. Thank you.

    See this page http://macosx.com/forums/networking-compatibility/296947-sony-camcorder-my-mac.h tml - might be some helpful tips there.
    Clinton

Maybe you are looking for

  • How do I delete mass junk emails?

    It seems to me that when I recieve a large quantity of junk emails to my Outlook via my Iphone 5 I shouldn't have to individually mark each one before I can trash them. I should be able to select all and then unmark the ones I want to save. The guys

  • How does one check for view changes to avoid unnecessary reprovision?

    I have a couple of ActiveSync resources that I setup custom userforms and workflows for to sync up only a couple of attributes from each one. With ActiveSync whenever a user account is modified it processes the modified account no matter which attrib

  • Creation of Filter - SE18??

    Hi All How can we create a filter (SE18)? Jothi has explained me about BADIs some time ago.. while I am practising I got struck with the creation of filter... Say for ex: How can we create a filter for BADI HRHAP00_DOC_BC? and also Re: You have to ma

  • Implementing Conditional Insert, Update, and Delete Allows for View Objects

    Steve, Thanks for the info in this article it was very helpful. I have one question as I created a test case that used dept & emp tables as master and detail. Placing code in the emp detail ViewRowImpl that also tests to see if the master is updateab

  • How startTValue works ?

    Hi, When I draw a Path in Illustrator then I write a text on it, I wan't to get back the startTValue of the TextFrame. When the drawn path isn't closed, I understand the startTValue : If I have 3 points drawn, the startTValue of the text will be betw