Toplink JPA properties in persistence unit are ignored

I'm trying to make some EJB3 stateless session bean webservices, using the toplink essentials (build b41 beta 2) shipped with OC4J stand-alone 10.1.3.3.0.
Basically I have a 'model' project with my EJB3 entity beans, and a persistence.xml. Then I have a webservice project, that has the model project as a dependency. Both projects are in the same application in JDeveloper. I use a deployment profile to deploy to my seperate OC4J stand-alone instance.
My service runs and deploys fine. The persistence unit is read, and the correct datasource is selected and logged in on. However I notice two things:
- the container complains during deployment, telling me property toplink.server.platform.class.name is deprecated and I should use toplink.target-server. However, I've set the property toplink.target-server as a property in my persistence.xml file...
- I don't see any Toplink logging, although I've set the property toplink.logging.level to FINE in the persistence.xml.
This leads me to believe that the properties are somehow ignored. Has anyone experienced this as well? Any hints/tips/suggestions on how to fix this?
Cheers,
Bas
My persistence.xml:
<?xml version="1.0" encoding="windows-1252" ?>
<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" xmlns="http://java.sun.com/xml/ns/persistence">
  <persistence-unit name="VervoerPublicatiesPU" transaction-type="JTA">
    <provider>oracle.toplink.essentials.PersistenceProvider</provider>
    <jta-data-source>jdbc/SQLPUBDS</jta-data-source>
    <class>a.b.c.A</class>      
    <class>a.b.c.B</class>
    <properties>
        <property name="toplink.logging.level" value="FINE"/>
        <property name="oracle.toplink.essentials.config.CacheType" value="SoftWeak"/>
        <property name="toplink.target-database" value="SQLServer"/>
        <property name="toplink.target-server" value="OC4J_10_1_3"/>
    </properties>
  </persistence-unit>
</persistence>

I debugged this problem a few weeks ago. There are 2 things going on:
1. The EJB3 container is automatically adding the property 'toplink.server.platform.class.name' into what is passed to TopLink to ensure the proper container is configured. I have had a bug filed to get this changed to toplink.target-server in the 10.1.3.4 patch-set.
2. The logging by default goes into the OC4J log found in <HOME>\j2ee\home\log\oc4j
You can re-configure OC4J to also log these messages to stdout or if you only want them to stdout you can simply set the logging-type in the persistence unit properties.
      <property name="toplink.logging.logger" value="DefaultLogger"/>Doug

