JPA caching ResultSets

I am experiencing something that make me wonder at JPA.
I write a class that updates the status of a record and immediately query the table for a list that should contain the new updated query, but the list doesn't contain the record.
Secondly, I use a scheduler to update a table and use a reference to obtain my new status, it throws NoResultException.
So, I am asking how does the caching before in JPA supposed to work?
Is it configurable?
Can I remove it completely?
is the JPA implementation specific? That means it Hibernate going to differ from Toplinks in caching behaviour
Please, answers to these question will improve my understanding of this.
Regards
Michael

Greetings Dvohra,
Thank you for you reply, but I have notes Eclipselink manual covers NamedQueries and Queries only in the cache paragraph (I have no direct link right now to this material). Also here are no proofs of that kind Eclipselink could catch calling stored procedures of deleting database records and to make changes in cache needed like
# delete from goods where id > 3 and id < 112;
call delete_goods(3,112);Greetings Konstantin,
Thank you for you reply - I have posted to Eclipse forum, but I still have no luck to get answers.
Best regards,

Similar Messages

  • A error message from running the jpa-cache-server.cmd file

    When I try to run jpa-cache-server.cmd file, it show the following error message:
    "failed to load main-class manifest attribute from %coherence_home%\lib\coherence-jpa.jar"
    What is the problem?

    Forgive me but I do not see that file (jpa-cache-server.cmd) in the Coherence 3.5 distribution. With that said, I don't believe that coherence-jpa.jar is a executable jar. What exactly are you trying to do?
    If you are trying to start a cache server with the jpa classes available to it I would suggest just adding the coherence-jpa.jar to the class path.
    Rob
    :Coherence Team:

  • How to refresh JPA cache from non-JPA code(JDBC)

    In the system, let say there are two different tools are available, Tool-A_Uses_JPA and Tool_B_Uses_JDBC.
    As the name of tools is self explanatory what persistence technology used by tools.
    Say,there is a table COMMON_TABLE. This can be used by both tools to perform CRUD operation.
    Lets see the problematic scenario-
    Tool_B_Uses_JDBC tries to insert some new rows in COMMON_TABLE, by performing following tasks--
    (Tool_B_Uses_JDBC already calculated how many rows will be inserted into COMMON_TABLE. Let's say it is 5.)
    1. Read JPA_GENERATED_KEYS table for getting last_value for COMMON_TABLE. Let's say it is 30.
    2. Add (last_value + number of rows to be inserted), here it 30+5 =35.
    3. Update the JPA_GENERATED_KEYS table for last_value of COMMON_TABLE by the value calculated in step 2.
    In my example it was updated by 35.
    Above three steps done in a single transaction.
    Now, ideally if any other tool use this COMMON_TABLE to perform any insert operation, the last_value from
    JPA_GENERATED_KEYS should be 35. But for Tool-A_Uses_JPA, JPA cache is enabled. So this tool still get
    last_value as 30, rather 35. And hence Tool-A_Uses_JPA, does not work properly.
    So to resolve this issue, i thought to write a code to update JPA cache while updating the last_value.
    Is there any way to update and/or send notification to all other tools to update JPA cache when updating
    last_value form NON_JPA code?
    Or is there any other way to resolve this issues?
    Thanks.

    Marking this as answered, as this can never be a situation the way JPA uses caching. This was issue with the transaction form non-JPA code. Actually when JDBC uses data source then whether transaction will be committed as soon as application issues commit, is not guaranteed. Hence need to work on transaction.

  • JPA caching

    Greetings,
    Could somebody help me to find answer does EclipseLink JPA implementation NativeQuery cache results of stored procedure execuing like
    call get_entities(2,3,2);Is here some way to have stored procedures excection result cached with JPA otherwise?
    Greatest thanks in advance,

    Greetings Dvohra,
    Thank you for you reply, but I have notes Eclipselink manual covers NamedQueries and Queries only in the cache paragraph (I have no direct link right now to this material). Also here are no proofs of that kind Eclipselink could catch calling stored procedures of deleting database records and to make changes in cache needed like
    # delete from goods where id > 3 and id < 112;
    call delete_goods(3,112);Greetings Konstantin,
    Thank you for you reply - I have posted to Eclipse forum, but I still have no luck to get answers.
    Best regards,

  • Command Execution fails only under heavy load and JPA cache store.

    Using...
    Coherence: 3.5.2
    Commad Pattern: 2.5.0
    I have a servlet that simply creates a simple POJO puts in the cache and then fires off a command that does additional formatting to the POJO.
    With JDBC cachestore I have no problem. It works fine.
    With JPA I get the bellow exception under heavy load only. I.e: If I send one-two requests. Everything works fine and my data is present in the database after 30 second write-behind. Once I bump up to 200 users I get the exception.
    I figure I'm running out of memory on the cache because of JPA enitites take more resources?
    2010-01-21 10:50:01.051/159.235 Oracle Coherence GE 3.5.2/463 <Error> (thread=CommandExecutor:Thread-4, member=3): Failed to execute CommandExecutionRequest.Key
    {contextIdentifier=Identifier{TestEncrypt}, ticket=Ticket{1.1158}, managementStrategy=DISTRIBUTED} with CommandExecutor Identifier{TestEncrypt}
    2010-01-21 10:50:01.051/159.235 Oracle Coherence GE 3.5.2/463 <Info> (thread=CommandExecutor:Thread-4, member=3): (Wrapped: Failed request execution for ModelService service on Member(Id=3, Timestamp=2010-01-21 10:47:22.79, Address=xxxxxx:8088, MachineId=2616, Location=site:xxxxxx,machine:xxxxx,process:2
    560, Role=CoherenceServer)) java.lang.NullPointerException
    at com.tangosol.util.Base.ensureRuntimeException(Base.java:293)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.tagException(Grid.CDB:36)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onInvokeRequest(DistributedCache.CDB:80)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$InvokeRequest.run(DistributedCache.CDB:1)
    at com.tangosol.coherence.component.net.message.requestMessage.DistributedCacheKeyRequest.onReceived(DistributedCacheKeyRequest.CDB:12)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onMessage(Grid.CDB:9)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:136)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onNotify(DistributedCache.CDB:3)
    at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
    at java.lang.Thread.run(Thread.java:619)
    Caused by: java.lang.NullPointerException
    at ca.xxxxxx.coherence.command.EncryptProcessor.process(EncryptProcessor.java:41)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$Storage.invoke(DistributedCache.CDB:20)
    at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onInvokeRequest(DistributedCache.CDB:50)
    ... 7 more
    Servlet
         protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {     
              PrintStream out = new PrintStream(response.getOutputStream());
              NamedCache logCache = CacheFactory.getCache("ca.xxxxxx.model.Log");
              Log log = new Log(idGenerator.generateIdentity(), "This is a log...");
              // Do some work here...
              log.setStampOut(new Date());          
              logCache.put(log.getId(), log);
              CommandSubmitter commandSubmitter = DefaultCommandSubmitter.getInstance();                    
              commandSubmitter.submitCommand(contextIdentifier, new EncryptCommand(log));
              out.println("Log Id: " + log.getId() + " - Message: " + log.getMessage() + "++99");
              response.flushBuffer();
         }Command
    00000001 package ca.xxxxxx.coherence.command;
    00000002
    00000003 import java.io.IOException;
    00000004
    00000005 import com.oracle.coherence.patterns.command.Command;
    00000006 import com.oracle.coherence.patterns.command.ExecutionEnvironment;
    00000007 import com.tangosol.io.pof.PofReader;
    00000008 import com.tangosol.io.pof.PofWriter;
    00000009 import com.tangosol.io.pof.PortableObject;
    00000010 import com.tangosol.net.CacheFactory;
    00000011 import com.tangosol.net.NamedCache;
    00000012 import com.tangosol.util.InvocableMap;
    00000013 import com.tangosol.util.processor.AbstractProcessor;
    00000014
    00000015 import ca.xxxxxx.coherence.util.identity.sequence.Sequence;
    00000016 import ca.xxxxxx.coherence.util.identity.sequence.SequenceBlock;
    00000017 import ca.xxxxxx.model.Log;
    00000018
    00000019 @SuppressWarnings( { "unchecked" })
    00000020 public class EncryptCommand implements Command, PortableObject {
    00000021
    00000022      private Log log;
    00000023
    00000024      public EncryptCommand() {
    00000025      }
    00000026
    00000027      public EncryptCommand(Log log) {
    00000028           this.log = log;
    00000029      }
    00000030
    00000031      public void execute(ExecutionEnvironment executionEnvironment) {
    00000032
    00000033           NamedCache cache = CacheFactory.getCache("ca.xxxxxx.model.Log");
    00000034
    00000035           cache.invoke(log.getId(), new EncryptProcessor(log));
    00000036           
    00000037           //cache.put(log.getId(), log);
    00000038      }
    00000039
    00000040      public void readExternal(PofReader reader) throws IOException {
    00000041           this.log = (Log) reader.readObject(0);
    00000042      }
    00000043
    00000044      public void writeExternal(PofWriter writer) throws IOException {
    00000045           writer.writeObject(0, log);
    00000046      }
    00000047
    00000048 /*
    00000049      public String toString() {
    00000050           return String.format("LoggingCommand{%s, id=%d, message=%s}", super
    00000051                     .toString(), log.getId(), log.getMessage());
    00000052      }
    00000053 */
    00000054 } Processor
    00000001 package ca.xxxxxx.coherence.command;
    00000002
    00000003 import java.io.IOException;
    00000004
    00000005 import ca.xxxxxx.coherence.util.identity.sequence.Sequence;
    00000006 import ca.xxxxxx.coherence.util.identity.sequence.SequenceBlock;
    00000007 import ca.xxxxxx.model.Log;
    00000008
    00000009 import com.tangosol.io.pof.PofReader;
    00000010 import com.tangosol.io.pof.PofWriter;
    00000011 import com.tangosol.io.pof.PortableObject;
    00000012 import com.tangosol.util.InvocableMap;
    00000013 import com.tangosol.util.processor.AbstractProcessor;
    00000014
    00000015 public class EncryptProcessor extends AbstractProcessor implements PortableObject{
    00000016
    00000017      private static final long serialVersionUID = -6272835614833329999L;
    00000018      private Log log;
    00000019      
    00000020      public EncryptProcessor(){
    00000021           // deserialization constructor          
    00000022      }
    00000023      
    00000024      public EncryptProcessor(Log log){
    00000025           this.log = log;
    00000026      }
    00000027
    00000028      public Object process(InvocableMap.Entry entry)
    00000029      {
    00000030           Log log = (Log)entry.getValue();
    00000031           
    00000032           // Pretend we are encrypting. Proof that async processing is better.
    00000033           try
    00000034           {
    00000035                Thread.sleep(50);
    00000036           }
    00000037           catch(Exception ex)
    00000038           {
    00000039                System.out.println("Exception: " + ex.toString());
    00000040           }
    00000041           
    00000042           log.setMessage("!@#$%^&*()-_=+");
    00000043
    00000044           entry.setValue(log);
    00000045
    00000046           return log;          
    00000047      }
    00000048
    00000049      public void readExternal(PofReader reader) throws IOException {
    00000050           this.log = (Log) reader.readObject(0);
    00000051      }
    00000052
    00000053      public void writeExternal(PofWriter writer) throws IOException {
    00000054           writer.writeObject(0, log);
    00000055      }     
    00000056 }Edited by: user12249856 on Jan 21, 2010 8:12 AM
    Edited by: user12249856 on Jan 21, 2010 8:13 AM
    Edited by: user12249856 on Jan 21, 2010 8:14 AM
    Edited by: user12249856 on Jan 21, 2010 9:07 AM
    Edited by: user12249856 on Jan 21, 2010 10:15 AM

    Done look at the original thread logs are below... I'm thinking that the key is no longer in the cache at the point the processor fires?
    I can also assure you that there is only to instance of coherence running
    1- The actual cache server node
    2- The client, set to localstorage = false
    I ensure the cache server starts and then I start the client.
    Logs
    2010-01-21 13:36:12.596/0.234 Oracle Coherence 3.5.2/463 <Info> (thread=main, member=n/a): Loaded operational configuration from resource "jar:file:/xxxxxx/coherence/lib/coherence.jar!/tangosol-coherence.xml"
    2010-01-21 13:36:12.596/0.234 Oracle Coherence 3.5.2/463 <Info> (thread=main, member=n/a): Loaded operational overrides from resource "jar:file:/xxxxxx/coherence/lib/coherence.jar!/tangosol-coherence-override-dev.xml"
    2010-01-21 13:36:12.596/0.234 Oracle Coherence 3.5.2/463 <Info> (thread=main, member=n/a): Loaded operational overrides from resource "jar:file:/xxxxxx/coherence/lib/coherence-common-1.5.0.jar!/tangosol-coherence-override.xml"
    2010-01-21 13:36:12.596/0.234 Oracle Coherence 3.5.2/463 <D5> (thread=main, member=n/a): Optional configuration override "/custom-mbeans.xml" is not specified
    Oracle Coherence Version 3.5.2/463
    Grid Edition: Development mode
    Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved.
    2010-01-21 13:36:12.784/0.422 Oracle Coherence GE 3.5.2/463 <Info> (thread=main, member=n/a): Loaded cache configuration from "file:/xxxxxx/coherence/bin/test-cache-config.xml"
    2010-01-21 13:36:12.799/0.437 Oracle Coherence GE 3.5.2/463 <Info> (thread=main, member=n/a): Loaded cache configuration from "jar:file:/xxxxxx/coherence/lib/coherence-commandpattern-2.5.0.jar!/coherence-commandpattern-pof-cache-config.xml"
    2010-01-21 13:36:12.799/0.437 Oracle Coherence GE 3.5.2/463 <Info> (thread=main, member=n/a): Loaded cache configuration from "jar:file:/xxxxxx/coherence/lib/coherence-common-1.5.0.jar!/coherence-common-cache-config.xml"
    2010-01-21 13:36:13.159/0.797 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=n/a): Service Cluster joined the cluster with senior service member n/a
    2010-01-21 13:36:16.409/4.047 Oracle Coherence GE 3.5.2/463 <Info> (thread=Cluster, member=n/a): Created a new cluster "cluster:0xD3FB" with Member(Id=1, Timestamp=2010-01-21 13:36:13.065, Address=xxxxxx:8088, MachineId=2626, Location=site:xxxxxx.net,machine:xxxxxx,process:40488, Role=CoherenceServer, Edition=Grid Edition, Mode=Development, CpuCount=4, SocketCount=2) UID=0x0A00004200000126522B95890A421F98
    2010-01-21 13:36:16.424/4.062 Oracle Coherence GE 3.5.2/463 <D5> (thread=Invocation:Management, member=1): Service Management joined the cluster with senior service member 1
    2010-01-21 13:36:16.627/4.265 Oracle Coherence GE 3.5.2/463 <D5> (thread=DistributedCache:DistributedCacheForSequenceGenerators, member=1): Service DistributedCacheForSequenceGenerators joined the cluster with senior service member 1
    2010-01-21 13:36:16.643/4.281 Oracle Coherence GE 3.5.2/463 <D5> (thread=DistributedCache:DistributedCacheForCommandPattern, member=1): Service DistributedCacheForCommandPattern joined the cluster with senior service member 1
    2010-01-21 13:36:16.659/4.297 Oracle Coherence GE 3.5.2/463 <Info> (thread=DistributedCache:DistributedCacheForCommandPattern, member=1): Loading POF configuration from resource "file:/xxxxxx/coherence/bin/test-pof-config.xml"
    2010-01-21 13:36:16.659/4.297 Oracle Coherence GE 3.5.2/463 <Info> (thread=DistributedCache:DistributedCacheForCommandPattern, member=1): Loading POF configuration from resource "jar:file:/xxxxxx/coherence/lib/coherence.jar!/coherence-pof-config.xml"
    2010-01-21 13:36:16.659/4.297 Oracle Coherence GE 3.5.2/463 <Info> (thread=DistributedCache:DistributedCacheForCommandPattern, member=1): Loading POF configuration from resource "jar:file:/xxxxxx/coherence/lib/coherence-common-1.5.0.jar!/coherence-common-pof-config.xml"
    2010-01-21 13:36:16.674/4.312 Oracle Coherence GE 3.5.2/463 <Info> (thread=DistributedCache:DistributedCacheForCommandPattern, member=1): Loading POF configuration from resource "jar:file:/xxxxxx/coherence/lib/coherence-commandpattern-2.5.0.jar!/coherence-commandpattern-pof-config.xml"
    2010-01-21 13:36:16.752/4.390 Oracle Coherence GE 3.5.2/463 <D5> (thread=DistributedCache:DistributedCacheForCommandPatternDistributedCommands, member=1): Service DistributedCacheForCommandPatternDistributedCommands joined the cluster with senior service member 1
    2010-01-21 13:36:16.752/4.390 Oracle Coherence GE 3.5.2/463 <D5> (thread=DistributedCache:SequencesService, member=1): Service SequencesService joined the cluster with senior service member 1
    2010-01-21 13:36:16.752/4.390 Oracle Coherence GE 3.5.2/463 <D5> (thread=DistributedCache:ModelService, member=1): Service ModelService joined the cluster with senior service member 1
    2010-01-21 13:36:16.768/4.406 Oracle Coherence GE 3.5.2/463 <Info> (thread=main, member=1): Started DefaultCacheServer...
    SafeCluster: Name=cluster:0xD3FB
    Group{Address=224.3.5.2, Port=35463, TTL=4}
    MasterMemberSet
    ThisMember=Member(Id=1, Timestamp=2010-01-21 13:36:13.065, Address=xxxxxx:8088, MachineId=2626, Location=site:xxxxxx.net,machine:xxxxxx,process:40488, Role=CoherenceServer)
    OldestMember=Member(Id=1, Timestamp=2010-01-21 13:36:13.065, Address=xxxxxx:8088, MachineId=2626, Location=site:xxxxxx.net,machine:xxxxxx,process:40488, Role=CoherenceServer)
    ActualMemberSet=MemberSet(Size=1, BitSetCount=2
    Member(Id=1, Timestamp=2010-01-21 13:36:13.065, Address=xxxxxx:8088, MachineId=2626, Location=site:xxxxxx.net,machine:xxxxxx,process:40488, Role=CoherenceServer)
    RecycleMillis=120000
    RecycleSet=MemberSet(Size=0, BitSetCount=0
    Services
    TcpRing{TcpSocketAccepter{State=STATE_OPEN, ServerSocket=xxxxxx:8088}, Connections=[]}
    ClusterService{Name=Cluster, State=(SERVICE_STARTED, STATE_JOINED), Id=0, Version=3.5, OldestMemberId=1}
    InvocationService{Name=Management, State=(SERVICE_STARTED), Id=1, Version=3.1, OldestMemberId=1}
    DistributedCache{Name=DistributedCacheForSequenceGenerators, State=(SERVICE_STARTED), LocalStorage=enabled, PartitionCount=257, BackupCount=1, AssignedPartitions=257, BackupPartitions=0}
    DistributedCache{Name=DistributedCacheForCommandPattern, State=(SERVICE_STARTED), LocalStorage=enabled, PartitionCount=257, BackupCount=1, AssignedPartitions=257, BackupPartitions=0}
    DistributedCache{Name=DistributedCacheForCommandPatternDistributedCommands, State=(SERVICE_STARTED), LocalStorage=enabled, PartitionCount=257, BackupCount=1, AssignedPartitions=257, BackupPartitions=0}
    DistributedCache{Name=SequencesService, State=(SERVICE_STARTED), LocalStorage=enabled, PartitionCount=257, BackupCount=1, AssignedPartitions=257, BackupPartitions=0}
    DistributedCache{Name=ModelService, State=(SERVICE_STARTED), LocalStorage=enabled, PartitionCount=257, BackupCount=1, AssignedPartitions=257, BackupPartitions=0}
    2010-01-21 13:36:47.534/35.172 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=1): Member(Id=2, Timestamp=2010-01-21 13:36:47.346, Address=xxxxxx:8088, MachineId=2648, Location=site:xxxxxx.net,machine:xxxxxx,process:1912, Role=MortbayStartMain) joined Cluster with senior member 1
    2010-01-21 13:36:47.580/35.218 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=1): Member 2 joined Service Management with senior member 1
    2010-01-21 13:36:47.768/35.406 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=1): Member 2 joined Service SequencesService with senior member 1
    2010-01-21 13:36:47.877/35.515 Oracle Coherence GE 3.5.2/463 <D5> (thread=DistributedCache:SequencesService, member=1): Service SequencesService: sending ServiceConfigSync containing 258 entries to Member 2
    2010-01-21 13:36:47.971/35.609 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=1): Member 2 joined Service DistributedCacheForCommandPattern with senior member 1
    2010-01-21 13:36:47.971/35.609 Oracle Coherence GE 3.5.2/463 <D5> (thread=DistributedCache:DistributedCacheForCommandPattern, member=1): Service DistributedCacheForCommandPattern: sending ServiceConfigSync containing 258 entries to Member 2
    2010-01-21 13:36:48.034/35.672 Oracle Coherence GE 3.5.2/463 <D5> (thread=DistributedCache:DistributedCacheForCommandPattern, member=1): Context Identifier{TestEncrypt} has been inserted into this member
    2010-01-21 13:36:48.034/35.672 Oracle Coherence GE 3.5.2/463 <D5> (thread=DistributedCache:DistributedCacheForCommandPattern, member=1): Creating CommandExecutor for Identifier{TestEncrypt}
    2010-01-21 13:36:48.065/35.703 Oracle Coherence GE 3.5.2/463 <D5> (thread=DistributedCache:DistributedCacheForCommandPattern, member=1): Created CommandExecutor for Identifier{TestEncrypt}
    2010-01-21 13:36:48.065/35.703 Oracle Coherence GE 3.5.2/463 <D5> (thread=DistributedCache:DistributedCacheForCommandPattern, member=1): Scheduling ContextExecutor for Identifier{TestEncrypt} to start
    2010-01-21 13:36:48.065/35.703 Oracle Coherence GE 3.5.2/463 <D5> (thread=CommandExecutor:Thread-2, member=1): Starting CommandExecutor for Identifier{TestEncrypt}
    2010-01-21 13:36:48.080/35.718 Oracle Coherence GE 3.5.2/463 <D5> (thread=CommandExecutor:Thread-2, member=1): CommandExecutor for Identifier{TestEncrypt} has been configured as DefaultContextConfiguration{managementStrategy=DISTRIBUTED}
    2010-01-21 13:36:48.080/35.718 Oracle Coherence GE 3.5.2/463 <D5> (thread=CommandExecutor:Thread-2, member=1): Recovering unexecuted commands for CommandExecutor Identifier{TestEncrypt}
    2010-01-21 13:36:48.127/35.765 Oracle Coherence GE 3.5.2/463 <D5> (thread=CommandExecutor:Thread-2, member=1): No commands to recover for CommandExecutor Identifier{TestEncrypt}
    2010-01-21 13:36:48.127/35.765 Oracle Coherence GE 3.5.2/463 <D5> (thread=CommandExecutor:Thread-2, member=1): Registering JMX management extensions for CommandExecutor Identifier{TestEncrypt}
    2010-01-21 13:36:48.127/35.765 Oracle Coherence GE 3.5.2/463 <D5> (thread=CommandExecutor:Thread-2, member=1): No commands to execute for CommandExecutor Identifier{TestEncrypt}. (waiting for commands to be submitted)
    2010-01-21 13:36:48.127/35.765 Oracle Coherence GE 3.5.2/463 <D5> (thread=CommandExecutor:Thread-2, member=1): Started CommandExecutor for Identifier{TestEncrypt}
    2010-01-21 13:36:48.424/36.062 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=1): TcpRing: connecting to member 2 using TcpSocket{State=STATE_OPEN, Socket=Socket[addr=/xxxxxx,port=8088,localport=3301]}
    2010-01-21 13:37:26.940/74.578 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=1): Member 2 joined Service ModelService with senior member 1
    2010-01-21 13:37:26.940/74.578 Oracle Coherence GE 3.5.2/463 <D5> (thread=DistributedCache:ModelService, member=1): Service ModelService: sending ServiceConfigSync containing 258 entries to Member 2
    2010-01-21 13:37:27.362/75.000 Oracle Coherence GE 3.5.2/463 <D5> (thread=Cluster, member=1): Member 2 joined Service DistributedCacheForCommandPatternDistributedCommands with senior member 1
    2010-01-21 13:37:27.377/75.015 Oracle Coherence GE 3.5.2/463 <D5> (thread=DistributedCache:DistributedCacheForCommandPatternDistributedCommands, member=1): Service DistributedCacheForCommandPatternDistributedCommands: sending ServiceConfigSync containing 259 entries to Member 2
    2010-01-21 13:38:30.721/138.359 Oracle Coherence GE 3.5.2/463 <Error> (thread=DistributedCache:ModelService, member=1): Attempting recovery (due to soft timeout) of Daemon{Thread="Thread[WriteBehindThread:CacheStoreWrapper(com.tangosol.coherence.jpa.JpaCacheStore),5,WriteBehindThread:CacheStoreWrapper(com.tangosol.coherence.jpa.JpaCacheStore)]", State=Running}
    2010-01-21 13:38:34.268/141.906 Oracle Coherence GE 3.5.2/463 <Error> (thread=DistributedCache:ModelService, member=1): Terminating guarded execution (due to hard timeout) of Daemon{Thread="Thread[WriteBehindThread:CacheStoreWrapper(com.tangosol.coherence.jpa.JpaCacheStore),5,WriteBehindThread:CacheStoreWrapper(com.tangosol.coherence.jpa.JpaCacheStore)]", State=Running}
    2010-01-21 13:38:34.268/141.906 Oracle Coherence GE 3.5.2/463 <Error> (thread=Termination Thread, member=1): Write-behind thread timed out; stopping the cache service
    2010-01-21 13:38:34.284/141.922 Oracle Coherence GE 3.5.2/463 <D5> (thread=DistributedCache:ModelService, member=1): Service ModelService left the cluster
    2010-01-21 13:38:34.487/142.125 Oracle Coherence GE 3.5.2/463 <Error> (thread=CommandExecutor:Thread-4, member=1): Failed to execute CommandExecutionRequest.Key{contextIdentifier=Identifier{TestEncrypt}, ticket=Ticket{1.1223}, managementStrategy=DISTRIBUTED} with CommandExecutor Identifier{TestEncrypt}
    2010-01-21 13:38:34.487/142.125 Oracle Coherence GE 3.5.2/463 <Info> (thread=CommandExecutor:Thread-4, member=1): java.lang.RuntimeException: Service has been terminated
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.onMissingStorage(DistributedCache.CDB:9)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.ensureRequestTarget(DistributedCache.CDB:34)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$BinaryMap.invoke(DistributedCache.CDB:20)
         at com.tangosol.util.ConverterCollections$ConverterInvocableMap.invoke(ConverterCollections.java:2110)
         at com.tangosol.util.ConverterCollections$ConverterNamedCache.invoke(ConverterCollections.java:2565)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$ViewMap.invoke(DistributedCache.CDB:11)
         at com.tangosol.coherence.component.util.SafeNamedCache.invoke(SafeNamedCache.CDB:1)
         at ca.xxxxxx.coherence.command.EncryptCommand.execute(EncryptCommand.java:92)
         at com.oracle.coherence.patterns.command.internal.CommandExecutor.execute(CommandExecutor.java:889)
         at com.oracle.coherence.patterns.command.internal.CommandExecutor$3.run(CommandExecutor.java:960)
         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
         at java.util.concurrent.FutureTask.run(FutureTask.java:138)
         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:207)
         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
         at java.lang.Thread.run(Thread.java:619)
    2010-01-21 13:38:34.487/142.125 Oracle Coherence GE 3.5.2/463 <Info> (thread=CommandExecutor:Thread-4, member=1): Restarting Service: ModelService
    2010-01-21 13:38:34.502/142.140 Oracle Coherence GE 3.5.2/463 <D5> (thread=DistributedCache:ModelService, member=1): Service ModelService joined the cluster with senior service member 2
    2010-01-21 13:38:34.518/142.156 Oracle Coherence GE 3.5.2/463 <D5> (thread=DistributedCache:ModelService, member=1): Service ModelService: received ServiceConfigSync containing 259 entries
    2010-01-21 13:38:34.518/142.156 Oracle Coherence GE 3.5.2/463 <Info> (thread=CommandExecutor:Thread-4, member=1): Restarting NamedCache: ca.xxxxxx.model.Log
    2010-01-21 13:38:34.549/142.187 Oracle Coherence GE 3.5.2/463 <Warning> (thread=DistributedCache:ModelService, member=1): Assigned 257 orphaned primary partitions
    2010-01-21 13:38:34.549/142.187 Oracle Coherence GE 3.5.2/463 <D4> (thread=DistributedCache:ModelService, 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, 44, 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, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 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,
    2010-01-21 13:38:34.643/142.281 Oracle Coherence GE 3.5.2/463 <Error> (thread=CommandExecutor:Thread-4, member=1): Failed to execute CommandExecutionRequest.Key{contextIdentifier=Identifier{TestEncrypt}, ticket=Ticket{1.1224}, managementStrategy=DISTRIBUTED} with CommandExecutor Identifier{TestEncrypt}
    2010-01-21 13:38:34.643/142.281 Oracle Coherence GE 3.5.2/463 <Info> (thread=CommandExecutor:Thread-4, member=1): (Wrapped: Failed request execution for ModelService service on Member(Id=1, Timestamp=2010-01-21 13:36:13.065, Address=xxxxxx:8088, MachineId=2626, Location=site:xxxxxx.net,machine:xxxxxx,process:40488, Role=CoherenceServer)) java.lang.NullPointerException
         at com.tangosol.util.Base.ensureRuntimeException(Base.java:293)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.tagException(Grid.CDB:36)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onInvokeRequest(DistributedCache.CDB:80)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$InvokeRequest.run(DistributedCache.CDB:1)
         at com.tangosol.coherence.component.net.message.requestMessage.DistributedCacheKeyRequest.onReceived(DistributedCacheKeyRequest.CDB:12)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onMessage(Grid.CDB:9)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:136)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onNotify(DistributedCache.CDB:3)
         at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
         at java.lang.Thread.run(Thread.java:619)
    Caused by: java.lang.NullPointerException
         at ca.xxxxxx.coherence.command.EncryptProcessor.process(EncryptProcessor.java:41)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$Storage.invoke(DistributedCache.CDB:20)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onInvokeRequest(DistributedCache.CDB:50)
         ... 7 more
    2010-01-21 13:38:34.705/142.343 Oracle Coherence GE 3.5.2/463 <Error> (thread=CommandExecutor:Thread-4, member=1): Failed to execute CommandExecutionRequest.Key{contextIdentifier=Identifier{TestEncrypt}, ticket=Ticket{1.1225}, managementStrategy=DISTRIBUTED} with CommandExecutor Identifier{TestEncrypt}
    2010-01-21 13:38:34.721/142.359 Oracle Coherence GE 3.5.2/463 <Info> (thread=CommandExecutor:Thread-4, member=1): (Wrapped: Failed request execution for ModelService service on Member(Id=1, Timestamp=2010-01-21 13:36:13.065, Address=xxxxxx:8088, MachineId=2626, Location=site:xxxxxx.net,machine:xxxxxx,process:40488, Role=CoherenceServer)) java.lang.NullPointerException
         at com.tangosol.util.Base.ensureRuntimeException(Base.java:293)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.tagException(Grid.CDB:36)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onInvokeRequest(DistributedCache.CDB:80)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$InvokeRequest.run(DistributedCache.CDB:1)
         at com.tangosol.coherence.component.net.message.requestMessage.DistributedCacheKeyRequest.onReceived(DistributedCacheKeyRequest.CDB:12)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onMessage(Grid.CDB:9)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:136)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onNotify(DistributedCache.CDB:3)
         at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
         at java.lang.Thread.run(Thread.java:619)
    Caused by: java.lang.NullPointerException
         at ca.xxxxxx.coherence.command.EncryptProcessor.process(EncryptProcessor.java:41)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$Storage.invoke(DistributedCache.CDB:20)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onInvokeRequest(DistributedCache.CDB:50)
         ... 7 more
    2010-01-21 13:38:34.784/142.422 Oracle Coherence GE 3.5.2/463 <Error> (thread=CommandExecutor:Thread-4, member=1): Failed to execute CommandExecutionRequest.Key{contextIdentifier=Identifier{TestEncrypt}, ticket=Ticket{1.1226}, managementStrategy=DISTRIBUTED} with CommandExecutor Identifier{TestEncrypt}
    2010-01-21 13:38:34.784/142.422 Oracle Coherence GE 3.5.2/463 <Info> (thread=CommandExecutor:Thread-4, member=1): (Wrapped: Failed request execution for ModelService service on Member(Id=1, Timestamp=2010-01-21 13:36:13.065, Address=xxxxxx:8088, MachineId=2626, Location=site:xxxxxx.net,machine:xxxxxx,process:40488, Role=CoherenceServer)) java.lang.NullPointerException
         at com.tangosol.util.Base.ensureRuntimeException(Base.java:293)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.tagException(Grid.CDB:36)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onInvokeRequest(DistributedCache.CDB:80)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$InvokeRequest.run(DistributedCache.CDB:1)
         at com.tangosol.coherence.component.net.message.requestMessage.DistributedCacheKeyRequest.onReceived(DistributedCacheKeyRequest.CDB:12)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onMessage(Grid.CDB:9)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:136)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onNotify(DistributedCache.CDB:3)
         at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
         at java.lang.Thread.run(Thread.java:619)
    Caused by: java.lang.NullPointerException
         at ca.xxxxxx.coherence.command.EncryptProcessor.process(EncryptProcessor.java:41)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$Storage.invoke(DistributedCache.CDB:20)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onInvokeRequest(DistributedCache.CDB:50)
         ... 7 more
    2010-01-21 13:38:34.846/142.484 Oracle Coherence GE 3.5.2/463 <Error> (thread=CommandExecutor:Thread-4, member=1): Failed to execute CommandExecutionRequest.Key{contextIdentifier=Identifier{TestEncrypt}, ticket=Ticket{1.1227}, managementStrategy=DISTRIBUTED} with CommandExecutor Identifier{TestEncrypt}
    2010-01-21 13:38:34.862/142.500 Oracle Coherence GE 3.5.2/463 <Info> (thread=CommandExecutor:Thread-4, member=1): (Wrapped: Failed request execution for ModelService service on Member(Id=1, Timestamp=2010-01-21 13:36:13.065, Address=xxxxxx:8088, MachineId=2626, Location=site:xxxxxx.net,machine:xxxxxx,process:40488, Role=CoherenceServer)) java.lang.NullPointerException
         at com.tangosol.util.Base.ensureRuntimeException(Base.java:293)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.tagException(Grid.CDB:36)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onInvokeRequest(DistributedCache.CDB:80)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$InvokeRequest.run(DistributedCache.CDB:1)
         at com.tangosol.coherence.component.net.message.requestMessage.DistributedCacheKeyRequest.onReceived(DistributedCacheKeyRequest.CDB:12)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onMessage(Grid.CDB:9)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:136)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onNotify(DistributedCache.CDB:3)
         at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
         at java.lang.Thread.run(Thread.java:619)
    Caused by: java.lang.NullPointerException
         at ca.xxxxxx.coherence.command.EncryptProcessor.process(EncryptProcessor.java:41)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$Storage.invoke(DistributedCache.CDB:20)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onInvokeRequest(DistributedCache.CDB:50)
         ... 7 more
    2010-01-21 13:38:34.924/142.562 Oracle Coherence GE 3.5.2/463 <Error> (thread=CommandExecutor:Thread-4, member=1): Failed to execute CommandExecutionRequest.Key{contextIdentifier=Identifier{TestEncrypt}, ticket=Ticket{1.1228}, managementStrategy=DISTRIBUTED} with CommandExecutor Identifier{TestEncrypt}
    2010-01-21 13:38:34.924/142.562 Oracle Coherence GE 3.5.2/463 <Info> (thread=CommandExecutor:Thread-4, member=1): (Wrapped: Failed request execution for ModelService service on Member(Id=1, Timestamp=2010-01-21 13:36:13.065, Address=xxxxxx:8088, MachineId=2626, Location=site:xxxxxx.net,machine:xxxxxx,process:40488, Role=CoherenceServer)) java.lang.NullPointerException
         at com.tangosol.util.Base.ensureRuntimeException(Base.java:293)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.tagException(Grid.CDB:36)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onInvokeRequest(DistributedCache.CDB:80)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$InvokeRequest.run(DistributedCache.CDB:1)
         at com.tangosol.coherence.component.net.message.requestMessage.DistributedCacheKeyRequest.onReceived(DistributedCacheKeyRequest.CDB:12)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onMessage(Grid.CDB:9)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:136)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onNotify(DistributedCache.CDB:3)
         at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
         at java.lang.Thread.run(Thread.java:619)
    Caused by: java.lang.NullPointerException
         at ca.xxxxxx.coherence.command.EncryptProcessor.process(EncryptProcessor.java:41)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$Storage.invoke(DistributedCache.CDB:20)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onInvokeRequest(DistributedCache.CDB:50)
         ... 7 more
    2010-01-21 13:38:35.002/142.640 Oracle Coherence GE 3.5.2/463 <Error> (thread=CommandExecutor:Thread-4, member=1): Failed to execute CommandExecutionRequest.Key{contextIdentifier=Identifier{TestEncrypt}, ticket=Ticket{1.1229}, managementStrategy=DISTRIBUTED} with CommandExecutor Identifier{TestEncrypt}
    2010-01-21 13:38:35.002/142.640 Oracle Coherence GE 3.5.2/463 <Info> (thread=CommandExecutor:Thread-4, member=1): (Wrapped: Failed request execution for ModelService service on Member(Id=1, Timestamp=2010-01-21 13:36:13.065, Address=xxxxxx:8088, MachineId=2626, Location=site:xxxxxx.net,machine:xxxxxx,process:40488, Role=CoherenceServer)) java.lang.NullPointerException
         at com.tangosol.util.Base.ensureRuntimeException(Base.java:293)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.tagException(Grid.CDB:36)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onInvokeRequest(DistributedCache.CDB:80)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$InvokeRequest.run(DistributedCache.CDB:1)
         at com.tangosol.coherence.component.net.message.requestMessage.DistributedCacheKeyRequest.onReceived(DistributedCacheKeyRequest.CDB:12)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onMessage(Grid.CDB:9)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:136)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onNotify(DistributedCache.CDB:3)
         at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
         at java.lang.Thread.run(Thread.java:619)
    Caused by: java.lang.NullPointerException
         at ca.xxxxxx.coherence.command.EncryptProcessor.process(EncryptProcessor.java:41)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache$Storage.invoke(DistributedCache.CDB:20)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.DistributedCache.onInvokeRequest(DistributedCache.CDB:50)
         ... 7 more
    2010-01-21 13:38:35.065/142.703 Oracle Coherence GE 3.5.2/463 <Error> (thread=CommandExecutor:Thread-4, member=1): Failed to execute CommandExecutionRequest.Key{contextIdentifier=Identifier{TestEncrypt}, ticket=Ticket{1.1230}, managementStrategy=DISTRIBUTED} with CommandExecutor Identifier{TestEncrypt}
    2010-01-21 13:38:35.065/142.703 Oracle Coherence GE 3.5.2/463 <Info> (thread=CommandExecutor:Thread-4, member=1): (Wrapped:

  • Cached resultset

    i'm buliding a web page that navigate a database. how can i make my page not to connect every time i click on a button. how can i used cachedrowset.

    Use ViewHelper design pattern

  • Start a JPA persistent cache server but it is hanging

    I create a JPA persistence project and online EJB object HR.EMPLOYEES according to the guide of Chapter 6 of
    Tutorial for Oracle Coherence (3.5). But when I tried to start a JPA persistent cache server, it is hanging and report
    the following message:
    I don't know what is the problem.
    C:\coherence\bin>jpa-cache-server.cmd
    java version "1.6.0_16"
    Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
    Java HotSpot(TM) Server VM (build 14.2-b01, mixed mode)
    2009-11-04 15:11:37.767/0.532 Oracle Coherence 3.5.2/463 <Info> (thread=main, member=n/a):
    Loaded operational configuration from resource "jar:file:/C:/coherence/lib/coherence.jar!/tangosol-
    coherence.xml"
    2009-11-04 15:11:37.767/0.532 Oracle Coherence 3.5.2/463 <Info> (thread=main, member=n/a):
    Loaded operational overrides from resource "jar:file:/C:/coherence/lib/coherence.jar!/tangosol-
    coherence-override-dev.xml"
    2009-11-04 15:11:37.782/0.547 Oracle Coherence 3.5.2/463 <D5> (thread=main, member=n/a):
    Optional configuration override "/tangosol-coherence-override.xml" is not specified
    2009-11-04 15:11:37.782/0.547 Oracle Coherence 3.5.2/463 <D5> (thread=main, member=n/a):
    Optional configuration override "/custom-mbeans.xml" is not specified
    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-04 15:11:38.157/0.922 Oracle Coherence GE 3.5.2/463 <Info> (thread=main, member=n/a):
    Loaded cache configuration from "file:/C:/home/oracle/coherence/JPA/jpa-cache-config.xml"
    2009-11-04 15:11:38.188/0.953 Oracle Coherence GE 3.5.2/463 <Info> (thread=main, member=n/a):
    Started DefaultCacheServer
    SafeCluster: nullThe contents of jpa-cache-server.cmd file is shown here under:
    setlocal
    :config
    @rem specify the Coherence installation directory
    set coherence_home=C:\coherence
    @rem specify the JVM heap size
    set memory=512m
    :start
    if not exist "%coherence_home%\lib\coherence.jar" goto instructions
    if "%java_home%"=="" (set java_exec=java) else (set java_exec=%java_home%\bin\java)
    :launch
    set java_opts="-Xms%memory% -Xmx%memory% -Dtangosol.coherence.cacheconfig=
    C:\home\oracle\coherence\JPA\jpa-cache-config.xml"
    "%java_exec%" -server -showversion "%java_opts%" -cp "%coherence_home%\lib\coherence.jar;
    C:\home\oracle\coherence\JPA\classes;C:\coherence\lib\coherence-jpa.jar;C:\Oracle\Middleware\
    wlserver_10.3\server\lib\ojdbc6.jar;C:\Oracle\Middleware\modules\javax.persistence_1.0.0.0_1-0-2.jar;
    D:\toplink_11\jlib\eclipselink.jar" com.tangosol.net.DefaultCacheServer %1
    goto exit
    :instructions
    echo Usage:
    echo   ^<coherence_home^>\bin\cache-server.cmd
    goto exit
    :exit
    endlocal
    @echo onEdited by: junez on 04-Nov-2009 12:31

    Now report the following message:
    C:\coherence\bin>jpa-cache-server.cmd
    java version "1.6.0_16"
    Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
    Java HotSpot(TM) Server VM (build 14.2-b01, mixed mode)
    2009-11-04 16:03:54.320/0.563 Oracle Coherence 3.5.2/463 <Info> (thread=main, member=n/a): Loaded operational configurat
    ion from resource "jar:file:/C:/coherence/lib/coherence.jar!/tangosol-coherence.xml"
    2009-11-04 16:03:54.320/0.563 Oracle Coherence 3.5.2/463 <Info> (thread=main, member=n/a): Loaded operational overrides
    from resource "jar:file:/C:/coherence/lib/coherence.jar!/tangosol-coherence-override-dev.xml"
    2009-11-04 16:03:54.335/0.578 Oracle Coherence 3.5.2/463 <D5> (thread=main, member=n/a): Optional configuration override
    "/tangosol-coherence-override.xml" is not specified
    2009-11-04 16:03:54.335/0.578 Oracle Coherence 3.5.2/463 <D5> (thread=main, member=n/a): Optional configuration override
    "/custom-mbeans.xml" is not specified
    Oracle Coherence Version 3.5.2/463
    Grid Edition: Development mode
    Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved.
    Exception in thread "main" (Wrapped: Failed to load the factory) java.lang.reflect.InvocationTargetException
            at com.tangosol.util.Base.ensureRuntimeException(Base.java:293)
            at com.tangosol.net.DefaultCacheFactoryBuilder.getDefaultFactory(DefaultCacheFactoryBuilder.java:419)
            at com.tangosol.net.DefaultCacheFactoryBuilder.getSingletonFactory(DefaultCacheFactoryBuilder.java:113)
            at com.tangosol.net.DefaultCacheFactoryBuilder.getFactory(DefaultCacheFactoryBuilder.java:173)
            at com.tangosol.net.DefaultCacheFactoryBuilder.getConfigurableCacheFactory(DefaultCacheFactoryBuilder.java:149)
            at com.tangosol.net.CacheFactory.getConfigurableCacheFactory(CacheFactory.java:657)
            at com.tangosol.net.DefaultCacheServer.main(DefaultCacheServer.java:49)
    Caused by: 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:513)
            at com.tangosol.util.ClassHelper.newInstance(ClassHelper.java:662)
            at com.tangosol.net.DefaultCacheFactoryBuilder.getDefaultFactory(DefaultCacheFactoryBuilder.java:381)
            ... 5 more
    Caused by: (Wrapped: Failed to load configuration: C:\home\oracle\coherence\JPA\jpa-cache-config.xml) (Wrapped) java.io.
    IOException: Exception occurred during parsing: looking for id=9, found id=3((0,0,0) Character Data Literal xml version=
    "1.0" encoding="windows-1252" ?>
            at com.tangosol.util.Base.ensureRuntimeException(Base.java:293)
            at com.tangosol.net.DefaultConfigurableCacheFactory.loadConfig(DefaultConfigurableCacheFactory.java:403)
            at com.tangosol.net.DefaultConfigurableCacheFactory.loadConfig(DefaultConfigurableCacheFactory.java:372)
            at com.tangosol.net.DefaultConfigurableCacheFactory.<init>(DefaultConfigurableCacheFactory.java:141)
            ... 11 more
    Caused by: (Wrapped) java.io.IOException: Exception occurred during parsing: looking for id=9, found id=3((0,0,0) Charac
    ter Data Literal xml version="1.0" encoding="windows-1252" ?>
            at com.tangosol.run.xml.XmlHelper.loadXml(XmlHelper.java:137)
            at com.tangosol.run.xml.XmlHelper.loadXml(XmlHelper.java:152)
            at com.tangosol.net.DefaultConfigurableCacheFactory.loadConfig(DefaultConfigurableCacheFactory.java:395)
            ... 13 more
    Caused by: java.io.IOException: Exception occurred during parsing: looking for id=9, found id=3((0,0,0) Character Data L
    iteral xml version="1.0" encoding="windows-1252" ?>
            at com.tangosol.run.xml.SimpleParser.parseXml(SimpleParser.java:134)
            at com.tangosol.run.xml.SimpleParser.parseXml(SimpleParser.java:71)
            at com.tangosol.run.xml.SimpleParser.parseXml(SimpleParser.java:99)
            at com.tangosol.run.xml.XmlHelper.loadXml(XmlHelper.java:133)
            ... 15 more

  • Need Clarification on using cache along with JPA

    Hi,
    I am using Oracle Coherence 3.5 and Jdeveloper 11g.
    I have written a sample program which implements CacheStore which performs the following operations:
    Insert, Update, Delete
    Configured cache-config.xml file in whcih the element cachestore-scheme is used to invoke the corressponding class and the table name.
    When I tried to run the cache using the JPA-Cache-server.bat I got the values accordingly. But each and every time the data is fetched from Database. I am using distributed-scheme in the configuration file. How do I configure the file such that for the first time the values comes form DB and then next time I get values from cache.
    I used the same cache name in another program and tried to retrieve the values from cache but i got only null values:(
    I will be very thank full to you if any one helps me on this.
    Waiting for ur response..
    Thanks,
    Jagadeesh

    I did not change any data in DB. I tried changing data in DB and then tested I got the updated content.
    Below is my configuration file.
    <cache-config>
    <caching-scheme-mapping>
    <cache-mapping>
    <cache-name>Sample*</cache-name>
    <scheme-name>distributed-db-backed</scheme-name>
    </cache-mapping>
    </caching-scheme-mapping>
    <caching-schemes>
    <distributed-scheme>
    <scheme-name>distributed-db-backed</scheme-name>
    <service-name>DistributedCache</service-name>
    <backing-map-scheme>
    <read-write-backing-map-scheme>
    <internal-cache-scheme>
    <class-scheme>
    <class-name>com.tangosol.util.ObservableHashMap</class-name>
    </class-scheme>
    </internal-cache-scheme>
    <cachestore-scheme>
    <class-scheme>
    <class-name>com.oracle.coherence.handson.cachest</class-name> <!-- Class where Cache store is implemented-->
    <init-params>
    <init-param>
    <param-type>java.lang.String</param-type>
    <param-value>filest</param-value> <!-- Table name-->
    </init-param>
    </init-params>
    </class-scheme>
    </cachestore-scheme>
    <read-only>false</read-only>
    <!--
    To make this a write-through cache just change the value below to 0 (zero)
    -->
    <write-delay-seconds>0</write-delay-seconds>
    </read-write-backing-map-scheme>
    </backing-map-scheme>
    <listener/>
    <partition-count>100M</partition-count>
    <autostart>true</autostart>
    </distributed-scheme>
    </caching-schemes>
    </cache-config>
    Thanks,
    Jagadeesh

  • Entity-Named Query Caching - Need live results from DB not Cached

    I've developed an application EJB3 web application which uses Entity Beans and NamedQueries to retrieve my results.
    Aswell as my main EJB3 web application I also have an external interface (Oracle Stored Procedure) which is updating data in my database tables. The problem is that the when the NamedQueries are called they only bring back "Cached" resultsets and not the live results that exists in the database at that time. If my Stored Procedure updates a value (or if I update a value via Toad for testing) the NamedQuery does not bring back these changes. From what I have read about NamedQueries it seems that they do actually query the live db but send back the cached values for performance reasons.
    Is there a way to turn off caching of Query results?
    If not is there another way to deal with this issue?
    ps. I'm using Jdev 10.1.3.4 and appserver 10.1.3.1

    Anyone?

  • How to view SAP JPA query

    Hi All,
    In Hibernate we can see the query by setting in persistence xml file
    <property name="show_sql">true</property>
    Do we have anything like this in SAP JPA so that i can see the actual query ?
    If not is there any place in Server where can I check the fired query?
    Many Thanks

    Hi Arvind,
    You can monitor JPA Cache, for more details please have look of the below help
    Using JPA Monitors - Monitoring - SAP Library
    Thanks,
    Hamendra

  • WLS9.2 caching results of CallableStatement?

    Hello All,
    I've been flummoxed by a problem in which the results of a CallableStatement seem to be cached by our WebLogic 9.2 server. We have a connection pooled DataSource talking to Oracle8i (8.1.7.4.0), configured with 10 statements in a cache and the LRU algorithm, also 1 connection initially and a maximum of 15. We're using Oracle's ojdbc14.jar implementation and orai18n.jar.
    We're mostly executing CallableStatments for packaged procedures/functions that in turn call other procedures or run selects. What I'm geting at is, we're retrieving data rather than updating through our CallableStatement. The retreieved data we extract from the returned oracle ARRAY type using a homegrown map to the "shape" of each Struct underlying the ARRAY collection. In this problem, two CallableStatements are run and return data to our Java app, and at the start all is well. Then the underlying data is changed - via procedures in an oracle forms app on the database, not our Java app. Our Java app should display the changed data. The first CallableStatement runs again and an Eclipse remote debug shows the updated data, however the second CallableStatement continues to return the older data. We have oracle test harnesses that call the same procedures as our CallableStatements; both return the new data. If we leave it for sometime less than 45 minutes, the new data is then returned by both statements. Similarly, if we set the statement cache size to 0, the newe data is returned both times. We're closing the DB resources, (and in the right order: ResultSet, Statement and Connection)
    Has anyone come across this issue before? (From my searches it appears not). Secondly, is there a way of debugging into the WLS DataSource mechanism? I can go down as far as getting the ARRAY and no further, but if there's a switch/command line arg that I could use in the startWeblogic script that'd be great. I remember reading about a WebLogic attributeSpy, (or maybe spyAttribute?) and if I had to try the WLS driver for that I'd give it a go, but if Oracle have something similar that'd be fantastic.
    FWIW, changing the data via the oracle forms app changes the sysdate on the oracle database too.
    Variables from the debug that might be relevant:
    DataSource retrieved from jndi context of type WLEventContextImpl
    driversettings
    weblogic.jdbc.rmi.internal.RmiDriverSettings{verbose=false chunkSize=256 rowCacheSize=0}
    driverProps entrySet [EmulateTwoPhaseCommit=false, connectionPoolID=xxxxx, jdbcTxDataSource=true, LoggingLastResource=false, dataSourceName=xxxxx]
    Connection is PoolConnection_oracle_jdbc_driver_T4CConnection
    weblogic.jdbc.wrapper.PoolConnection_oracle_jdbc_driver_T4CConnection@5f1
    statement     is CallableStatement_oracle_jdbc_driver_T4CCallableStatement (id=nnnnn)     
    weblogic.jdbc.wrapper.CallableStatement_oracle_jdbc_driver_T4CCallableStatement@5f2
    There is a StatementHolder too:
    weblogic.jdbc.wrapper.CallableStatement_oracle_jdbc_driver_T4CCallableStatement@5f2=weblogic.jdbc.common.internal.StatementHolder@21cae26
    In the "stmts" table in "conn" in "stmt", there are the following two variables:
    jstmt     T4CCallableStatement (id=nnnnn) oracle.jdbc.driver.T4CCallableStatement@21cad44
    key     StatementCacheKey (id=nnnn)     { call my_pack_name.my_proc_name(?,?)}:true:-1:-1
    Thanks for any help that anyone might be able to shed on this!
    Best Regards,
    ConorD

    Hi Joe,
    Thanks for your reply; I'm delighted to see that you're still here helping WLS users under the Oracle banner :-)
    To answer your question, yes, we do get good behaviour when we set the statement cache size to 0. I ran a test on that where I set the Statement cache size to 0 and the initial number of connections to 0, then:
    *1)* Logged in through our Java/WLS app to a few test scenarios and saw the data
    *2)* Ran the oracle app on that DB outside of WLS which moved forward the state of the app, including sysdate
    *3)* Logged in again through our Java/WLS app to the test scenarios and saw the new data being returned from both CallableStatements
    I don't think that the initial number of connections had any effect on this, since WLS was running all the time and there was no retargetting of the DataSource, so IMHO it must have been the statement cache size.
    Where we hadn't got the Statement cache size 0, for step *3)* above one of the two CallableStatements continued to return the old data, (as if it had been told by the DB that the result hadn't changed, and it might as well return a cached result - if WLS does cache ResultSets?)
    Lastly, there is one case where we do see good behaviour even with a Statement cache size of 10:
    Between steps *2)* and *3)* above, if I untarget & activate, then retarget & activate the DataSource (to the same server/db that had just been untargetted) we see new data back from both statements on running step *3)*, even with the Statement cache size set to 10. My guess is that the untarget frees up any object in the Statement cache for collection and removes the remote DB session stubs that may be caching on the DB side.
    Thanks again and Best Regards,
    ConorD

  • JPA on the Grid API

    Hi All , I am working with JPA on the TopLink grid with Coherence my Intention is to put the data in cache as well as in database , when the database get shutdown i have to get the data from cache ..
    so for that i have created cache store to store the data in the cache its working fine when database is on startup mode , when db shutdown its unable to pick the data ...showing error
    2012-06-18 21:21:08.173/7.234 Oracle Coherence GE 3.7.1.0 <Error> (thread=DistributedCache:EclipseLinkJPA, member=1): BackingMapManager com.tangosol.net.DefaultConfigurableCacheFactory$Manager: failed to instantiate a cache: Employe
    2012-06-18 21:21:08.173/7.234 Oracle Coherence GE 3.7.1.0 <Error> (thread=DistributedCache:EclipseLinkJPA, member=1):
    (Wrapped: Missing or inaccessible constructor "oracle.eclipselink.coherence.standalone.EclipseLinkJPACacheStore(String,String)"
    <class-scheme>
    <!--
    Since the client code is using Coherence API we need the "standalone"
    version of the cache loader
    -->
    <class-name>oracle.eclipselink.coherence.standalone.EclipseLinkJPACacheStore</class-name>
    <init-params>
    <init-param>
    <param-type>java.lang.String</param-type>
    <param-value>Employe</param-value>
    </init-param>
    <init-param>
    <param-type>java.lang.String</param-type>
    <param-value>CacheStoreProject</param-value>
    </init-param>
    </init-params>
    </class-scheme>) java.lang.reflect.InvocationTargetException
         at com.tangosol.util.Base.ensureRuntimeException(Base.java:288)
         at com.tangosol.run.xml.XmlHelper.createInstance(XmlHelper.java:2652)
         at com.tangosol.run.xml.XmlHelper.createInstance(XmlHelper.java:2536)
         at com.tangosol.net.DefaultConfigurableCacheFactory.instantiateAny(DefaultConfigurableCacheFactory.java:3476)
         at com.tangosol.net.DefaultConfigurableCacheFactory.instantiateCacheStore(DefaultConfigurableCacheFactory.java:3324)
         at com.tangosol.net.DefaultConfigurableCacheFactory.instantiateReadWriteBackingMap(DefaultConfigurableCacheFactory.java:1753)
         at com.tangosol.net.DefaultConfigurableCacheFactory.configureBackingMap(DefaultConfigurableCacheFactory.java:1500)
         at com.tangosol.net.DefaultConfigurableCacheFactory$Manager.instantiateBackingMap(DefaultConfigurableCacheFactory.java:4111)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$Storage.instantiateBackingMap(PartitionedCache.CDB:22)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$Storage.setCacheName(PartitionedCache.CDB:25)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$ServiceConfig$ConfigListener.entryInserted(PartitionedCache.CDB:17)
         at com.tangosol.util.MapEvent.dispatch(MapEvent.java:266)
         at com.tangosol.util.MapEvent.dispatch(MapEvent.java:226)
         at com.tangosol.util.MapListenerSupport.fireEvent(MapListenerSupport.java:567)
         at com.tangosol.util.ObservableHashMap.dispatchEvent(ObservableHashMap.java:229)
         at com.tangosol.util.ObservableHashMap$Entry.onAdd(ObservableHashMap.java:270)
         at com.tangosol.util.SafeHashMap.put(SafeHashMap.java:244)
         at com.tangosol.coherence.component.util.ServiceConfig$Map.put(ServiceConfig.CDB:43)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$StorageIdRequest.onReceived(PartitionedCache.CDB:45)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onMessage(Grid.CDB:34)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:33)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.PartitionedService.onNotify(PartitionedService.CDB:3)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.onNotify(PartitionedCache.CDB:3)
         at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
         at java.lang.reflect.Constructor.newInstance(Unknown Source)
         at com.tangosol.util.ClassHelper.newInstance(ClassHelper.java:694)
         at com.tangosol.run.xml.XmlHelper.createInstance(XmlHelper.java:2611)
         ... 23 more
    Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: Listener refused the connection with the following error:
    ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
    The Connection descriptor used by the client was:
    localhost:1521:xe
    Error Code: 0
         at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:517)
         at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getDatabaseSession(EntityManagerFactoryDelegate.java:188)
         at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getServerSession(EntityManagerFactoryDelegate.java:219)
         at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:247)
         at org.eclipse.persistence.jpa.JpaHelper.getServerSession(JpaHelper.java:193)
         at oracle.eclipselink.coherence.standalone.EclipseLinkJPACacheLoader.<init>(EclipseLinkJPACacheLoader.java:70)
         at oracle.eclipselink.coherence.standalone.EclipseLinkJPACacheStore.<init>(EclipseLinkJPACacheStore.java:26)
         ... 29 more
    Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: Listener refused the connection with the following error:
    ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
    The Connection descriptor used by the client was:
    localhost:1521:xe
    Error Code: 0
         at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:324)
         at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:319)
         at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:138)
         at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
         at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:584)
         at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:206)
         at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:488)
         ... 35 more
    Caused by: java.sql.SQLException: Listener refused the connection with the following error:
    ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
    The Connection descriptor used by the client was:
    localhost:1521:xe
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:261)
         at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)
         at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:414)
         at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
         at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
         at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
         at java.sql.DriverManager.getConnection(Unknown Source)
         at java.sql.DriverManager.getConnection(Unknown Source)
         at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:98)
         ... 39 more
    New Employe from cache is: null
    program for put and get the data from cache
    package com.cachestore.example;
    import com.oracle.employe.Employe;
    import com.tangosol.net.CacheFactory;
    import com.tangosol.net.NamedCache;
    public class PutGetData {
         public static void main(String[] args) {
              System.setProperty("tangosol.coherence.distributed.localstorage","true");
              // Get the cache--name is same as Entity
              NamedCache employeeCache = CacheFactory.getCache("Employe");
              Employe employee = new Employe();
              employee.setId(4);
              employee.setFirstname("rambabu");
              employee.setLastname("davuluri");
              //employeeCache.put(employee.getId(), employee);
              // Getting an object from cache produces no SQL
              System.out.println("New Employe from cache is: " + employeeCache.get(4));
    Thanks

    What's happening is the JPA cache store is failing on creation/initialization due to its inability to connect to the database.
    Can you describe the behaviour you're expecting? Are you saying you want an "optional" cache store that works when the database is up and silently ignores problems when the database is down? It would still have to fail on write otherwise Coherence write behind will believe the writes have been successfully performed and won't get retried. On a get() with a cache miss, would retuning a null from the cache store be what you want? Your application will be lead to believe that there is no object with the specified key when in reality there may be such an object that just doesn't happen to have been read into cache yet. Perhaps this is acceptable if you were to fully warm your caches.
    --Shaun                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • NamedQuery Results are Cached - I Need to retrieve live database results

    I've developed an application EJB3 web application which uses Entity Beans and NamedQueries to retrieve my results.
    Aswell as my main EJB3 web application I also have an external interface (Oracle Stored Procedure) which is updating data in my database tables. The problem is that the when the NamedQueries are called they only bring back "Cached" resultsets and not the live results that exists in the database at that time. If my Stored Procedure updates a value (or if I update a value via Toad for testing) the NamedQuery does not bring back these changes. From what I have read about NamedQueries it seems that they do actually query the live db but send back the cached values for performance reasons.
    Is there a way to turn off caching of Query results?
    If not is there another way to deal with this issue?
    ps. I'm using Jdev 10.1.3.4 and appserver 10.1.3.1
    Edited by: darkBubble on 15-May-2009 07:33

    I've posted this within the oc4j forum. Admin please remove this thread.

  • Why I have the problem about "terminateConnection()"

    When I want to destruct my class, there is an error occured for "Segmentation fault". My code is following:
    COMSDatabase::COMSDatabase(string strUser,string strPassword,string strSID)
         m_pEnv = Environment::createEnvironment (Environment::DEFAULT);
         m_pConn = m_pEnv->createConnection (strUser,strPassword,strSID);
         m_pConn->setStmtCacheSize(10);                         //10 is the num of Statement in the cache.          
    COMSDatabase::~COMSDatabase()
         m_pEnv->terminateConnection(m_pConn); //!!!!Error!!! Why????                    
    Environment::terminateEnvironment(m_pEnv);
    void COMSDatabase::GetJobRequest(char *&pszRequestID, char *&pszJobID, char &cRequestCommand, int &nProcessLevel)
         string sqlStmt = "SELECT REQUESTID,JOBID,REQUESTCOMMAND,PROCESS_LEVEL FROM OMSREQUEST ORDER BY PROCESS_LEVEL DESC, REQUESTCOMMAND ASC";
    m_pStmt = m_pConn->createStatement(sqlStmt,"queryOMSRequest");     //using Statement Caching
    ResultSet *pRset = m_pStmt->executeQuery ();        
    ResultSet::Status status = pRset->status();
    if (0!=status)
         try{
              if (pRset->next ())
                   string strRequestID = pRset->getString(1);     
                   const char *pszRequestIDTemp = strRequestID.c_str();                     
                   sprintf(pszRequestID,"%s",pszRequestIDTemp);
                   string strJobID = pRset->getString(2);
                   const char *pszJobIDTemp = strJobID.c_str();
                   sprintf(pszJobID,"%s",pszJobIDTemp);
         string strRequestCommandTemp = pRset->getString(3);
         const char *pszRequestCommandTemp = strRequestCommandTemp.c_str();
         cRequestCommand = pszRequestCommandTemp[0];
         nProcessLevel = pRset->getInt(4);     
              else
                   m_nErrorCode=1;
                   m_strErrMsg="No Job Request Command available now!" ;
         }catch(SQLException ex)
              m_nErrorCode=ex.getErrorCode();
              m_strErrMsg=ex.getMessage();
              m_pStmt->closeResultSet (pRset);
              return ;
         catch (exception &ex)
                   m_nErrorCode=-1;
              m_strErrMsg=ex.what();
              m_pStmt->closeResultSet (pRset);
              return ;
    m_pStmt->closeResultSet (pRset);
         m_pConn->terminateStatement (m_pStmt,"queryOMSRequest");
    return ;
    }

    I got it!

  • Getting following exception while running coherence tutorial using JDev

    Hi,
    I am getting following exception while running the Oracle Coherence tutorial in Jdeveloper, but unfortunately I'm not able to figure out what's wrong with my configuration.
    Any help will be highly appreciated,
    D:\OracleSOA\Middleware\jdk160_24\bin\javaw.exe -client -classpath C:\JDeveloper\mywork\KnowledgeSOA\.adf;C:\JDeveloper\mywork\KnowledgeSOA\JPA\classes;D:\OracleSOA\Middleware\modules\com.oracle.toplink_1.0.0.0_11-1-1-5-0.jar;D:\OracleSOA\Middleware\modules\org.eclipse.persistence_1.1.0.0_2-1.jar;D:\OracleSOA\Middleware\modules\com.bea.core.antlr.runtime_2.7.7.jar;D:\OracleSOA\Middleware\modules\javax.persistence_1.0.0.0_2-0-0.jar;D:\OracleSOA\Middleware\oracle_common\modules\oracle.xdk_11.1.0\xmlparserv2.jar;D:\OracleSOA\Middleware\oracle_common\modules\oracle.xdk_11.1.0\xml.jar;D:\OracleSOA\Middleware\modules\javax.jsf_1.1.0.0_1-2.jar;D:\OracleSOA\Middleware\modules\javax.ejb_3.0.1.jar;D:\OracleSOA\Middleware\modules\javax.enterprise.deploy_1.2.jar;D:\OracleSOA\Middleware\modules\javax.interceptor_1.0.jar;D:\OracleSOA\Middleware\modules\javax.jms_1.1.1.jar;D:\OracleSOA\Middleware\modules\javax.jsp_1.2.0.0_2-1.jar;D:\OracleSOA\Middleware\modules\javax.jws_2.0.jar;D:\OracleSOA\Middleware\modules\javax.activation_1.1.0.0_1-1.jar;D:\OracleSOA\Middleware\modules\javax.mail_1.1.0.0_1-4-1.jar;D:\OracleSOA\Middleware\modules\javax.xml.soap_1.3.1.0.jar;D:\OracleSOA\Middleware\modules\javax.xml.rpc_1.2.1.jar;D:\OracleSOA\Middleware\modules\javax.xml.ws_2.1.1.jar;D:\OracleSOA\Middleware\modules\javax.management.j2ee_1.0.jar;D:\OracleSOA\Middleware\modules\javax.resource_1.5.1.jar;D:\OracleSOA\Middleware\modules\javax.servlet_1.0.0.0_2-5.jar;D:\OracleSOA\Middleware\modules\javax.transaction_1.0.0.0_1-1.jar;D:\OracleSOA\Middleware\modules\javax.xml.stream_1.1.1.0.jar;D:\OracleSOA\Middleware\modules\javax.security.jacc_1.0.0.0_1-1.jar;D:\OracleSOA\Middleware\modules\javax.xml.registry_1.0.0.0_1-0.jar;D:\OracleSOA\Middleware\jdeveloper\ide\macros\..\..\..\oracle_common\modules\oracle.jdbc_11.1.1\ojdbc6dms.jar;D:\OracleSOA\Middleware\jdeveloper\ide\macros\..\..\..\oracle_common\modules\oracle.nlsrtl_11.1.0\orai18n.jar;D:\OracleSOA\Middleware\oracle_common\modules\oracle.odl_11.1.1\ojdl.jar;D:\OracleSOA\Middleware\oracle_common\modules\oracle.dms_11.1.1\dms.jar;D:\Coherence\toplink\jlib\eclipselink.jar;D:\Coherence\coherence-java-3.7.1.0b27797\coherence\lib\coherence.jar;D:\Oracle\Middleware\modules\javax.persistence_1.0.0.0_1-0-2.jar;D:\Coherence\coherence-java-3.7.1.0b27797\coherence\lib\coherence-jpa.jar;D:\Coherence\ojdbc5.jar;D:\Coherence\toplink\jlib\toplink.jar -Djavax.net.ssl.trustStore=D:\OracleSOA\Middleware\wlserver_10.3\server\lib\DemoTrust.jks -Dhttp.proxyHost=proxymlz.samba.com -Dhttp.proxyPort=80 -Dhttp.nonProxyHosts=scms.*|*.contoso.com|ldrps.*|col.wls.*|desu*|tdlintra.*|10.8.*|10.10.*|*.corp.samba.com|ckcexch1*|whoexch1*|lhoexch1*|ehoexch1*|cmzexch2*|choexch2*|cdcstg2.*|itr2.samba.com|itr.samba.com|*.session.rservices.com|cold.samba.com|sims.samba.com|intranet.samba.com|localhost|localhost.localdomain|127.0.0.1|::1|crgmz01bssu-006.corp.samba.com|crgmz01bssu-006 -Dhttps.proxyHost=proxymlz.samba.com -Dhttps.proxyPort=80 -Dhttps.nonProxyHosts=scms.*|*.contoso.com|ldrps.*|col.wls.*|desu*|tdlintra.*|10.8.*|10.10.*|*.corp.samba.com|ckcexch1*|whoexch1*|lhoexch1*|ehoexch1*|cmzexch2*|choexch2*|cdcstg2.*|itr2.samba.com|itr.samba.com|*.session.rservices.com|cold.samba.com|sims.samba.com|intranet.samba.com|localhost|localhost.localdomain|127.0.0.1|::1|crgmz01bssu-006.corp.samba.com|crgmz01bssu-006 -Dtangosol.coherence.cacheconfig=C:\JDeveloper\mywork\KnowledgeSOA\JPA\jpa-cache-config.xml -Dtangosol.coherence.distributed.localstorage=false -Dtangosol.coherence.log.level=3 com.samba.coherence.RunEmployee
    2012-08-12 13:36:48.447/0.265 Oracle Coherence 3.7.1.0 <Info> (thread=main, member=n/a): Loaded operational configuration from "jar:file:/D:/Coherence/coherence-java-3.7.1.0b27797/coherence/lib/coherence.jar!/tangosol-coherence.xml"
    2012-08-12 13:36:48.479/0.297 Oracle Coherence 3.7.1.0 <Info> (thread=main, member=n/a): Loaded operational overrides from "jar:file:/D:/Coherence/coherence-java-3.7.1.0b27797/coherence/lib/coherence.jar!/tangosol-coherence-override-dev.xml"
    Oracle Coherence Version 3.7.1.0 Build 27797
    Grid Edition: Development mode
    Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
    2012-08-12 13:36:48.603/0.421 Oracle Coherence GE 3.7.1.0 <Info> (thread=main, member=n/a): Loaded cache configuration from "file:/C:/JDeveloper/mywork/KnowledgeSOA/JPA/jpa-cache-config.xml"; this document does not refer to any schema definition and has not been validated.
    2012-08-12 13:36:49.290/1.108 Oracle Coherence GE 3.7.1.0 <Info> (thread=Cluster, member=n/a): This Member(Id=3, Timestamp=2012-08-12 13:36:49.118, Address=10.10.51.150:8090, MachineId=30889, Location=site:,machine:crgmz01bssu-006,process:4816, Role=SambaCoherenceRunEmployee, Edition=Grid Edition, Mode=Development, CpuCount=4, SocketCount=4) joined cluster "cluster:0xFCDB" with senior Member(Id=1, Timestamp=2012-08-12 13:31:01.774, Address=10.10.51.150:8088, MachineId=30889, Location=site:,machine:crgmz01bssu-006,process:4812, Role=CoherenceServer, Edition=Grid Edition, Mode=Development, CpuCount=4, SocketCount=4)
    2012-08-12 13:36:49.305/1.123 Oracle Coherence GE 3.7.1.0 <Info> (thread=main, member=n/a): Started cluster Name=cluster:0xFCDB
    Group{Address=224.3.7.0, Port=37000, TTL=4}
    MasterMemberSet(
    ThisMember=Member(Id=3, Timestamp=2012-08-12 13:36:49.118, Address=10.10.51.150:8090, MachineId=30889, Location=site:,machine:crgmz01bssu-006,process:4816, Role=SambaCoherenceRunEmployee)
    OldestMember=Member(Id=1, Timestamp=2012-08-12 13:31:01.774, Address=10.10.51.150:8088, MachineId=30889, Location=site:,machine:crgmz01bssu-006,process:4812, Role=CoherenceServer)
    ActualMemberSet=MemberSet(Size=2
    Member(Id=1, Timestamp=2012-08-12 13:31:01.774, Address=10.10.51.150:8088, MachineId=30889, Location=site:,machine:crgmz01bssu-006,process:4812, Role=CoherenceServer)
    Member(Id=3, Timestamp=2012-08-12 13:36:49.118, Address=10.10.51.150:8090, MachineId=30889, Location=site:,machine:crgmz01bssu-006,process:4816, Role=SambaCoherenceRunEmployee)
    MemberId|ServiceVersion|ServiceJoined|MemberState
    1|3.7.1|2012-08-12 13:31:01.774|JOINED,
    3|3.7.1|2012-08-12 13:36:49.305|JOINED
    RecycleMillis=1200000
    RecycleSet=MemberSet(Size=0
    TcpRing{Connections=[1]}
    IpMonitor{AddressListSize=0}
    Exception in thread "main" (Wrapped) java.io.InvalidClassException: org.eclipse.persistence.indirection.IndirectList; local class incompatible: stream classdesc serialVersionUID = 4038061360325736360, local class serialVersionUID = -494763524358427112
         at com.tangosol.util.ExternalizableHelper.fromBinary(ExternalizableHelper.java:266)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$ConverterFromBinary.convert(PartitionedCache.CDB:4)
         at com.tangosol.util.ConverterCollections$ConverterMap.get(ConverterCollections.java:1655)
         at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$ViewMap.get(PartitionedCache.CDB:1)
         at com.tangosol.coherence.component.util.SafeNamedCache.get(SafeNamedCache.CDB:1)
         at com.samba.coherence.RunEmployee.main(RunEmployee.java:17)
    Caused by: java.io.InvalidClassException: org.eclipse.persistence.indirection.IndirectList; local class incompatible: stream classdesc serialVersionUID = 4038061360325736360, local class serialVersionUID = -494763524358427112
         at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:562)
         at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1582)
         at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1495)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1731)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
         at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1946)
         at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1870)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
         at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1946)
         at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1870)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
         at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1946)
         at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1870)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
         at com.tangosol.util.ExternalizableHelper.readSerializable(ExternalizableHelper.java:2217)
         at com.tangosol.util.ExternalizableHelper.readObjectInternal(ExternalizableHelper.java:2348)
         at com.tangosol.util.ExternalizableHelper.deserializeInternal(ExternalizableHelper.java:2746)
         at com.tangosol.util.ExternalizableHelper.fromBinary(ExternalizableHelper.java:262)
         ... 5 more
    Process exited with exit code 1.
    My Cache-Config file
    <?xml version="1.0" encoding="windows-1252" ?>
    <cache-config>
    <caching-scheme-mapping>
    <cache-mapping>
    <!-- Set the name of the cache to be the entity name -->
    <cache-name>Employees</cache-name>
    <!-- Configure this cache to use the scheme defined below -->
    <scheme-name>jpa-distributed</scheme-name>
    </cache-mapping>
    </caching-scheme-mapping>
    <caching-schemes>
    <distributed-scheme>
    <scheme-name>jpa-distributed</scheme-name>
    <service-name>JpaDistributedCache</service-name>
    <backing-map-scheme>
    <read-write-backing-map-scheme>
    <!--
    Define the cache scheme
    -->
    <internal-cache-scheme>
    <local-scheme/>
    </internal-cache-scheme>
    <cachestore-scheme>
    <class-scheme>
    <class-name>com.tangosol.coherence.jpa.JpaCacheStore</class-name>
    <init-params>
    <!--
    This param is the entity name
    This param is the fully qualified entity class
    This param should match the value of the
    persistence unit name in persistence.xml
    -->
    <init-param>
    <param-type>java.lang.String</param-type>
    <param-value>{cache-name}</param-value>
    </init-param>
    <init-param>
    <param-type>java.lang.String</param-type>
    <param-value>com.samba.coherence.{cache-name}</param-value>
    </init-param>
    <init-param>
    <param-type>java.lang.String</param-type>
    <param-value>JPA</param-value>
    </init-param>
    </init-params>
    </class-scheme>
    </cachestore-scheme>
    </read-write-backing-map-scheme>
    </backing-map-scheme>
    <autostart>true</autostart>
    </distributed-scheme>
    </caching-schemes>
    </cache-config>
    cache-server.cmd
    @echo off
    @rem This will start a cache server
    setlocal
    :config
    @rem specify the Coherence installation directory
    set coherence_home=D:\Coherence\coherence-java-3.7.1.0b27797\coherence
    @rem specify the JVM heap size
    set memory=512m
    :start
    if not exist "%coherence_home%\lib\coherence.jar" goto instructions
    if "%java_home%"=="" (set java_exec=java) else (set java_exec=%java_home%\bin\java)
    :launch
    if "%1"=="-jmx" (
         set jmxproperties=-Dcom.sun.management.jmxremote -Dtangosol.coherence.management=all -Dtangosol.coherence.management.remote=true
         shift
    set java_opts=-Xms%memory% -Xmx%memory% %jmxproperties% -Dtangosol.coherence.cacheconfig=C:\JDeveloper\mywork\KnowledgeSOA\JPA\jpa-cache-config.xml
    %java_exec% -server -showversion %java_opts% -cp "%coherence_home%\lib\coherence.jar;C:\JDeveloper\mywork\KnowledgeSOA\JPA\classes;D:\Coherence\coherence-java-3.7.1.0b27797\coherence\lib\coherence-jpa.jar;D:\Coherence\ojdbc5.jar;D:\Coherence\toplink\jlib\eclipselink.jar;D:\Oracle\Middleware\modules\javax.persistence_1.0.0.0_1-0-2.jar" com.tangosol.net.DefaultCacheServer %1
    goto exit
    :instructions
    echo Usage:
    echo ^<coherence_home^>\bin\cache-server.cmd
    goto exit
    :exit
    endlocal
    @echo on
    Many Thanks in Advance
    Zia

    Hi Zia,
    The error is...
    Caused by: java.io.InvalidClassException: org.eclipse.persistence.indirection.IndirectList; local class incompatible: stream classdesc serialVersionUID = 4038061360325736360, local class serialVersionUID = -494763524358427112
    ...which means you have two different versions of org.eclipse.persistence.indirection.IndirectList, one on the server and one in the client (JDeveloper). As these classes have different serialVersionUID values then Java throws an exception when deserializing as they are probably not compatible.
    I don't know much about the Eclipse stuff but from looking at your post I can only assume one version of the class is in D:\Coherence\toplink\jlib\eclipselink.jar on the Coherence server side and the other is in JDevloper in D:\OracleSOA\Middleware\modules\org.eclipse.persistence_1.1.0.0_2-1.jar as these are the only jar file containing "eclipse" that I can see on the classpaths.
    JK

Maybe you are looking for