Batch Updates with Toplink/JPA

Hi All,
I am new to JPA/Toplink and I wonder is there a way that we can do the batch updates/insertions using the JPA? If yes please help me how to do it?
My requirement is this, I need to fetch the n number of records from database and compare with the records from a file and insert/update/delete as required.
I don't wanted to do it one by one record but as a batch. Is there a way that I can do batch updates/inserts/deletes?
Any suggestion would be appreciated.
Thank you.

Hello,
I'm not sure how you are going to do the comparison as a batch and not record by record. A JPA query will give you objects back which you can use to compare and make changes to as neccessary. When you commit, the JPA provider will commit those changes to the database for you. TopLink/EclipseLink has options to efficiently comit those changes, even combining them into batches where possible. See http://wiki.eclipse.org/Optimizing_the_EclipseLink_Application_(ELUG)#How_to_Use_Batch_Writing_for_Optimization for details on using batch writing in EclipseLink.
Best Regards,
Chris

Similar Messages

  • Batch updates with callable/prepared statement?

    The document http://edocs.bea.com/wls/docs70/oracle/advanced.html#1158797 states
    that "Using Batch updates with the callableStatement or preparedStatement is
    not supported". What does that actually mean? We have used both callable and prepared
    statements with the batch update in our current project (with the Oracle 817 db).
    It seems to run ok anyway.

    So the documentation should state that batch updates do not work ok in old versions
    of JDriver for Oracle, BUT work correctly with newer version. Additionally, batch
    updates work ok when used with Oracle supplied jdbc-drivers?
    "Stephen Felts" <[email protected]> wrote:
    Support for addBatch and executeBatch in the WLS Jdriver for Oracle was
    added in 7.0SP2.
    It was not available in 6.X or 7.0 or 7.0SP1.
    "Janne" <[email protected]> wrote in message news:3edb0cdc$[email protected]..
    The document http://edocs.bea.com/wls/docs70/oracle/advanced.html#1158797
    states
    that "Using Batch updates with the callableStatement or preparedStatementis
    not supported". What does that actually mean? We have used both callableand prepared
    statements with the batch update in our current project (with the Oracle817 db).
    It seems to run ok anyway.

  • Weblogic 9.1 with toplink JPA - Problem creating entityManagerFactory

    I am using weblogic 9.1 with toplink jpa provider.
    I am getting the error while creating entityManagerFactory.
    Exception stack trace
    faces.FacesException: #{LogonMB.authenticateLogin}: javax.faces.el.EvaluationException: java.lang.ExceptionInInitializerError
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:98)
         at javax.faces.component.UICommand.broadcast(UICommand.java:332)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:287)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:401)
         at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:95)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:268)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:213)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:225)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:127)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:272)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:165)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3153)
         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:1973)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1880)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1310)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
    Caused by: javax.faces.el.EvaluationException: java.lang.ExceptionInInitializerError
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:150)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:92)
         ... 19 more
    Caused by: java.lang.ExceptionInInitializerError
         at com.arisglobal.cc.service.impl.PreferencesServiceImpl.getEntityManager(PreferencesServiceImpl.java:45)
         at com.arisglobal.framework.service.AbstractBusinessService.(AbstractBusinessService.java:24)
         at com.arisglobal.cc.service.impl.PreferencesServiceImpl.(PreferencesServiceImpl.java:36)
         at com.arisglobal.cc.factory.BusinessServiceFactory.createPreferencesService(BusinessServiceFactory.java:113)
         at com.arisglobal.cc.mb.LogonManagedBean.authenticateLogin(LogonManagedBean.java:51)
         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:585)
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:146)
         ... 20 more
    Caused by: Exception [TOPLINK-34002] (Oracle TopLink Essentials - 2006.7 (Build 060720)): oracle.toplink.essentials.exceptions.XMLParseException
    Exception Description: An exception occurred while processing persistence.xml from URL: file:/D:/ClinicalConnect/4. CODING/web/WEB-INF/classes/META-INF/persistence.xml. A SAXParser instance could not be created.
    Internal Exception: org.xml.sax.SAXNotRecognizedException: http://java.sun.com/xml/jaxp/properties/schemaLanguage
         at oracle.toplink.essentials.exceptions.XMLParseException.getXMLParseException(XMLParseException.java:101)
         at oracle.toplink.essentials.exceptions.XMLParseException.exceptionCreatingSAXParser(XMLParseException.java:73)
         at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.processPersistenceXML(PersistenceUnitProcessor.java:315)
         at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.processPersistenceArchveFromUnconvertableURL(PersistenceUnitProcessor.java:90)
         at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.processPersistenceArchive(PersistenceUnitProcessor.java:202)
         at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.getPersistenceUnits(PersistenceUnitProcessor.java:77)
         at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.initPersistenceUnits(JavaSECMPInitializer.java:222)
         at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.initialize(JavaSECMPInitializer.java:240)
         at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.initializeFromMain(JavaSECMPInitializer.java:277)
         at oracle.toplink.essentials.internal.ejb.cmp3.JavaSECMPInitializer.getJavaSECMPInitializer(JavaSECMPInitializer.java:80)
         at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.createEntityManagerFactory(EntityManagerFactoryProvider.java:118)
         at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
         at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:60)
         at com.arisglobal.cc.helper.ResourceManager.(ResourceManager.java:8)

    hi JavaCrazyLover
    u got why u getting the error i ma getting similar error its running fine in 8.1 but in web9.1 it is giving errors in some jsp pages may be due to versions or name spacing ie we write in top of the page DTD schema am not sure but i think , there is no jars to add on as such web 9.1 is upgraded one and it supports all files some where there will be conflicts between versions example JDK 1.5and 1.4 enum is a keyword in 9.1 but in normal in 8.1 if u get the solution for this error please mail me to [email protected]
    rgds
    Mohammed Mansoor

  • Batch Updation with new Batch via IDoc

    Hi,
    Is it possible to update the existing batch at the delivery level with the new batch from the IDoc during the Picking or PGI
    I checked the FM WS_DELVRY_UPDATE2 which is not allowing to do this...
    Any pointers on this will be helpful
    Any Clue on the above issue ?
    Thanks in Advance
    Rajesh
    Edited by: Rajesh on Mar 6, 2012 8:39 PM

    Possibly, have a look at OSS 748216.
    https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=748216
    Regards,
    Nick

  • Batch hint in toplink jpa

    hi all.
    Is there any mechanism in TopLink Essentials to make query with batch query hints like in EclipseLink?
    Thanks in advance.

    No, this functionality is only offered in EclipseLink. You can upgrade to EclipseLink for this.
    James : http://www.eclipselink.org

  • Using Stored Procedures with TopLink / JPA : Success explanation

    For those who have to use Stored Procedures in TopLink this is my success history :
    To call an Stored Procedure from the persistence, we have to use the direct JDBC connection because my TopLink version ( Essentials 10g ) ? to date ( 10g ) does not have support for Stored Procedures.
    Here is my code :
    <address>{color:#0000ff} EntityManagerFactory JPAemfactory = null;{color}</address>
    <address>{color:#0000ff} JPAemfactory = Persistence.createEntityManagerFactory ("MyPersistenceUnit"); // this is the name of the persistence unit wrote in the persistence.xml file{color}</address>
    <address>{color:#0000ff} EntityManagerr MyEntityManager = JPAemfactory.createEntityManager ();{color}</address>
    bq. <address>{color:#0000ff}// creation of the stored procedure calling string .... one question mark for every param, output included \\ String sql = "{call SP_GETLISTATARIFAS(?,?,?,?,?)}"; \\ // We get the JDBC connection \\ oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerImpl entityManager = (oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerImpl) MyEntityManager; \\ UnitOfWorkImpl uow = (UnitOfWorkImpl)entityManager.getUnitOfWork(); \\ // we create a request to the unitofwork because if dont the connection will not exist \\ uow.beginEarlyTransaction(); \\ Connection conexion = ((UnitOfWorkImpl)uow).getAccessor().getConnection(); \\ {color}{color:#0000ff} \\ try { \\ // Creation of the call and we will identify the params as they are in the stored procedure definitiondefinidos \\ CallableStatement call = conexion.prepareCall(sql); \\ {color}</address>
    bq. <address>{color:#0000ff} \\ // params INPUT with their values \\ call.setString("pIDMCUPO", "125"); \\ call.setString("pCODIGOHOT", "8023"); \\ call.setString("pCODCANAL", "WEB"); \\ call.setString("pCODSUBCANAL", "HOTEL"); \\ {color}</address><address>{color:#0000ff} \\ // params OUTPUT \\ call.registerOutParameter("rRESULTADO", java.sql.Types.VARCHAR); \\ {color}</address><address>{color:#0000ff} \\ // execution \\ call.execute(); \\ {color}</address><address>{color:#0000ff} \\ // getting the response \\ mcontratos_out = call.getString("rRESULTADO"); \\ {color}</address><address>{color:#0000ff} \\ // closing the proc \\ call.close(); \\ {color}</address><address>{color:#0000ff} \\ } catch (SQLException ex) { {color}</address><address>{color:#0000ff} // something you do if there is an error \\ {color}</address><address>{color:#0000ff} \\ } {color}</address>
    Hope this helps all the people that have searched a lot like me.......

    I have my entity manager setup in a singleton.
    I'm finding it's costly to generate the emf, but if I don't close the em (enitity manager) and emf (entity manager factory) my open cursor count climbs until I exceed the max number of open cursors on the database (11g RAC)
    I'm committing the connection, and uow, and closing the em at the end of each call.
    But until I close the emf, the open cursors aren't released.
    TransactionhistoryPkg tranPkg = new TransactionhistoryPkg(conn); //Class created over database package via JPublisher
    tranPkg.transactionhistoryInsSp(insertTrans.getCardId()); // executes db package
    tranPkg.closeConnection();
    conn.commit();
    uow.commit();
    uow.getAccessor().decrementCallCount();
    em.close();
    Am I missing something really obvious here??
    btw - I found this link helpful in troubleshooting the max cursors issue: https://support.bea.com/application_content/product_portlets/support_patterns/wls/InvestigatingORA-1000MaximumOpenCursorsExceededPattern.html

  • HELP!!! Strange Error with Batch Update

    While trying to do a batch update with the following preparedstatment:
    INSERT INTO TAB1
    (DATETIME,CALC_ID,SITE_ID,APPL_ID,VAL)
    values (
    {ts '2003-06-24 08:49:14'},
    (SELECT CALC_ID FROM TAB2 WHERE CALC_NAME=?),
    2,
    7,
    Notice the parameter in the subquery. This works fine for a single executeUpdate. But if i do two preparedstatement.addbatch calls and then executeBatch I see a unique constraint violation on (DATETIME,CALC_ID, and SITE_ID) CALC_ID is the only key that varies in my batch. It is as if the subquery is not being resolved and written literally to the field. If I try the 1st update by itself in add batch it works. If I try the second it works by itself. If I try them together in the batch it fails. The unique constraint is not violated when I execute them singly.
    Any Ideas?
    Thanks in advance.

    I've found that db2, PreparedStatements and batch updating do not work very well together. I've had to use dynmanic sql and build the update statement myself. Actually I wrote a query parser that builds the statement so I can pass it like a PreparedStatement.
    I'm not sure if your in db2 ver 7 but if so make sure your using fixpack 9. at lot of bad prepared statement behavior.

  • JDBC Batch Updates & PreparedStatement problems (Oracle 8i)

    Hi,
    we're running into problems when trying to use JDBC Batch Updates with PreparedStatement in Oracle8i.
    First of all, Oracle throws a SQLException if one of the statements in the batch fails (e.g. because of a unique constraint violation). As far as I understand, a BatchUpdateException should be thrown?
    The next problem is much worse:
    Consider this table:
    SQL> desc oktest
    ID NOT NULL NUMBER(10)
    VALUE NOT NULL VARCHAR2(20)
    primary key is ID
    When inserting in through batch updates with a PreparedStatement, I can pass 'blah' as a value for ID without getting an exception (Oracle silently converts 'blah' to zero). Only when the offending statement is the last statement in the batch, Oracle throws an exception (again, SQLException instead of BatchUpdateException).
    Any comments/suggestions are appreciated.
    E-mail me if you want to see the code...
    Thanks,
    Oliver
    Oracle version info:
    (Enterprise Edition Release 8.1.6.0.0, JServer Release 8.1.6.0.0, Oracle JDBC driver 8.1.6.0.0 and 8.1.7.0.0 (we're using the 'thin' driver)
    CLASSPATH=/opt/oracle/product/8.1.7/jdbc/lib/classes12.zip:...
    null

    Please refer
    http://www.oracle.com/technology/products/oracle9i/daily/jun07.html

  • Toplink JPA LAZY loading in Java SE works without javaagent?

    hi there,
    I tought that mappings like
    @JoinColumn(name = "join_col_name")
    @ManyToOne(cascade=CascadeType.ALL, fetch=FetchType.LAZY)
    private RelatedObject relObj;
    with TopLink JPA in Java SE environment works ONLY with the
    -javaagent:toplink-essentials-agent.jar
    JVM parameter?
    the strange thing is: I did 2 test runs, with and without the java agent parameter. I also could see that in the first case the weaver is working, in the second the property "toplink.weaving=false" is printed to the console BUT if I access the LAZY mapped attribute of the object instance it works in both cases - I expected a NullPointerEx. in the case without the javaagent.
    Is there anything I missed?
    Hans

    Chris,
    thank for for the tip about verifying lazy or eager fetching. The results are interesting - or better: confusing - to me:
    I have built a test project with 3 entities:
    Entity A hast @OneToMany to Entity B and
    Entity B has ManyToONe to Entity C
    A <-- B --> C
    ALL relations are marked with FetchType.LAZY in all directions.
    When I simply run the test project via main()-method out of eclipse, WITHTOUT specifycing a -javaagent parameter in the run dialog, I can confirm using your test case that the realtion IS LAZILY FETCHED.
    So, I do not really know how this should work without the javaagent.
    You mentioned statically weaved classed - is this the default case when no agent is present, how is it done? Toplink logging says that weaving is NOT active:
    ServerSession(16821027)--Thread(Thread[main,5,main])--property=toplink.weaving; value=false
    so how can the lazy loading work then?
    regards,
    Hans

  • PreparedStatement batch updates

    I'm trying to use a batch update with a PreparedStatement, but when my code executes
    I receive an error stating The JDBC 2.0 method is not implemented, when the code
    executes addBatch(). Does JRockit have any api documentation stating what is
    and is not implemented. Any suggestions on a workaround? I'm assuming there
    is a Weblogic specific class that will accomplish this, but I would rather not
    implement such a class unless there is no other alternative.

    Hi,
    This seems to be a JDBC driver specific question (may not be related to
    JRockit). You may post this in WebLogic JDBC news groups.
    Sathish Santhanam
    Developer Relations Engineer
    BEA Support
    "frank" <[email protected]> wrote in message
    news:3f01921a$[email protected]..
    >
    I'm using JRockit 7.0 sp2rp1
    "frank" <[email protected]> wrote:
    I'm trying to use a batch update with a PreparedStatement, but when my
    code executes
    I receive an error stating The JDBC 2.0 method is not implemented, when
    the code
    executes addBatch(). Does JRockit have any api documentation stating
    what is
    and is not implemented. Any suggestions on a workaround? I'm assuming
    there
    is a Weblogic specific class that will accomplish this, but I would
    rather
    not
    implement such a class unless there is no other alternative.

  • Jdeveloper 11 and/or toplink-jpa problem

    Hello,
    We have a big problem with toplink-jpa or jdev 11. I tried something very similar to the jdev/jpa tutorial (http://download-uk.oracle.com/otn_hosted_doc/jdeveloper/11/demos/JPA/JPA_Demo.html), only adapted to our db. I've been trying to solve this for hours, but whenever we run the sample facade client we created, we get this as only output:
    Error opening zip file: toplink/jlib/essentials-agent.jar
    Error occurred during initialization of VM
    agent library failed to init: instrument
    Process exited with exit code 1.
    I would greatly appreciate some support, I'm desesperate, this project being an experiment to see how we can evolve from "classic" toplink to toplink/jpa.

    Please also note: I tried this with jre 1.5.0.6 and 1.6.0.1 . The first one says "Error opening zip file: toplink/jlib/essentials-agent.jar", 1.6 says "Error opening zip file or JAR manifest missing : toplink/jlib/essentials-agent.jar".
    I also tried the 1.5.0.6 jvm which comes with jdev 10.x, which doesn't say (or does) anything.
    I downloaded the las version of toplink/jpa, without any change.
    All help greatly appreciated :-/

  • Batch Characteristic not updating with result for linked MIC

    Hi,
    I have created a MIC and linked to a batch characteristic i.e. potency and included the characteristic in a specific batch class. This MIC is part of the inspection plan for a certain material.
    If I generate a lot of origin 01 and 09 for the material and record a result for the MIC and apply a UD, the batch characteristic is not updated with the result recorded in the batch master record..
    If I generate a lot origin 89 for the same material, when the result is recorded for the MIC and apply a UD the batch characteristic is updated with the mic value in the batch master record.
    Can you help regards?

    Ok. I am a little bit further.
    I put a trace (ST05) on the result recording and I find a difference between 4.7 and ECC6.0.
    In ECC6.0 I've an deletion in table "AUSP". This deletion isn't performed in the 4.7 system.
    Hope that this can help to solve my problem.
    Regards,
    René
    @ Mayank
    Above, all the master data and customizing is mentioned to transfer the result to the batch classification
    Edited by: Rene Fuhner on Jul 30, 2010 7:03 PM

  • Problem with Batch Updates

    Hi All,
    I have a requirement where in I have to use batch updates. But if there's a problem in one of the updates, I want the rest of the updates to ingore this and continue with the next statement in the batch. Is this not one of the features in BatchUpdates in JDBC2? I have been trying to accomplish this since 2 days now. Can anyone help me with this. Can anyone please help me with this?
    FYI, I have tried the following.
    I have 3 test updates in my batch.
    2 nd statement is an erraneous statement(deliberate). Other 2 statements are fine. It is appropriatley throwing 'BatchUpdateException'. when I ckeck the "arrays of ints" reurned by executeBatch() as well as BatchUpdateException.getUpdateCounts() are returning an arrays of size '0'. If remeove the erraneous statement, behaviour is as expected.
    Thanks in advance,
    Bharani

    The next paragraph of the same API doc:
    If the driver continues processing after a failure, the array returned by the method BatchUpdateException.getUpdateCounts will contain as many elements as there are commands in the batch, and at least one of the elements will be the following:
    3. A value of -3 -- indicates that the command failed to execute successfully and occurs only if a driver continues to process commands after a command fails
    A driver is not required to implement this method.

  • Count of Rows Updated with prepared statement batch

    I am using a batch of prepared statements for update operation. (pstmt.executeBatch())
    Configuration I am using
    WLS 6.1sp2 Connection pool - Oracle Thin driver - TX Datasource
    DB - Oracle 8.1.7
    The batch update works well i.e data gets updated and committed. BUT I am not
    getting back the count of number of rows updated.
    Is there any thing more required on WLS side ?
    Thanks in Advance

    The Oracle drivers do not return the updated row counts from batched updates.
    Try running the attached program with the thin driver
    java Batch oracle.jdbc.driver.OracleDriver jdbc:oracle:thin:@host:port:database user password
    You will see that returns -2, which indicates that the number of rows updated is unknown.
    This does meet the JDBC spec.
    "Harshad Nanal" <[email protected]> wrote in message news:3f8a455f$[email protected]..
    >
    I am using a batch of prepared statements for update operation. (pstmt.executeBatch())
    Configuration I am using
    WLS 6.1sp2 Connection pool - Oracle Thin driver - TX Datasource
    DB - Oracle 8.1.7
    The batch update works well i.e data gets updated and committed. BUT I am not
    getting back the count of number of rows updated.
    Is there any thing more required on WLS side ?
    Thanks in Advance[Batch.java]

  • Toplink JPA with Coherence deployment to Weblogic 10.3

    Hi,
    I have created an EJB application using Toplink JPA and Coherence. I would like to deploy this application to Weblogic 10.3.
    During the startup of Weblogic I have specified the Java option as
    -Dtangosol.coherence.cacheconfig=D:/JDEV_11g/jdeveloper/jdev/mywork/CoherenceApp/CoherenceProject/src/META-INF/coherence-cache-config.xml.
    Persistence.xml and coherence-cache-config.xml are palced inside the jar file.
    When I execute the ejb client program, during the method call, I can see that coherence is started but it uses the cache-config from the coherence.jar file instaed of the value I have set during startup. How can I make weblogic use my cache-config.xml? I have included the log file entries from server:
    [EL Finest]: 2009.04.17 05:33:48.625--UnitOfWork(1777337)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Execute query ReadObjectQuery(coherenceproject.MetadataType)
    2009-04-17 05:33:54.547/258.954 Oracle Coherence 3.4.2/411 <Info> (thread=[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)', member=n/a): Loaded operational configuration from resource "zip:D:/JDEV_11g/jdeveloper/jdev/mywork/CoherenceApp/lib/coherence.jar!/tangosol-coherence.xml"
    2009-04-17 05:33:54.562/258.969 Oracle Coherence 3.4.2/411 <Info> (thread=[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)', member=n/a): Loaded operational overrides from resource "zip:D:/JDEV_11g/jdeveloper/jdev/mywork/CoherenceApp/lib/coherence.jar!/tangosol-coherence-override-dev.xml"
    2009-04-17 05:33:54.562/258.969 Oracle Coherence 3.4.2/411 <D5> (thread=[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)', member=n/a): Optional configuration override "/tangosol-coherence-override.xml" is not specified
    2009-04-17 05:33:54.578/258.985 Oracle Coherence 3.4.2/411 <D5> (thread=[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)', member=n/a): Optional configuration override "/custom-mbeans.xml" is not specified
    Oracle Coherence Version 3.4.2/411
    Grid Edition: Development mode
    Copyright (c) 2000-2009 Oracle. All rights reserved.
    *2009-04-17 05:33:55.750/260.157 Oracle Coherence GE 3.4.2/411 <Info> (thread=[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)', member=n/a): Loaded cache configuration from resource "zip:D:/JDEV_11g/jdeveloper/jdev/mywork/CoherenceApp/lib/coherence.jar!/coherence-cache-config.xml"*
    2009-04-17 05:34:17.390/281.797 Oracle Coherence GE 3.4.2/411 <D5> (thread=Cluster, member=n/a): Service Cluster joined the cluster with senior service member n/a
    2009-04-17 05:34:21.890/286.297 Oracle Coherence GE 3.4.2/411 <Info> (thread=Cluster, member=n/a): Created a new cluster "cluster:0x2FFB" with Member(Id=1, Timestamp=2009-04-17 05:34:09.203, Address=141.144.90.113:8088, MachineId=18289, Location=site:sg.oracle.com,machine:rajerama-sg,process:3816, Role=WeblogicServer, Edition=Grid Edition, Mode=Development, CpuCount=2, SocketCount=1) UID=0x8D905A7100000120B0D9DD3347711F98
    2009-04-17 05:34:27.000/291.407 Oracle Coherence GE 3.4.2/411 <D5> (thread=DistributedCache, member=1): Service DistributedCache joined the cluster with senior service member 1
    [EL Finer]: 2009.04.17 05:34:28.343--ServerSession(32927169)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Coherence(MetadataType)::Get: 2
    [EL Fine]: 2009.04.17 05:34:28.703--ServerSession(32927169)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Coherence(MetadataType)::Get: 2 result: null
    [EL Finer]: 2009.04.17 05:34:28.703--ServerSession(32927169)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Coherence(MetadataType)::Get: 2
    *[EL Fine]: 2009.04.17 05:34:28.703--ServerSession(32927169)--Thread(Thread[[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)',5,Pooled Threads])--Coherence(MetadataType)::Get: 2 result: null*
    null
    Eventhough the method is called correctly, it does not return the value. Is there any other setup that has to be done?
    Regards
    Raji

    Hi Raji,
    You mentioned:
    >
    -Dtangosol.coherence.cacheconfig=D:/JDEV_11g/jdeveloper/jdev/mywork/CoherenceApp/CoherenceProject/src/META-INF/coherence-cache-config.xml
    >
    and
    >
    Persistence.xml and coherence-cache-config.xml are palced inside the jar file.
    >
    It appears that these are conflicting; as the system property indicates that the config should be read from a file, whereas the file is actually deployed in a jar.
    That being said, I would suggest double checking that the system property is actually being set in the JVM. In my testing, if I specify a cache config that does not exist, an exception will be thrown:
    java -Dtangosol.coherence.cacheconfig=foo.xml  com.tangosol.net.CacheFactory
    Oracle Coherence Version 3.4.2/411p3
    Grid Edition: Development mode
    Copyright (c) 2000-2009 Oracle. All rights reserved.
    Map (?): cache test
    2009-04-22 15:33:15.310/6.917 Oracle Coherence GE 3.4.2/411p3 <Error> (thread=main, member=1):
    (Wrapped: Failed to load the factory) java.lang.reflect.InvocationTargetException
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
            at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
            at com.tangosol.util.ClassHelper.newInstance(ClassHelper.java:662)
            at com.tangosol.net.CacheFactory.getConfigurableCacheFactory(CacheFactory.java:602)
            at com.tangosol.coherence.component.application.console.Coherence.doCache(Coherence.CDB:9)
            at com.tangosol.coherence.component.application.console.Coherence.processCommand(Coherence.CDB:209)
            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:585)
            at com.tangosol.net.CacheFactory.main(CacheFactory.java:1308)
    Caused by: (Wrapped: Failed to load configuration resource: foo.xml) java.io.IOException: Configuration is missing: "foo.xml", loader=null
            at com.tangosol.net.DefaultConfigurableCacheFactory.loadConfigAsResource(DefaultConfigurableCacheFactory.java:386)
            at com.tangosol.net.DefaultConfigurableCacheFactory.loadConfig(DefaultConfigurableCacheFactory.java:337)
            at com.tangosol.net.DefaultConfigurableCacheFactory.loadConfig(DefaultConfigurableCacheFactory.java:309)
            at com.tangosol.net.DefaultConfigurableCacheFactory.<init>(DefaultConfigurableCacheFactory.java:137)
            ... 15 moreThanks,
    Patrick

Maybe you are looking for

  • Help needed with finding node in JTree

    Hi, In my application i will be entering some string data in a text box for search criteria. When I click on search, I will get data from database which will be shown as a JTree. This Jtree will have some nodes in which, node with string entered in t

  • Best way to cull / organize bookmarks?

    Over the years my bookmarks file has grown very large with lots of sites I do not recall ever visiting, much less saving.  What is the easiest way to delete and organize bookmarks into folders?  Going to "show all bookmarks" and deleting one by one i

  • Jdeveloper 11.1.1.6 and OBI EE  on the same machine - I need help ,please !

    My laptop has only 4G Ram (even this , my windows 7 machine can see only 2,96G) . I read about sample install option fro installing OBIEE , this option might eat less memory. My need is to prepare myself for an interview about OBI EE and I think if I

  • Image Sharpness ?

    I've been goin' around with this NEW computer for weeks now and NO end in sight with the problems... I first started to do this project with iMovie and the Ken Burns curse. We won't go there. So, then I thought I'd give iPhoto a try. Same troubles. M

  • Fatal Error when I opened Captivate

    Every time when I opened Captivate I received a Fatal Error and the application is closed, can you help to resolv the problem?