Similar Messages

  • Multiple Persistence Units AND one transaction

    Hello,
    I'm using JPA implementation for my EJB Project.
    I have 2 persistence units and I'm using them in the same method.
    I want to persist 2 object belonging each one to a different persistence unit
    The 2 persistence units are related to different databases.
    Everything is going fine and no exception is raised BUT only one object is persisted and the other one is not.
    Have anyone had a similar problem before.
    Any help will be appreciated.
    Thanks in advance.
    Edited by: ImaneA on Jan 18, 2011 9:29 AM

    @Yordan :
    First of all, thanks a lot for you answer.
    At the end, I didn't use two EJB Projects :
    1 - I used only one datasource( associated to one database ) in the persistence.xml
    2 - I created a DBLink in SQL Server
    3 - I created a synonym in the first database to get data from the second database.
    And it works
    But thanks for the answer, I may use you solution in my next project
    @Rolf :
    No, In NWA I've declared my datasources as normal datasources.
    But Plz if you have docs that talks about XDataSources plz share them and thanks in advance.
    Edited by: ImaneA on Jan 25, 2011 9:21 AM

  • Multiple Persistence Units in persistence.xml

    Hi,
    in my session bean I want to read data from two ORACLE-database tables, which are located in two ORACLE-schemas (same ORACLE-instance). So I have defined two datasources, one for each schema. Then I defined two persistence-units in my persistence.xml:
    <?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="DACC/AEMA">
              <jta-data-source>AEMA</jta-data-source>
         </persistence-unit>
         <persistence-unit name="DACC/ALLGEMEIN">
              <jta-data-source>ALLGEMEIN</jta-data-source>
         </persistence-unit>
    </persistence>
    In NetWeaver Development Studio this result in the following error:
    "2 persistence units are found. Only exactly one persistence unti is supported."
    What's the solution here? Of course I could define two session beans. But this would result in two development components (DC) as well, because there is only 1 persistence.xml per DC (is this correct?). I don't think this is a good idea. Any other suggestions?
    Kind regards,
    Christoph

    Hi Christoph,
    From a Java EE server perspective there are no issues with multiple PUs in a persistence.xml. This is a limitation of NWDS, or WTP (Dali), to be precise. So, you could try to ignore this error and deploy on the server.
    HTH!
    \-- Vladimir

  • Persistence-unit-defaults in orm.xml do not impact TopLink Essentials?

    Hi,
    I have configured a default schema in the persistence-unit-defaults section of the orm.xml mapping file:
    <persistence-unit-metadata>
         <persistence-unit-defaults>
              <schema>SCHEMA_NAME</schema>     
         </persistence-unit-defaults>
    </persistence-unit-metadata>
    The queries that TopLink JPA is generating (and logging) do not qualify any table name with the schema as configured above. It seems that the persistence-unit-default settings are ignored by TopLink JPA?
    N.B: TopLink mentions that it is searching for a file named orm.xml and that it found one - so the file should be processed by TopLink. ("Found a default mapping file at ...")
    Any ideas?

    Thank you for mentioning that workaround.
    Regarding to the results of my tests, the persistence-unit-defauls "schema" does not affect sequences? Is this part of the bug and can expected to be fixed or is the schema/owner of sequences outside the JPA spec?
    currently I found no other solution than to specify the default schema in the persistence-unit-defaults in orm.xml AND declarate all sequences used with the fully qualified name, i.e. when switching the schema this would require changing it at multiple points....
    regards,
    hans

  • Multiple persistence units with name "Model" are defined at the same scope

    Hi,
    I get this error when deploying from Jdeveloper 10.1.3.4 to OAS 10.1.3.
    The release notes for Jdev 10.1.3.1 say the following:
    "To avoid this error, update the ViewController project settings to remove the dependency on the Model project before deploying the ADF web application to Standlone OC4J."
    So I removed the dependancy but now none of my EJB's are deployed! If I go to the Enterprise Manager Console I can only see my WEB MODULE but no EJBs.
    Can anyone shed any light on this issue? Perhaps I have configured my incorrectly.
    ps. I am trying to deploy an EJB3 web app so I do not have any deployment descriptors as the documentation say that they are not needed.
    Thanks

    Also, the reason you are seeing those errors in your first project after generating entities from the second connection is because the project wide schema is being updated to the second connections generation schema. If you go into the JPA project properties you can change it back. This workflow would need to change with multiple persistence unit support.
    Neil

  • Duplicate persistence units in JPA weblogic

    Hello, I'm cross-posting thsi question from weblogic forum as a suggestion from james.bayer.
    I am using weblogic 10.3.
    I am trying to deploy a spring web application with severaljars, that contain jpa entities with a persistence.xml. The persistence unit name in all persistence.xml are equal. That is for spring no problem, because i wrote a PersistenceUnitManager, that merges all persistence units into one.
    So far so good. But weblogic cant't deploy the war, because while validation of the deployment, wls throws an exception, that there are two persistence unit with the same name.
    Does anybody has an idea how to deploy this war?
    Can i switch off the validation of the persistence.xml?
    The full stack trace is:
    weblogic.application.ModuleException: Failed to load webapp: 'sfw-poc-condicao-pagamento-web.war'
         at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:404)
         at weblogic.application.internal.flow.ScopedModuleDriver.prepare(ScopedModuleDriver.java:180)
         at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)
         at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:508)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:149)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:47)
         at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:1223)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
         at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:367)
         at weblogic.application.internal.SingleModuleDeployment.prepare(SingleModuleDeployment.java:43)
         at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:154)
         at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60)
         at weblogic.deploy.internal.targetserver.AppDeployment.prepare(AppDeployment.java:141)
         at weblogic.management.deploy.internal.DeploymentAdapter$1.doPrepare(DeploymentAdapter.java:40)
         at weblogic.management.deploy.internal.DeploymentAdapter.prepare(DeploymentAdapter.java:191)
         at weblogic.management.deploy.internal.AppTransition$1.transitionApp(AppTransition.java:22)
         at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:240)
         at weblogic.management.deploy.internal.ConfiguredDeployments.prepare(ConfiguredDeployments.java:166)
         at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:122)
         at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:181)
         at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:97)
         at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused By: weblogic.deployment.EnvironmentException: duplicate persistence units with name sfw-persistence-unit in scope sfw-poc-condicao-pagamento-web.war. First PU location: file:/C:/java/servers/Oracle/Middleware/user_projects/domains/base_domain/servers/softway/tmp/_WL_user/sfw-poc-condicao-pagamento-web/rrg25b/war/WEB-INF/lib/sfw-class-loader-0.0.1-SNAPSHOT.jar. Second PU location: file:/C:/java/servers/Oracle/Middleware/user_projects/domains/base_domain/servers/softway/tmp/_WL_user/sfw-poc-condicao-pagamento-web/rrg25b/war/WEB-INF/lib/sfw-custom-jar-0.0.1-20100622.030351-65.jar
         at weblogic.deployment.AbstractPersistenceUnitRegistry.assertNoDuplicate(AbstractPersistenceUnitRegistry.java:313)
         at weblogic.deployment.AbstractPersistenceUnitRegistry.processDescriptor(AbstractPersistenceUnitRegistry.java:291)
         at weblogic.deployment.AbstractPersistenceUnitRegistry.loadPersistenceDescriptor(AbstractPersistenceUnitRegistry.java:192)
         at weblogic.deployment.AbstractPersistenceUnitRegistry.loadPersistenceDescriptors(AbstractPersistenceUnitRegistry.java:101)
         at weblogic.deployment.ModulePersistenceUnitRegistry.<init>(ModulePersistenceUnitRegistry.java:58)
         at weblogic.servlet.internal.WebAppModule.setupPersistenceUnitRegistry(WebAppModule.java:1812)
         at weblogic.servlet.internal.WebAppModule.getWebClassLoader(WebAppModule.java:1604)
         at weblogic.servlet.internal.WebAppServletContext.initClassLoader(WebAppServletContext.java:2969)
         at weblogic.servlet.internal.WebAppServletContext.<init>(WebAppServletContext.java:438)
         at weblogic.servlet.internal.WebAppServletContext.<init>(WebAppServletContext.java:487)
         at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:418)
         at weblogic.servlet.internal.WebAppModule.registerWebApp(WebAppModule.java:976)
         at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:381)
         at weblogic.application.internal.flow.ScopedModuleDriver.prepare(ScopedModuleDriver.java:180)
         at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)
         at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:508)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:149)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:47)
         at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:1223)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
         at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:367)
         at weblogic.application.internal.SingleModuleDeployment.prepare(SingleModuleDeployment.java:43)
         at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:154)
         at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60)
         at weblogic.deploy.internal.targetserver.AppDeployment.prepare(AppDeployment.java:141)
         at weblogic.management.deploy.internal.DeploymentAdapter$1.doPrepare(DeploymentAdapter.java:40)
         at weblogic.management.deploy.internal.DeploymentAdapter.prepare(DeploymentAdapter.java:191)
         at weblogic.management.deploy.internal.AppTransition$1.transitionApp(AppTransition.java:22)
         at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:240)
         at weblogic.management.deploy.internal.ConfiguredDeployments.prepare(ConfiguredDeployments.java:166)
         at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:122)
         at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:181)
         at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:97)
         at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Thanks a lot

    They need to have different names.
    James : http://www.eclipselink.org

  • How to verify whether the persistence unit objects are persistent or not?

    How to verify whether the persistence unit objects are persistent or not?
    I have successfully configure and deploy the Employees object as a persistence unit in Oracle Coherence according to the guide of Chapter 6 of Tutorial for Oracle Coherence 3.5.
    Using the RunEmployeeExample script, I have got the right results. I can see that after the cache object is updated, the database table (Employees) is also updated accordingly. The following is the output:
    2009-11-05 11:09:55.043/53.467 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=1): Member(Id=2, Timestamp=2009-11-05 11:09:54.867, Add
    ress=192.168.8.80:8089, MachineId=24656, Location=process:1684, Role=OracleRunEmployeeExample) joined Cluster with senior member 1
    2009-11-05 11:09:55.604/54.028 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=1): Member 2 joined Service Management with senior memb
    er 1
    2009-11-05 11:09:56.885/55.309 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=1): TcpRing: connecting to member 2 using TcpSocket{Sta
    te=STATE_OPEN, Socket=Socket[addr=/192.168.8.80,port=8089,localport=4084]}
    2009-11-05 11:09:57.847/56.281 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=1): Member 2 joined Service JpaDistributedCache with se
    nior member 1
    2009-11-05 11:09:57.917/56.341 Oracle Coherence GE 3.5.2/463 <D5> (thread=DistributedCache:JpaDistributedCache, member=1): Service JpaDistributed
    Cache: sending ServiceConfigSync containing 258 entries to Member 2
    2009-11-05 11:10:04.086/62.510 Oracle Coherence GE 3.5.2/463 <D5> (thread=DistributedCache:JpaDistributedCache, member=1): Deferring the distribu
    tion due to 1 pending configuration updates
    [EL Info]: 2009-11-05 11:10:14.36--ServerSession(2883071)--EclipseLink, version: Eclipse Persistence Services - 1.1.1.v20090430-r4097
    [EL Info]: 2009-11-05 11:10:22.312--ServerSession(2883071)--file:/C:/JDeveloper/mywork/AppJPA/JPA/classes/-JPA login successful
    2009-11-05 11:10:24.305/82.729 Oracle Coherence GE 3.5.2/463 <D5> (thread=DistributedCache:JpaDistributedCache, member=1): 3> Transferring 128 ou
    t of 257 primary partitions to member 2 requesting 128
    2009-11-05 11:10:25.697/84.121 Oracle Coherence GE 3.5.2/463 <D4> (thread=DistributedCache:JpaDistributedCache, member=1): 1> Transferring 129 ou
    t of 129 partitions to a node-safe backup 1 at member 2 (under 129)
    2009-11-05 11:10:25.857/84.281 Oracle Coherence GE 3.5.2/463 <D5> (thread=DistributedCache:JpaDistributedCache, member=1): Transferring 0KB of ba
    ckup[1] for PartitionSet{128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151,
    152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180,
    181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209,
    210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238,
    239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256} to member 2
    2009-11-05 11:10:40.678/99.102 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=1): TcpRing: disconnected from member 2 due to a kill r
    equest
    2009-11-05 11:10:40.678/99.102 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=1): Member 2 left service Management with senior member
    1
    2009-11-05 11:10:40.678/99.102 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=1): Member 2 left service JpaDistributedCache with seni
    or member 1
    2009-11-05 11:10:40.708/99.132 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=1): Member(Id=2, Timestamp=2009-11-05 11:10:40.708, Add
    ress=192.168.8.80:8089, MachineId=24656, Location=process:1684, Role=OracleRunEmployeeExample) left Cluster with senior member 1
    2009-11-05 11:10:40.879/99.303 Oracle Coherence GE 3.5.2/463 <Info> (thread=DistributedCache:JpaDistributedCache, member=1): Restored from backup
    128 partitions
    2009-11-05 11:10:40.879/99.303 Oracle Coherence GE 3.5.2/463 <D4> (thread=DistributedCache:JpaDistributedCache, member=1): 0, 1, 2, 3, 4, 5, 6, 7
    , 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 4
    4, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80
    , 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 11
    3, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
    2009-11-05 11:28:39.800/1178.224 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=1): Member(Id=2, Timestamp=2009-11-05 11:28:39.635, A
    ddress=192.168.8.80:8089, MachineId=24656, Location=site:metsys.metex.com,machine:mw12,process:1752, Role=CoherenceConsole) joined Cluster with s
    enior member 1
    2009-11-05 11:28:40.231/1178.655 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=1): Member 2 joined Service Management with senior me
    mber 1
    2009-11-05 11:28:41.633/1180.057 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=1): TcpRing: connecting to member 2 using TcpSocket{S
    tate=STATE_OPEN, Socket=Socket[addr=/192.168.8.80,port=8089,localport=4143]}
    2009-11-05 11:30:01.658/1260.082 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=1): Member 2 joined Service DistributedCache with sen
    ior member 2But I cannot verify if the persistence unit is still persistent.
    Edited by: jetq on Nov 5, 2009 11:49 AM

    I start a Coherence Console in another Windows Command Prompt as the following:
    D:\coherence\bin>  coherence.cmd
    ** Starting storage disabled console **
    java version "1.6.0_11"
    Oracle Coherence Version 3.5.2/463
    Grid Edition: Development mode
    Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved.
    2009-11-05 11:57:22.167/9.734 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=n/a): Service Cluster joined th
    e cluster with senior service member n/a
    2009-11-05 11:57:22.197/9.764 Oracle Coherence GE 3.5.2/463 <Info> (thread=Cluster, member=n/a): Failed to satisfy the v
    ariance: allowed=16, actual=20
    2009-11-05 11:57:22.197/9.764 Oracle Coherence GE 3.5.2/463 <Info> (thread=Cluster, member=n/a): Increasing allowable va
    riance to 17
    2009-11-05 11:57:22.677/10.244 Oracle Coherence GE 3.5.2/463 <Info> (thread=Cluster, member=n/a): This Member(Id=3, Time
    stamp=2009-11-05 11:57:22.392, Address=192.168.8.80:8089, MachineId=24656, Location=process:460, Role=CoherenceConsole,
    Edition=Grid Edition, Mode=Development, CpuCount=1, SocketCount=1) joined cluster "cluster:0xD3FB" with senior Member(Id
    =1, Timestamp=2009-11-05 11:09:09.738, Address=192.168.8.80:8088, MachineId=24656, Location=process:1816, Role=Coherence
    Server, Edition=Grid Edition, Mode=Development, CpuCount=1, SocketCount=1)
    2009-11-05 11:57:22.737/10.304 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=n/a): Member 1 joined Service
    Management with senior member 1
    2009-11-05 11:57:22.737/10.304 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=n/a): Member 1 joined Service
    JpaDistributedCache with senior member 1
    2009-11-05 11:57:23.108/10.675 Oracle Coherence GE 3.5.2/463 <D5> (thread=Invocation:Management, member=3): Service Mana
    gement joined the cluster with senior service member 1
    2009-11-05 11:57:23.759/11.326 Oracle Coherence GE 3.5.2/463 <D5> (thread=TcpRingListener, member=3): TcpRing: connectin
    g to member 1 using TcpSocket{State=STATE_OPEN, Socket=Socket[addr=/192.168.8.80,port=4168,localport=8089]}
    SafeCluster: Name=cluster:0xD3FB
    Group{Address=224.3.5.2, Port=35463, TTL=4}The previous output shows that this Coherence console (the client side) has already joined the JPA server.
    But the following output shows us that this console cannot access the Employees cache and cannot get the object entry. Why?
    Map (?): cache Employees
    2009-11-05 12:11:41.653/869.220 Oracle Coherence GE 3.5.2/463 <Info> (thread=main, member=3): Loaded cache configuration
    from "jar:file:/D:/coherence/lib/coherence.jar!/coherence-cache-config.xml"
    2009-11-05 12:11:43.055/870.622 Oracle Coherence GE 3.5.2/463 <D5> (thread=DistributedCache, member=3): Service Distribu
    tedCache joined the cluster with senior service member 3
    <distributed-scheme>
      <!--
      To use POF serialization for this partitioned service,
      uncomment the following section
      <serializer>
      <class-
      name>com.tangosol.io.pof.ConfigurablePofContext</class-
      name>
      </serializer>
      -->
      <scheme-name>example-distributed</scheme-name>
      <service-name>DistributedCache</service-name>
      <backing-map-scheme>
        <local-scheme>
          <scheme-ref>example-binary-backing-map</scheme-ref>
        </local-scheme>
      </backing-map-scheme>
      <autostart>true</autostart>
    </distributed-scheme>
    Map (Employees): list
    2009-11-05 12:11:48.402/875.969 Oracle Coherence GE 3.5.2/463 <Error> (thread=main, member=3):
    java.lang.RuntimeException: Storage is not configured
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.onMissing
    Storage(DistributedCache.CDB:9)
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.ensureReq
    uestTarget(DistributedCache.CDB:33)
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.sendParti
    tionedRequest(DistributedCache.CDB:31)
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.size(Dist
    ributedCache.CDB:13)
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap$EntrySet.
    size(DistributedCache.CDB:1)
            at com.tangosol.util.ConverterCollections$ConverterEntrySet.size(ConverterCollections.java:2720)
            at com.tangosol.coherence.component.application.console.Coherence.doList(Coherence.CDB:74)
            at com.tangosol.coherence.component.application.console.Coherence.processCommand(Coherence.CDB:442)
            at com.tangosol.coherence.component.application.console.Coherence.run(Coherence.CDB:39)
            at com.tangosol.coherence.component.application.console.Coherence.main(Coherence.CDB:3)
            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 com.tangosol.net.CacheFactory.main(CacheFactory.java:1400)Edited by: jetq on Nov 5, 2009 12:18 PM

  • Changing Persistence Unit (JPA)

    I’m developing a Java SE application using JPA.
    At runtime, the application needs to connect to different databases, each one with the same structure but different data (for example one database for each company).
    I can’t define in advance different Persistence Units in the persistence.xml file, because the user decides when and how many db will create.
    Is there some way to manipulate de persistence.xml file at runtime (for example change the PU name) without recompile the application?
    Thanks for your help.

    Yes, I found the solution.
    I use the method to obtain a EntityManager with a HashMap parameter, where I can put the name of the database. Example:
    String dbURL = "jdbc:mysql://localhost:3306/" + "myDataBaseName";
    HashMap<String, String> propMap;
    propMap = new HashMap<String, String>();
    propMap.put("toplink.jdbc.url", dbURL);
    EntityManager em = Persistence.createEntityManagerFactory("myPU", propMap).createEntityManager();
    This overrides de property in the persistence.xml file.
    Hope it help you.
    Regards

  • Problems with NWDS 7.1 EHP1 and JPA persistence unit

    In EJB project with JPA Facet Iu2019m working without any problem for several days. But, after two weeks, JPA plug-in of Eclipse is not working fine.
    When I try to generate DDL Iu2019m getting the following error window:  There isnu2019t a registered persistence unit in the project. But this is not true. Curiously sometimes it works fine.
    Can any body has any suggestion for correcting this issue?
    Thanks in advanced.

    Hi,
    I had the same problem and luckily stumbled upon the solution today.
    1. File persistence.xml is located in /ejbModule/META-INF. Path /build/classes is empty.
    2. Right-click on the DC/project and select "Properties".
    3. In "JPA", change parameter "Platform" or "Connection", then restore the original value. The purpose is to set a dirty flag which will make the IDE generate the missing stuff in path build/classes.
    4. A copy of resource branch META-INF and the .classes files will appear below /build.
    5. Right-click on the DC/Project and select "JPA-Tools -> Generate DDL".
    Please let me know if it works for you.
    Cheers,
    Thorsten

  • Toplink - JPA ignores lazy fetchtype , when it should NOT

    I'm using Blaze Data Services (The open sourced component of LiveCycle Data Service) , as well as Spring.
    Basically, I have concluded that even while closing the entity manager within the DAO, calls to get a collection on an object after the service layer has returned result in toplink trying to find the objects, vs finding null (or indirect list).
    This is only supposed to happen while the Entity Manager is open, correct?
    Here's a basic overview of my model
    public class Store {
    // ManyToMany
    // Lazy
    Collection<Catalog> catalogs;
    public class Catalog {
    // many to many
    // lazy
    Collection<Category> categories;
    public class Category {
    // many to many
    // lazy
    Collection<Product> products;
    public class Product {
    // here's the kicker
    Collection<Category> categories; // the categories this product is in
    I run into major problems when BlazeDS begins to serialize the beans, in that my lazy mappings are ignored, and tons of SQL statements begin to fire. In fact, the cyclic relationships cause the parent objects to be built as children of their children, for instance, a Product causes Categories to be built yet again, then Products, and it results in a heap space overflow.
    Basically, the only way I was able to work was by removing the mappings entirely.
    If I'm going to do this, I may as well not even use toplink. :-/
    Thanks in advance for any help!

    Also, the relationships I am talking about are not OnetoOne, or ManyToOne. I am not using toplink-agent, but the relationships I am having problems with are ManyToMany.
    DAO Method
    ....public Collection<Store> findAll()
    ........EntityManager em = emf.createEntityManager();
    ........try
    ............Query query = em.createNamedQuery("findStores");
    ............return query.getResultList();
    ........finally
    ............em.close();
    Bean definition
    @Entity
    public class Store implements Serializable
    ....@Id
    ....@GeneratedValue(strategy=GenerationType.SEQUENCE,
    ........................generator="mySeq")
    ....@SequenceGenerator(name="mySeq",
    ........................sequenceName="my_SEQ",
    ........................allocationSize=1)
    ....private long id;
    ....@Column(name="DESCRIPTION")
    ....private String description;
    ....@Column(name="SHORT_DESCRIPTION")
    ....private String shortDescription;
    ....@Column(name="LAST_UPDATE_USER")
    ....private String lastUpdateUser;
    ....@Embedded
    ....private TriggerAttributes triggerAttributes;
    ....@Column(name="NAME")
    ....private String name;
    ....@ManyToMany(fetch = FetchType.LAZY)
    ....@JoinTable(name="STORECATALOG",
    ................joinColumns = @JoinColumn(name = "STORE_UID"),
    ................inverseJoinColumns={@JoinColumn(name="CATALOG_UID")})
    ....private Collection<Catalog> catalogCollection;

  • Why inputfield 'readonly' properties are ignored in mobile webDynpro ?

    Hi all.
        We develop a webDynpro application in nw2004s
        We run the application in ppc device, we add the url parameter
        And in our UI, we have a inputfield, TextEdit ui element. And we found the ' readOnly ' properties are ignored.
        We want to use these properties to enhance the UI, how we can use another solution ?

    Hi jianhong,
    you can find a list of supported and ignored properties here:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/d4/0d6c4255b3c553e10000000a1550b0/frameset.htm
    If the user never may edit the text or the value, why not take TextView element?
    Kind Regards
    Stefanie

  • RE.PaperSource and PrinterDuplex properties are ignored by PrintOut method

    There is a thread with the title, PaperSource and PrinterDuplex properties are ignored by PrintOut method, which I have left a message on. This was last week.
    My question is, does anyone on the SAP support staff monitor new posts on existing threads?
    Please let me know as soon as possible. My company is having an issue exactly like the
    one described in this thread and I need a reply positive or negative to my question, so
    I can report to my project leader.
    Thank you for any help. You can get to the 'PaperSource and PrinterDuplex properties are ignored by PrintOut method' thread by searching for "papersource".
    Thanks again,
    Joe

    1) This is only community forum, so while we try, you may or may not get an answer. If you want to be sure of getting hold of support, you'll need to obtain a support contract here:
    http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryID=11522300
    2) I searched this forum (Legacy Application Development SDKs) for PaperSource and PrinterDuplex, but was not able to find the thread. Do you have a link to this? If not, please restate your issue ensuring that you provide the following information:
    version of CR used
    development language used
    is this a web or win app?
    is this behavior happening on your development computer or after the application is distributed?
    what service pack has been applied to your version of CR?
    Ludek

  • Can't deploy TopLink JPA on JBoss 5.1

    Greetings,
    I'm migrating from Hibernate to TopLink on JBoss 5.1. My new persistence.xml is the following:
    <?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="m2o-jar">
    <provider>oracle.toplink.essentials.PersistenceProvider</provider>
    <jta-data-source>java:/TestDS</jta-data-source>
    <properties>
    <property name="toplink.weaving" value="false" />
    <property name="toplink.target-database" value="MySQL" />
    <property name="toplink.jdbc.driver" value="com.mysql.jdbc.Driver" />
    <property name="toplink.external.transaction.controller.class.name" value="oracle.toplink.essentials.transaction.jboss.JbossTransactionController"/>
    <property name="toplink.ddl-generation" value="drop-and-create-tables" />
    <property name="toplink.logging.level" value="FINEST" />
    <property name="toplink.show_sql" value="true" />
    </properties>
    </persistence-unit>
    </persistence>
    While deploying on JBoss 5.1 I have the following:
    19:39:46,800 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@650761918{vfsfile:/home/nicolas/workspace/jds40/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_EAP_5.1_Runtime_Server1311339484761/deploy/m2o-ear.ear/m2o-ejb.jar/}
    19:39:46,800 INFO [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@650761918{vfsfile:/home/nicolas/workspace/jds40/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_EAP_5.1_Runtime_Server1311339484761/deploy/m2o-ear.ear/m2o-ejb.jar/}
    19:39:46,939 INFO [JBossASKernel] Created KernelDeployment for: m2o-ejb.jar
    19:39:46,939 INFO [JBossASKernel] installing bean: jboss.j2ee:ear=m2o-ear.ear,jar=m2o-ejb.jar,name=Facade,service=EJB3
    19:39:46,939 INFO [JBossASKernel] with dependencies:
    19:39:46,939 INFO [JBossASKernel] and demands:
    19:39:46,939 INFO [JBossASKernel]      jboss.ejb:service=EJBTimerService
    19:39:46,939 INFO [JBossASKernel]      persistence.unit:unitName=m2o-ear.ear/m2o-ejb.jar#m2o-jar
    19:39:46,939 INFO [JBossASKernel] and supplies:
    19:39:46,939 INFO [JBossASKernel]      jndi:m2o-ear/Facade/remote-de.dbag.jpa.m2o.FacadeRemote
    19:39:46,939 INFO [JBossASKernel]      jndi:m2o-ear/Facade/remote
    19:39:46,939 INFO [JBossASKernel]      jndi:/ejb/Facade/remote
    19:39:46,939 INFO [JBossASKernel]      Class:de.dbag.jpa.m2o.FacadeRemote
    19:39:46,939 INFO [JBossASKernel] Added bean(jboss.j2ee:ear=m2o-ear.ear,jar=m2o-ejb.jar,name=Facade,service=EJB3) to KernelDeployment of: m2o-ejb.jar
    19:39:46,956 INFO [PersistenceUnitDeployment] Starting persistence unit persistence.unit:unitName=m2o-ear.ear/m2o-ejb.jar#m2o-jar
    19:39:47,120 INFO [STDOUT] [TopLink Finest]: 2011.07.25 07:39:47.107--ServerSession(109396896)--Thread(Thread[HDScanner,5,jboss])--property=toplink.weaving; value=false
    19:39:47,121 INFO [STDOUT] [TopLink Finest]: 2011.07.25 07:39:47.120--ServerSession(109396896)--Thread(Thread[HDScanner,5,jboss])--property=toplink.orm.throw.exceptions; default value=true
    19:39:47,149 INFO [STDOUT] [TopLink Finer]: 2011.07.25 07:39:47.148--ServerSession(109396896)--Thread(Thread[HDScanner,5,jboss])--Searching for default mapping file in file:/home/nicolas/workspace/jds40/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_EAP_5.1_Runtime_Server1311339484761/deploy/m2o-ear.ear/m2o-ejb.jar/
    19:39:47,157 INFO [STDOUT] [TopLink Warning]: 2011.07.25 07:39:47.157--Thread(Thread[HDScanner,5,jboss])--java.lang.NullPointerException: null was thrown on attempt of PersistenceLoadProcessor to load class de.dbag.jpa.m2o.Facade. The class is ignored.
    19:39:47,158 INFO [STDOUT] [TopLink Warning]: 2011.07.25 07:39:47.157--Thread(Thread[HDScanner,5,jboss])--java.lang.NullPointerException: null was thrown on attempt of PersistenceLoadProcessor to load class de.dbag.jpa.m2o.Product. The class is ignored.
    19:39:47,158 INFO [STDOUT] [TopLink Warning]: 2011.07.25 07:39:47.158--Thread(Thread[HDScanner,5,jboss])--java.lang.NullPointerException: null was thrown on attempt of PersistenceLoadProcessor to load class de.dbag.jpa.m2o.FacadeRemote. The class is ignored.
    19:39:47,158 INFO [STDOUT] [TopLink Warning]: 2011.07.25 07:39:47.158--Thread(Thread[HDScanner,5,jboss])--java.lang.NullPointerException: null was thrown on attempt of PersistenceLoadProcessor to load class de.dbag.jpa.m2o.Instrument. The class is ignored.
    19:39:47,162 INFO [STDOUT] [TopLink Finest]: 2011.07.25 07:39:47.162--ServerSession(109396896)--Thread(Thread[HDScanner,5,jboss])--end predeploying Persistence Unit m2o-jar; state Predeployed; factoryCount 1
    19:39:47,213 INFO [SessionSpecContainer] Starting jboss.j2ee:ear=m2o-ear.ear,jar=m2o-ejb.jar,name=Facade,service=EJB3
    19:39:47,215 INFO [EJBContainer] STARTED EJB: de.dbag.jpa.m2o.Facade ejbName: Facade
    19:39:47,246 INFO [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:
         /ejb/Facade/remote - EJB3.x Default Remote Business Interface
         m2o-ear/Facade/remote-de.dbag.jpa.m2o.FacadeRemote - EJB3.x Remote Business Interface
    I have toplink-essentials.jar and hibernate-entitymanager.jar on the classpath. Please help.
    Kind regards,
    Nicolas DUMINIL

    Hello,
    More information is required to help you, and as James suggested, the best option would be to move to EclipseLink instead of TopLink Essentials as EclipseLink is actively being developed and is the JPA 2 RI.
    Running it on the latest EclipseLink ensures that you are not hitting an issue that has already been fixed, and both are based off TopLink.
    Are you deploying an Ear or an exploded directory? If the later, can you try using an Ear?
    Best Regards,
    Chris

  • Spring and TopLink/JPA on OC4J 10.1.3.4.0

    Our configuration worked fine on OC4J 10.1.3.1 (linux) and 10.1.3.3 (windows). We have a problem with JPA (toplink essentials--not eclipselink) on OC4J 10.1.3.4.0 using Spring (2.0.7 and 2.5.6). We found that it was trying to connect to the default OracleDS data source(there were 2 connections in toplink essentials for some reason), but once we defined an OracleDS, it gave us this error:
    javax.servlet.ServletException: javax.faces.el.EvaluationException: Error getting property 'experiments' from bean of type gov.llnl.nif.dataviz.mssar.web.ExperimentListBean: org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is java.lang.IllegalStateException:
    Exception Description: Cannot use an EntityTransaction while using JTA.
    Our persistence.xml looks like:
    <?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="mssar">
              <class>gov.llnl.nif.dataviz.mssar.model.ExperimentInfo</class>
              <class>gov.llnl.nif.dataviz.mssar.model.UsePlan</class>
         <properties>
         <property name="toplink.cache.shared.gov.llnl.nif.dataviz.mssar.model.ExperimentInfo" value="false"/>
         <property name="toplink.cache.shared.gov.llnl.nif.dataviz.mssar.model.UsePlan" value="false"/>
         </properties>
         </persistence-unit>
    </persistence>
    Our orm.xml looks like:
    <?xml version="1.0" encoding="UTF-8"?>
    <entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_1_0.xsd" version="1.0">
    </entity-mappings>
    Our spring configuration looks like:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:jee="http://www.springframework.org/schema/jee"
    xmlns:aop="http://www.springframework.org/schema/aop"
         xmlns:tx="http://www.springframework.org/schema/tx"
    xsi:schemaLocation="
    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
    http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-2.0.xsd
    http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
         http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd"
         default-autowire="byName">
    <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
    <property name="dataSource" ref="dataSource"/>
    <property name="jpaVendorAdapter">
    <bean class="org.springframework.orm.jpa.vendor.TopLinkJpaVendorAdapter">
    <property name="showSql" value="true"/>
    <property name="databasePlatform" value="oracle.toplink.essentials.platform.database.oracle.OraclePlatform"/>
    </bean>
    </property>
    <property name="loadTimeWeaver">
         <bean class="org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver"/>
    </property>
    </bean>
    <jee:jndi-lookup id="dataSource" jndi-name="jdbc/SSARDS"/>
    <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
    <property name="entityManagerFactory" ref="entityManagerFactory" />
         <property name="dataSource" ref="dataSource" />
    </bean>
         <bean id="experimentsQueryBuilder" class="gov.llnl.nif.dataviz.mssar.dao.jpa.ExperimentsQueryBuilderJpa"/>
         <bean id="experimentsDao" class="gov.llnl.nif.dataviz.mssar.dao.jpa.ExperimentsDaoJpa"/>
         <bean id="experimentListManager" class="gov.llnl.nif.dataviz.mssar.service.impl.ExperimentListManagerImpl"/>
    </beans>
    ExperimentInfo.java mapping looks like:
    @Entity
    @Table(name = "EXPERIMENT_IDS")
    public class ExperimentInfo implements ExperimentInformation {
         @Id
         @Column(name="EXPERIMENT_ID")
         String experimentId;
         @Column(name="EXPERIMENT_DESCRIPTION")
         String expDescription;
         @Column(name="STATUS")
         String status;
         @Column(name="EXPERIMENT_PI")
         String expPI;
         //Date lpomDate;
         //Date settingsDate;
         @Column(name="LPOM_DATE")
         Timestamp lpomDate;
         @Column(name="SETTINGS_DATE")
         Timestamp settingsDate;     
    UsePlan.java looks like:
    @Entity
    @Table(name="USE_PLAN")
    public class UsePlan extends BasePlan implements PlanData, Serializable {
         static final long serialVersionUID = -1555327955428351924L;
         @Id
         @Column(name="EXP_SHOT_ID")
         String expShotId;
         @Id
         @Column(name="LOCATION")
         String location;
         @Id
         @Column(name="INFO_VAR")
         String infoVar;
         @Id
         @Column(name="USE_ITEM_NAME")
         String useItemName;
         @Column(name="USE_PRIORITY")
         String usePriority;
    ExperimentListManagerImpl looks like:
    @Transactional(readOnly=true)
    public class ExperimentListManagerImpl implements ExperimentListManager {
    This is a read-only app but it should not use the cache.
    Our Dao Looks like:
    public class ExperimentsDaoJpa extends JpaDaoSupport implements ExperimentsDao {
    private QueryBuilder experimentsQueryBuilder;
    public List<ExperimentInfo> shotsByQueryBean(ExperimentsQueryBean queryBean, String sortColumn, boolean ascending) {
         try {
              getJpaTemplate().flush();
              experimentsQueryBuilder.buildQuery(queryBean);
         experimentsQueryBuilder.setSortColumn(sortColumn, ascending);
         List<ExperimentInfo> result = getJpaTemplate().findByNamedParams(experimentsQueryBuilder.getQuery().toString(), experimentsQueryBuilder.getParams());
         // pull new results from database
         /*for (ExperimentInfo ei : result) {
              getJpaTemplate().refresh(ei);
         return result;
         } catch (Throwable t) {
              t.printStackTrace();
              return null;
         public void setExperimentsQueryBuilder(QueryBuilder experimentsQueryBuilder) {
              this.experimentsQueryBuilder = experimentsQueryBuilder;
    Thanks,
    John Carlson

    We also had this problem. We have changed the TransactionManager.
    Replace the JPATransactionManager with the JTATransactionManager.
    <bean id="transactionManager" class="org.springframework.transaction.jta.JtaTransactionManager" />
    If you are using JTA you can't use the JPA Transaction Manager. It doesn't support JTA.
    Found it on a forum of Spring. (http://forum.springframework.org/showthread.php?t=48191)
    Dennis

  • Set Timeout in TopLink JPA

    Hi
    I am using a standalone JPA application with Toplink
    I need to implement a timeout feature
    But I do not find any options for setting the timeout in any of
    javax.persistence.EntityManager;
    javax.persistence.Query etc
    nor do i find any property that I can add in the persistence.xml
    My persistence.xml is as below
    <persistence-unit name="CHN" transaction-type="RESOURCE_LOCAL">
    <provider>
         oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider
    </provider>
    <class>com.TestJPA</class>          
    <properties>
         <property name="toplink.jdbc.driver"
    value="oracle.jdbc.driver.OracleDriver" />
         <property name="toplink.jdbc.url"
         value="jdbc:oracle:thin:@localhost:1521:XE" />
         <property name="toplink.jdbc.user" value="JEN" />
         <property name="toplink.jdbc.password" value="JEN" />
    </properties>
    </persistence-unit>
    Thanks
    lad

    Unfortunately, the eclipselink.jdbc.timeout hint is only in EclipseLink. If you are using TopLink Essentials, the only query hints available are in the oracle.toplink.essentials.config.TopLinkQueryHints class and does not include the jdbc timeout. If you cannot upgrade/migrate to EclipseLink, you can set it directly using the DatabaseQuery.setQueryTimeout() method. You will need to cast the EJBQuery and get the underlying TLE query:
    ((oracle.toplink.essentials.ejb.cmp3.EJBQuery)jpaQuery).getDatabaseQuery().setQueryTimeout(yourIntValue);
    jpaQuery.getResultList();
    Best Regards,
    Chris

Maybe you are looking for

  • Report fonts mapping and PDF output problem(Easten European languages)

    Hi experts, I have such a problem. If i run oracle reports(10g) via reports builder all layouts looks fine. When i run them in PDF format via application server - report text and numbers strech out off frames, also textfields and text itself becomes

  • Crashes ever since latest software update

    Ever since I downloaded and installed the latest Apple software updates to my computer (Mac OS X 10.4.9 if I remember correctly, and whatever are the most recent updates to iTunes, QuickTime, and Backup), I've been unable to open Mail. Every time I t

  • Kernel panic 10.6.8 backtraced to com.apple.GeForce

    Recnetly experineced my first kernel panic in ages on my MBP 3.1. Recntly upgraded to 10.6.8 and, FWIW, the nVidia GeForce 8600M GT failed while under warranty about two years ago and the entire motherboard was replaced. Also, no external USB devices

  • Duplicate IP

    Hello friends, I wrote these lines because a very strange and particular issue happened in my network. There is a drawing of my topology:  I will explain first: 1. I have a big network (172.16.0.0/16) so I'm planning to cut it in VLANs. Since the net

  • Using php with oracle http server

    Hello folks This question might have been answered on this forum, but i haven't found it yet. Is it possible to integrate php into the apache server that is supplied with the oracle (9.2) database, the so called Oracle HTTP Server? What technical iss