Exception [TOPLINK-18001] (Cache synchronization)

Hi,
While trying to turn on cache synchronization, getting this exception (see below).
What could be wrong?
Interne Exception: weblogic.jms.common.JMSException: Error deserializing objec
     at oracle.toplink.exceptions.JMSProcessingException.buildDefault(JMSProcessingException.java:20
     at oracle.toplink.remote.jms.TopLinkMessageListener.onMessage(TopLinkMessageListener.java:60
     at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2596
     at weblogic.jms.client.JMSSession.execute(JMSSession.java:2516
     at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197
     at weblogic.kernel.Kernel.execute(Kernel.java:336
     at weblogic.kernel.Kernel.execute(Kernel.java:360
     at weblogic.kernel.Kernel.execute(Kernel.java:348
     at weblogic.jms.client.JMSSession.pushMessage(JMSSession.java:2392
     at weblogic.jms.client.JMSSession.invoke(JMSSession.java:2919
     at weblogic.jms.dispatcher.Request.wrappedFiniteStateMachine(Request.java:609
     at weblogic.jms.dispatcher.DispatcherImpl.dispatchAsyncInternal(DispatcherImpl.java:128
     at weblogic.jms.dispatcher.DispatcherImpl.dispatchOneWay(DispatcherImpl.java:312
     at weblogic.jms.dispatcher.DispatcherImpl_WLSkel.invoke(Unknown Source
     at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:466
     at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:409
     at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:353
     at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144
     at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:404
     at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30
     at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197
     at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170
Please help!
THX.

Hi Gordon,
Sorry i don't know what class.
The Excpetion string don't give more information
BEA-040368 14.06.2005 14.36 Uhr IRST Error JMS The following exception has occurred:
Lokaler Exception-Stack:
Exception [TOPLINK-18001] (OracleAS TopLink - 10g (9.0.4.5) (Build 040930)): oracle.toplink.exceptions.JMSProcessingExceptio
Exception-Beschreibung: Fehler bei der Verarbeitung von ankommender JMS-Meldun
Interne Exception: weblogic.jms.common.JMSException: Error deserializing objec
     at oracle.toplink.exceptions.JMSProcessingException.buildDefault(JMSProcessingException.java:20
     at oracle.toplink.remote.jms.TopLinkMessageListener.onMessage(TopLinkMessageListener.java:60
     at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2596
     at weblogic.jms.client.JMSSession.execute(JMSSession.java:2516
     at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197
     at weblogic.kernel.Kernel.execute(Kernel.java:336
     at weblogic.kernel.Kernel.execute(Kernel.java:360
     at weblogic.kernel.Kernel.execute(Kernel.java:348
     at weblogic.jms.client.JMSSession.pushMessage(JMSSession.java:2392
     at weblogic.jms.client.JMSSession.invoke(JMSSession.java:2919
     at weblogic.jms.dispatcher.Request.wrappedFiniteStateMachine(Request.java:609
     at weblogic.jms.dispatcher.DispatcherImpl.dispatchAsyncInternal(DispatcherImpl.java:128
     at weblogic.jms.dispatcher.DispatcherImpl.dispatchOneWay(DispatcherImpl.java:312
     at weblogic.jms.dispatcher.DispatcherImpl_WLSkel.invoke(Unknown Source
     at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:466
     at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:409
     at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:353
     at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144
     at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:404
     at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30
     at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197
     at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170
>

Similar Messages

  • Cache synchronization exception

    I am getting following exception, while trying to synchronize cache. Any Ideas ?
    Thanks in advance,
    Moin
    04/12/22 18:42:22 onMessage
    Local Exception Stack:
    Exception [TOPLINK-18001] (OracleAS TopLink - 10g (9.0.4.2) (Build 040311)): oracle.toplink.exceptions.JMSProcessingException
    Exception Description: Error while processing incomming JMS message
    Internal Exception: javax.jms.JMSException: getObject
         at oracle.toplink.exceptions.JMSProcessingException.buildDefault(JMSProcessingException.java:18)
         at oracle.toplink.remote.jms.TopLinkMessageListener.onMessage(TopLinkMessageListener.java:58)
         at com.evermind.server.jms.EvermindSession.doListener(EvermindSession.java:1326)
         at com.evermind.server.jms.EvermindSession.handleMessage(EvermindSession.java:1142)
         at com.evermind.server.jms.EvermindMessageConsumer.handleMessage(EvermindMessageConsumer.java:445)
         at com.evermind.server.jms.EvermindMessageConsumer.access$300(EvermindMessageConsumer.java:40)
         at com.evermind.server.jms.EvermindMessageConsumer$1.run(EvermindMessageConsumer.java:399)
         at java.lang.Thread.run(Unknown Source)

    Is there any more information on the Internal JMS Exception? Potentially printed out in another part of the stack trace?
    --Gordon                                                                                                                                                                                                                                                                       

  • Toplink cache synchronization between two nodes using tomcat

    Hi,
    In our appcation we have two nodes. Using websphere we used to synchronize toplink cache between two nodes. Can we do same thing using tomcat.

    Yes, TopLink implements cache synchronization using JMS or RMI easily, which are not dependent on the server being used - though it JMS especially does require a JMS provider that is accessible from each node.  Cache synchronization is now cache coordination, and is described using JPA properties here:
    http://wiki.eclipse.org/EclipseLink/Examples/JPA/CacheCoordination
    the Toplink cache synchronization/coordination with JMS | EMBARCADEROS seems to be a good read for cache coordination over JMS, but is more aimed at TopLink's sessions.xml configuration.
    Best Regards,
    Chris

  • Cache synchronization log

    Hi,
    I am using Toplink's cache synchronization by JMS. Is there a log where I can see the objects being synchronized.
    Thanks,
    Moin

    Moin,
    You can get details of the cache coordination activities by enabling debugging. The details of what is being synchronized is not displayed in any log. This would be far too intrusive on performance. You could add this yourself by using a SessionEventListener.postCommitUnitOfWork. In this event the ChangeSet will include all changes that will be synchronized.
    Doug

  • JMS Cache Synchronization - Merge or Database Read?

    When an object in one JVM is changed does TopLink' JMS cache synchronization mechanism merge the changes into the other JVMS in a cluster or does it just signal that the object is dirty and the object is re-read from the database?
    If the answer is 'merge' does a post merge event get called on the object being merged?
    thanks
    Steve

    In TopLink 10.1.3 both can happen, the changes can be merged or an object can be marked invalid and TopLink will refresh the object as needed. In 9.0.4.X the changes will be merged into the other caches (if an object of correct version exists in that cache).
    In the case of a merge postMerge() event will be called.
    --Gordon

  • Cache Synchronization Exception Handling

    I am setting up cache synchronization on WebLogic using JMS. I am looking into writing an exception handler to handle cache synchronization exceptions. The following statement in the documentation caught my attention:
    “As mentioned above, the TopLink cache does not begin the merge or update process until the database transaction has already been committed. This is quite beneficial in that it avoids letting uncommitted data into the shared cache, but should be recognized where transactional synchronization is considered. In cases where a merge may have failed there is no way to roll back the changes made to the database (although it is questionable whether this would be a good idea in any case). As a consequence, failures during remote merging can leave the cache in an inconsistent state. This makes it important to handle any errors that occur by performing cache normalization actions, such as resetting the cache, or even the server.”
    Suppose we have two app server instances, A and B. Instance A commits a change and sends the update notification to instance B. The merge fails on instance B with an optimistic lock exception.
    - I assume that a CacheSynchronizationException will be thrown. Will it be thrown on instance A, B, or both?
    - At this point which cache is inconsistent; A, B, or both?
    - The documentation suggests resetting the cache, but this seems a rather severe way of dealing with the problem. Is it feasible / effective to just refresh the objects in the change set of the CacheSynchronizationException?
    This is a simple exception handler. On receiving a CacheSynchronizationException it resets the cache and re-throws the exception.
    class ToplinkExceptionHandler implements ExceptionHandler{
         public Object handleException(RuntimeException exception) throws DatabaseException{
              if(exception instanceof CacheSynchronizationException){){
                   myServerSession.initializeAllIdentityMaps();
                   throw exception;
              }else{
                   throw exception;
    - Is this approach effective?
    - Once the cache is reset should the exception be re-thrown or should I consider it handled and swallow it? If I do swallow it what should the method return?
    Any advice would be appreciated.

    I had to fix a few errors (in our code) before getting it working. Since I have multiple sessions, I had to specify different multicast ports (actually I used a different multicast address itself) for each of the sessions. I was not setting the announcement delay on one of the sesssions and that was why it was announcing immediately upon coming up. Also I had to explicitly set asynchronous to false because it is true by default.
    BTW, we are not using CMP (entity beans) rather Java Objects. Our deployment has two Apache/Tomcat machines and two WebLogic machines. The WebLogic servers are in a round-robin cluster. The cache synchronization seems to be working fine for this configuration.
    Thanks.
    Anand R

  • JMS Exception during cache synchronization

    Hi,
    I am using JMS cache synchronization fro two applications . During cache synchronization I got this exception
    Local Exception Stack:
    Exception [TOPLINK-0] (OracleAS TopLink - 10g (9.0.4.5) (Build 040930)): oracle.toplink.exceptions.CommunicationException
    Exception Description: javax.jms.JMSException: enqMessage at oracle.toplink.remote.jms.JMSConnection.processCommand(JMSConnection.java:54) at oracle.toplink.internal.remote.ChangeSetPropagator$1.run(ChangeSetPropagator.java:64)
    Has this something to do with the message size ?
    Appreciate any help.
    Thanks
    Priya

    would not expect TopLink to connect twice at all. Is it possible that another service from within the ApplicationServer is connecting? I would recommend changing the JNDI location or the service port of the TIBCO JMS service and altering the TopLink JMS Clustering Service URL to reflect this change. Then verify that multiple connections are still being acquired.
    --Gordon

  • Toplink in Cluster without Cache Synchronization

    Hello,
    I’m trying to setup my J2EE app that uses Toplink for its persistence in a 9iAS cluster. For the first release I’m not planning to use Toplink Cache synchronization but planning to deploy the app in 9iAS cluster of nodes say A and B. By default all the requests goes to one app server (say A) in the cluster. When the app in node A goes down app in node B starts and accepts all the requests transparently. For this scenario:
    1.     Do I need to use any Toplink feature/API?
    2.     What design considerations I need to consider for my app so that I can achieve my short-term goal and the long-term goal of implementing Cache synchronization easily?
    Any references/pointers would help me.
    Thanks
    -Mani

    TopLink Cache Coordination (Synchronization) can be enabled at any point during your development. And is not required on a system running in a cluster. No special TopLink API's are required when running in the cluster.
    There should be no design decisions made now that would affect the use of Cache Coordination (Synchronization) in the future.
    --Gordon

  • Error handling for distributed cache synchronization

    Hello,
    Can somebody explain to me how the error handling works for the distributed cache synchronization ?
    Say I have four nodes of a weblogic cluster and 4 different sessions on each one of those nodes.
    On Node A an update happens on object B. This update is going to be propogated to all the other nodes B, C, D. But for some reason the connection between node A and node B is lost.
    In the following xml
    <cache-synchronization-manager>
    <clustering-service>...</clustering-service>
    <should-remove-connection-on-error>true</should-remove-connection-on-error>
    If I set this to true does this mean that the Toplink will stop sending updates from node A to node B ? I presume all of this is transparent. In order to handle any errors I do not have to write any code to capture this kind of error .
    Is that correct ?
    Aswin.

    This "should-remove-connection-on-error" option mainly applies to RMI or RMI_IIOP cache synchronization. If you use JMS for cache synchronization, then connectivity and error handling is provided by the JMS service.
    For RMI, when this is set to true (which is the default) if a communication exception occurs in sending the cache synchronization to a server, that server will be removed and no longer synchronized with. The assumption is that the server has gone down, and when it comes back up it will rejoin the cluster and reconnect to this server and resume synchronization. Since it will have an empty cache when it starts back up, it will not have missed anything.
    You do not have to perform any error handling, however if you wish to handle cache synchronization errors you can use a TopLink Session ExceptionHandler. Any cache synchronization errors will be sent to the session's exception handler and allow it to handle the error or be notified of the error. Any errors will also be logged to the TopLink session's log.

  • 10.1.3 JMS Cache Synchronization on OC4J

    Hi,
    We're using stand-alone OC4j 10.1.3.0 along with TopLink 10.1.3.0 (packaged with OC4j). In enabling JMS cache synchronization, I get the following error message:
    Exception [TOPLINK-12000] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.CommunicationException
    Exception Description: Error Sending connection service to jms/Topic/ToplinkCacheSync.
    Internal Exception: javax.jms.JMSException: TopicSubscriber[Oc4jJMS.Consumer.arkansas.6e2ec2b0:1117159d1ca:-7fff.65,Topic[ToplinkCacheSync],null,null,false]: cannot invoke method "setMessageListener" within the J2EE container.
    at oracle.toplink.exceptions.CommunicationException.errorSendingConnectionService(CommunicationException.java:40)
    at oracle.toplink.remote.CacheSynchronizationManager.addRemoteConnection(CacheSynchronizationManager.java:175)
    at oracle.toplink.remote.jms.JMSClusteringService.retreiveRemoteSessions(JMSClusteringService.java:198)
    at oracle.toplink.remote.jms.JMSClusteringService.run(JMSClusteringService.java:175)
    Caused by: javax.jms.JMSException: TopicSubscriber[Oc4jJMS.Consumer.arkansas.6e2ec2b0:1117159d1ca:-7fff.65,Topic[ToplinkCacheSync],null,null,false]: cannot invoke method "setMessageListener" within the J2EE container.
    at com.evermind.server.jms.JMSUtils.make(JMSUtils.java:1034)
    at com.evermind.server.jms.JMSUtils.toJMSException(JMSUtils.java:1114)
    at com.evermind.server.jms.JMSUtils.toJMSException(JMSUtils.java:1085)
    at com.evermind.server.jms.JMSUtils.assertNotContainer(JMSUtils.java:1500)
    at com.evermind.server.jms.EvermindMessageConsumer.setMessageListener(EvermindMessageConsumer.java:217)
    at oracle.toplink.remote.jms.JMSClusteringService.connectBackToRemote(JMSClusteringService.java:53)
    at oracle.toplink.remote.CacheSynchronizationManager.addRemoteConnection(CacheSynchronizationManager.java:168)
    ... 2 more
    It is, therefore, my assumption that Toplink is using JMS 1.0.2b while OC4J is using JMS 1.1. Who can:
    1) Verify or debunk my assumption?
    2) Point me to a work-around?
    Perhaps my config is incorrect? Here's a sessions.xml snippet, in case it helps:
    <cache-synchronization-manager>
    <clustering-service xsi:type="jms-clustering">
    <naming-service-url>ormi://localhost:23791/ems</naming-service-url>
    <jndi-user-name>oc4jadmin</jndi-user-name>
    <jndi-password>oc4j</jndi-password>
    <naming-service-initial-context-factory-name>com.evermind.server.rmi.RMIInitialContextFactory</naming-service-initial-context-factory-name>
    <jms-topic-connection-factory-name>jms/Topic/ToplinkCacheSyncConnectionFactory</jms-topic-connection-factory-name>
    <jms-topic-name>jms/Topic/ToplinkCacheSync</jms-topic-name>
    </clustering-service>
    <remove-connection-on-error>false</remove-connection-on-error>
    </cache-synchronization-manager>
    Many thanks in advance,
    --Todd                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Thank you very much for your contribution! Yes, indeed, that was my main issue. A sessions.xml section that looks like the following (instead of the <cache-synchronization-manager> section above) does fix the problem:
    <remote-command>
    <commands>
    <cache-sync>true</cache-sync>
    </commands>
    <transport xsi:type="jms-topic-transport">
    <topic-host-url>ormi://localhost:23791/ems</topic-host-url>
    <topic-connection-factory-name>jms/Topic/ToplinkCacheSyncConnectionFactory</topic-connection-factory-name>
    <topic-name>jms/Topic/ToplinkCacheSync</topic-name>
    <jndi-naming-service>
    <user-name>oc4jadmin</user-name>
    <password>oc4j</password>
    <initial-context-factory-name>com.evermind.server.rmi.RMIInitialContextFactory</initial-context-factory-name>
    </jndi-naming-service>
    </transport>
    </remote-command>
    Thanks again,
    --Todd                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Distributed Cache Synchronization

    I'm trying to implement distributed cache synchronization via RMI but I find the documentation to be very limited on how to do this. I'm doing exactly what the documentation says and I end up with a CommunicationException when trying to connect to the pre-existing session. The toplink docs are not very descriptive about the cause or meaning of CommunicationException.
    Also, this is in toplink 3.6 which I know is old, but comparing it with the new oracle versions the requirements for DCS are almost identical.
    Here is the code I'm trying to use:
              RMIRemoteSessionController controller = (RMIRemoteSessionController)Naming.lookup(registryName);
              RemoteConnection connection = new RMIConnection(controller);
              CacheSynchronizationManager syncMgr = new CacheSynchronizationManager();
              serverSession.setCacheSynchronizationManager(syncMgr);
              serverSession.getCacheSynchronizationManager().addRemoteConnection(connection);
    Here is the stack trace I'm seeing:
    18:53:01,146 DEBUG OEDataEntry - OEDataEntry - - EXCEPTION [TOPLINK-0] (3.6.2 JDK1.2): TOPLink.Public.Remote.CommunicationException
    18:53:01,146 DEBUG OEDataEntry - OEDataEntry - - EXCEPTION DESCRIPTION: Error Sending connection service to
    18:53:01,156 DEBUG OEDataEntry - OEDataEntry - - INTERNAL EXCEPTION: java.lang.ClassCastException
    18:53:01,166 DEBUG OEDataEntry - OEDataEntry - -      at TOPLink.Public.Remote.CacheSynchronizationManager.addRemoteConnectionForSynchronization(CacheSynchronizationManager.java:84)
    18:53:01,166 DEBUG OEDataEntry - OEDataEntry - -      at TOPLink.Public.Remote.CacheSynchronizationManager.addRemoteConnection(CacheSynchronizationManager.java:68)

    Also, if someone could provide me with a complete example of how to implement distributed cache synchronization via RMI that would be helpful too, the docs are very sparse on this.
    Basically what I'm trying to do is this: I have a web application that uses toplink to connect to a database. I have a separate application that also uses toplink to connecto the database that runs outside the application. The external app can update tables that the web application uses, I would like the web application to have it's cache updated when the external app changes something in those tables. It is my understanding that this is what distributed cache synchronization is for. How do I use it?

  • Cache Synchronization initialization failure

    Hello,
    I am trying to implement RMI cache synchronization from sessions.xml. Below is a portion of the XML.
    <cache-synchronization-manager>
    <clustering-service>oracle.toplink.remote.rmi.RMIClusteringService</clustering-service>
    <is-asynchronous>true</is-asynchronous>
    <should-remove-connection-on-error>false</should-remove-connection-on-error>
    <naming-service-url>localhost:1099</naming-service-url>
    </cache-synchronization-manager>
    I receive the following exception. I've verified that the RMIRemoteSessionControllerDispatcher class is in the class path....
    EXCEPTION [TOPLINK-8054] (TopLink - 9.0.3.4 (Build 432)): oracle.toplink.exceptions.SynchronizationException
    EXCEPTION DESCRIPTION: Could not bind controller under registry name: 6e3c-fae428088a--800010-10-4-101-18962
    INTERNAL EXCEPTION: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
         java.rmi.RemoteException: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
         java.lang.ClassNotFoundException: oracle.toplink.remote.rmi.RMIRemoteSessionControllerDispatcher_Stub
    java.lang.ClassNotFoundException: oracle.toplink.remote.rmi.RMIRemoteSessionControllerDispatcher_Stub
         java.lang.Throwable(java.lang.String)
         java.lang.Exception(java.lang.String)
         java.lang.ClassNotFoundException(java.lang.String)
         int java.io.ObjectInputStream.inputObject(boolean)
         java.lang.Object java.io.ObjectInputStream.readObject(boolean)
         java.lang.Object java.io.ObjectInputStream.readObject()
         java.lang.Object sun.rmi.server.UnicastRef.unmarshalValue(java.lang.Class, java.io.ObjectInput)
         void sun.rmi.server.UnicastServerRef.dispatch(java.rmi.Remote, java.rmi.server.RemoteCall)
         java.lang.Object sun.rmi.transport.Transport$1.run()
         java.lang.Object java.security.AccessController.doPrivileged(java.security.PrivilegedExceptionAction, java.security.AccessControlContext)
         boolean sun.rmi.transport.Transport.serviceCall(java.rmi.server.RemoteCall)
         void sun.rmi.transport.tcp.TCPTransport.handleMessages(sun.rmi.transport.Connection, boolean)
         void sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run()
         void java.lang.Thread.run()
    The TL documentation is pretty vague on this topic, if anyone has a suggestion, it would be most appreciated.

    If you are configuring cache synchronization within a sessions.xml file then there is no need to re-login the session. TopLink will initialize cache synchronization when the getSession() API is called for the first time.
    If you are seeing messages, such as 'Sending changeSet to network' that denote the sending of changesets, you can assume that cache synchronization is working.
    In order to verify that cache synchronization is working I would recommend issuing a find by primary key query on all servers. On one server register the object within a UnitOfWork, change the object and commit the UnitOfWork. Then on the other servers re-execute the find by primary key query and inspect the objects to ensure that the changes from the one server was propagated to the other servers. A find by primary key query will load the Object from the cache and should not hit the database. With you configuration of asynchronous transfer you will need to allow time between the update and the reads to ensure that the changes have been sent to all of the servers.
    --Gordon

  • Cache Synchronization with JMS and a Message Driven Bean (MDB)

    If I understand correctly, Toplink ueses the following configuration info to find the target to publish its session messages to a JMS server (having its URL as below) which provides the JNDI service that Toplink needs to look up the topic:
    <cache-synchronization-manager>
    <clustering-service> oracle.toplink.remote.jms.mdb.JMSPublishingOnlyClusteringService
    </clustering-service>
    <should-remove-connection-on-error>false</should-remove-connection-on-error>
    <!-- both of the following tags are user specified and must correspond to -->
    <!-- the settings that the user has made, manually, to the JMS Service -->
    <jms-topic-connection-factory-name> jms/TopLinkTopicConectionFactory
    </jms-topic-connection-factory-name>
    <jms-topic-name>jms/TopLinkCacheSynchTopic</jms-topic-name>
    <!-- both of the following tags will be required if OracleAS TopLink -->
    <!-- is not running in the same JVM as the JNDI service that is hosting the JMS Topic -->
    <naming-service-url>ormi://localhost:23791</naming-service-url>
    <naming-service-initial-context-factory> com.evermind.server.rmi.RMIInitialContextFactory </naming-service-initial-context-factory></cache-synchronization-manager>
    The MDB also uses the same JNDI service provided by the JMS server to listen to the topic which is named in the ejb-jar.xml file:
    <enterprise-beans>
    <message-driven>
    <display-name>TopLink clustering MDB</display-name>
    <ejb-name>TopLinkClusteringMDB</ejb-name>
    <ejb-class>com.mycompany.mdb.ClusteringMDB</ejb-class>
    <transaction-type>Container</transaction-type>
    <message-driven-destination> <destination-type>javax.jms.Topic</destination-type>
    </message-driven-destination>
    <env-entry>
    <description>TopLink session name</description>
    <env-entry-name>tl_session_name_for_mdb</env-entry-name>
    <env-entry-type>java.lang.String</env-entry-type>
    <env-entry-value>Employee_Session</env-entry-value>
    </env-entry>
    <resource-ref> <description>description</description>
    <res-ref-name>jms/TopLinkTopicConectionFactory</res-ref-name>
    <res-type>javax.jms.TopicConnectionFactory</res-type>
    <res-auth>Application</res-auth>
    <res-sharing-scope>Shareable</res-sharing-scope>
    </resource-ref>
    <resource-env-ref>
    <resource-env-ref-name> jms/TopLinkCacheSynchTopic</resource-env-ref-name>
    <resource-env-ref-type>javax.jms.Topic</resource-env-ref-type> </resource-env-ref>
    </message-driven></enterprise-beans>
    To do this, the EJB container that hosts the above MDB needs to be configured to know where the JMS server is by using the above URL same as in the Toplink sessions.xml file.
    I am not clear that who provides the JNDI service for the Toplink session name lookup used by the MDB:
    // Obtain the Session name configured in the environment variable
    String sessionName = (String) myEnv.lookup(TOPLINK_SESSION_NAME);
    session = SessionManager.getManager().getSession(sessionName);
    so that the MDB can find the currently running Toplink session and communicate with it.
    Can anybody help answer my above question and correct my understandings?
    Many thanks!

    Although TopLink is running in the application server’s VM, the only notable integration points with the server are for JTA and user-defined data sources. All of the work performed to get a session via SessionManager occurs solely within TopLink. When the call is made to retrieve a session, you aren’t getting the ‘active’ session identified by “Employee_Session” that is registered with the application server, rather a new session is created using the definition that exists for “Employee_Session” in sessions.xml.
    When the call ‘session = SessionManager.getManager().getSession(“Employee_Session”)’ is made, the SessionManager simply looks for sessions.xml at the root level of its deployed jars or classpath, then looks for the “Employee_Session” tag within sessions.xml. If a session exists in the file with that name then a TopLink session object is created and returned.
    Note that setting an environment entry as mentioned above simply allows for the session name to be declared dynamically. The call to ‘myEnv.lookup(“tl_session_name_for_mdb”)’ simply asks the bean’s environment for the <env-entry-value> that matches the <env-entry-name>. That string is then used in SessionManager (no different than a hard coded value would be) to identify the session in sessions.xml that is to be loaded.
    I hope this makes sense.

  • EXCEPTION [TOPLINK-7056] The wrong object was registered into the UnitOfWor

    Hello,
    I am using Toplink 9.0.3.4. I have a one to many relationship defined. One DTOStep can have several DTOStepTexte. The XML descriptions for the relationship are:
    DTOStep:
                        <database-mapping>
                             <attribute-name>texteList</attribute-name>
                             <read-only>false</read-only>
                             <reference-class>com.bnpparibas.bfi.ttk.dto.DTOStepTexte</reference-class>
                             <is-private-owned>true</is-private-owned>
                             <uses-batch-reading>true</uses-batch-reading>
                             <indirection-policy>
                                  <mapping-indirection-policy>
                                       <type>oracle.toplink.internal.indirection.NoIndirectionPolicy</type>
                                  </mapping-indirection-policy>
                             </indirection-policy>
                             <container-policy>
                                  <mapping-container-policy>
                                       <container-class>java.util.ArrayList</container-class>
                                       <type>oracle.toplink.internal.queryframework.ListContainerPolicy</type>
                                  </mapping-container-policy>
                             </container-policy>
                             <ascending-order-by-query-key>noSeq</ascending-order-by-query-key>
                             <source-key-fields>
                                  <field>BATCH_SP2.ID_BATCH</field>
                             </source-key-fields>
                             <target-foreign-key-fields>
                                  <field>BATCH_SP2_TEXTE.ID_BATCH</field>
                             </target-foreign-key-fields>
                             <type>oracle.toplink.mappings.OneToManyMapping</type>
                        </database-mapping>
    DTOStepTexte:
                        <database-mapping>
                             <attribute-name>step</attribute-name>
                             <read-only>false</read-only>
                             <reference-class>com.bnpparibas.bfi.ttk.dto.DTOStep</reference-class>
                             <is-private-owned>true</is-private-owned>
                             <uses-batch-reading>true</uses-batch-reading>
                             <indirection-policy>
                                  <mapping-indirection-policy>
                                       <type>oracle.toplink.internal.indirection.NoIndirectionPolicy</type>
                                  </mapping-indirection-policy>
                             </indirection-policy>
                             <uses-joining>true</uses-joining>
                             <foreign-key-fields>
                                  <field>BATCH_SP2_TEXTE.ID_BATCH</field>
                             </foreign-key-fields>
                             <source-to-target-key-field-associations>
                                  <association>
                                       <association-key>BATCH_SP2_TEXTE.ID_BATCH</association-key>
                                       <association-value>BATCH_SP2.ID_BATCH</association-value>
                                  </association>
                             </source-to-target-key-field-associations>
                             <type>oracle.toplink.mappings.OneToOneMapping</type>
                        </database-mapping>
    I do the following:
    - A DTOStep containing 4 DTOStepTexte is read from the Oracle database in a session bean and sent to a swing client.
    - The DTOStep is modified on the client.
    - The modified DTOStep is sent back to the session bean where the following code is executed:
    public DTOStep modifyStep(DTOStep step) throws TTKDataNotFoundException
    Session session = null;
    try
         // Récupération de la session.
         session = getSession();
         // Récupération de l'unité de travail.
         UnitOfWork uow = session.getActiveUnitOfWork();
         uow.performFullValidation();
         // Vérification que le step existe. Lecture sur clé primaire.
         if (!session.doesObjectExist(step))
         throw new TTKDataNotFoundException();
         // Registration du step à modifier en incorporant les modifs utilisateur.
         m_logger.debug("step = " + FmkCommonUtilities.toStringFromGetters(step));
         DTOStep stepClone = (DTOStep) uow.mergeCloneWithReferences(step);
         m_logger.debug("stepClone = " + FmkCommonUtilities.toStringFromGetters(stepClone));
         // Mise à jour des champs techniques.
         Date date = new Date(System.currentTimeMillis());
         stepClone.setCUtiMaj(getCUti());
         stepClone.setDMaj(date);
         // Renvoi du step tel que dans la base.
         // Une copie en est faite puisque le clone ne doit pas être
         // utilisé en dehors de la transaction.
         DTOUtilities.setFromGetters(stepClone, step);
         return step;
    catch (TTKDataNotFoundException e)
    context.setRollbackOnly();
    throw e;
    catch (EJBException e)
    context.setRollbackOnly();
    throw e;
    catch (Throwable t)
    context.setRollbackOnly();
    m_logger.error("Error in " + FmkCommonUtilities.getCurrentMethodName(), t);
    throw new EJBException(t.toString());
    finally
    // On libère la session.
    if (session != null)
    session.release();
    I have the folowing behaviour:
    - if the list of DTOStepTexte is not modified, everything is ok.
    - if a new DTOStepTexte is added, everything is ok.
    - if a DTOStepTexte is removed, I have the following exception on the mergeCloneWithReferences() call:
    EXCEPTION [TOPLINK-7056] (TopLink - 9.0.3.4 (Build 432)): oracle.toplink.exceptions.ValidationException
    EXCEPTION DESCRIPTION: The wrong object was registered into the UnitOfWork. The object [com.bnpparibas.bfi.ttk.dto.DTOStep@1a772d] should be the object from the parent cache [com.bnpparibas.bfi.ttk.dto.DTOStep@2cfd62].
         at oracle.toplink.exceptions.ValidationException.wrongObjectRegistered(Unknown Source)
         at oracle.toplink.publicinterface.UnitOfWork.checkExistence(Unknown Source)
         at oracle.toplink.publicinterface.UnitOfWork.internalRegisterObject(Unknown Source)
         at oracle.toplink.internal.sessions.MergeManager.getTargetVersionOfSourceObject(Unknown Source)
         at oracle.toplink.mappings.ObjectReferenceMapping.mergeIntoObject(Unknown Source)
         at oracle.toplink.internal.descriptors.ObjectBuilder.mergeIntoObject(Unknown Source)
         at oracle.toplink.internal.sessions.MergeManager.mergeChangesOfCloneIntoWorkingCopy(Unknown Source)
         at oracle.toplink.internal.sessions.MergeManager.mergeChanges(Unknown Source)
         at oracle.toplink.mappings.CollectionMapping.mergeIntoObject(Unknown Source)
         at oracle.toplink.internal.descriptors.ObjectBuilder.mergeIntoObject(Unknown Source)
         at oracle.toplink.internal.sessions.MergeManager.mergeChangesOfCloneIntoWorkingCopy(Unknown Source)
         at oracle.toplink.internal.sessions.MergeManager.mergeChanges(Unknown Source)
         at oracle.toplink.publicinterface.UnitOfWork.mergeCloneWithReferences(Unknown Source)
         at com.bnpparibas.bfi.ttk.server.ejb.TestToplinkServiceBean.modifyStep(TestToplinkServiceBean.java:795)
         at TestToplinkService_StatelessSessionBeanWrapper2.modifyStep(TestToplinkService_StatelessSessionBeanWrapper2.java:2032)
         at java.lang.reflect.Method.invoke(Native Method)
         at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:119)
         at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:48)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:479)
    Can someone please tell me what is wrong in the way I use toplink ?
    Thank you in advance for your answer.
    Best regards.
    Pierre Laroche

    What does the method DTOUtilities.setFromGetters(stepClone, step); do? If you are copying from step into stepClone you must ensure that all of the references from step are registered first. You should not need to perform this copy anyway as the mergeCloneWithReferences would have copied the data from step.
    --Gordon                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • TopLink 11g Cache Coordination failure in WebSphere 6.1

    Hello,
    I've recently upgraded to TopLink 11g and I am trying to make cache coordination feature work in WebSphere 6.1 using JMS. Once configured I am getting the following errors on the server side:
    [4/14/09 17:22:25:321 PDT] 00000032 SibMessage E [:] CWSIP0003E: An internal messaging error occurred Default.Topic.Space in com.ibm.ws.sib.processor.impl.LocalConsumerPoint, 1:1511:1.28, com.ibm.ws.sib.msgstore.ProtocolException: CWSIS1001E: The requested action could not be carried out as it does not comply with the resource manager's internal transaction protocol. at com.ibm.ws.sib.msgstore.transactions.MSDelegatingXAResource.addWork(MSDelegatingXAResource.java:140) at com.ibm.ws.sib.msgstore.cache.links.AbstractItemLink.cmdRemove(AbstractItemLink.java:1330) at com.ibm.ws.sib.msgstore.AbstractItem.remove(AbstractItem.java:828) at com.ibm.ws.sib.processor.impl.JSLocalConsumerPoint.receive(JSLocalConsumerPoint.java:1487) at com.ibm.ws.sib.processor.impl.ConsumerSessionImpl.receiveWithWait(ConsumerSessionImpl.java:421) at com.ibm.ws.sib.api.jms.impl.JmsMsgConsumerImpl.receiveInboundMessage(JmsMsgConsumerImpl.java:1525) at com.ibm.ws.sib.api.jms.impl.JmsMsgConsumerImpl.receive(JmsMsgConsumerImpl.java:707) at oracle.toplink.internal.remotecommand.jms.JMSTopicRemoteConnection.run(JMSTopicRemoteConnection.java:229) at java.lang.Thread.run(Thread.java:810)
    [4/14/09 17:22:25:353 PDT] 00000032 SystemOut O [TopLink Warning]: 2009.04.14 17:22:25.353--ServerSession(1261194028)--Thread(Thread[Thread-65,5,WebSphere_EJB_Timer_Service_WorkManager: WM Service Group])--Local Exception Stack:
    Exception [TOPLINK-22109] (Oracle TopLink - 11g (11.1.1.0.1) (Build 081030)): oracle.toplink.exceptions.RemoteCommandManagerException
    Exception Description: Failed to receive JMS message from JMS provider
    Internal Exception: javax.jms.JMSException: CWSIA0103E: An exception occurred while receiving a message: com.ibm.websphere.sib.exception.SIResourceException: CWSIP0003E: An internal messaging error occurred Default.Topic.Space in com.ibm.ws.sib.processor.impl.LocalConsumerPoint, 1:1526:1.28, com.ibm.ws.sib.msgstore.ProtocolException: CWSIS1001E: The requested action could not be carried out as it does not comply with the resource manager's internal transaction protocol..
         at oracle.toplink.exceptions.RemoteCommandManagerException.errorReceivingJMSMessage(RemoteCommandManagerException.java:139)
         at oracle.toplink.internal.remotecommand.jms.JMSTopicRemoteConnection.run(JMSTopicRemoteConnection.java:257)
         at java.lang.Thread.run(Thread.java:810)
    Caused by: javax.jms.JMSException: CWSIA0103E: An exception occurred while receiving a message: com.ibm.websphere.sib.exception.SIResourceException: CWSIP0003E: An internal messaging error occurred Default.Topic.Space in com.ibm.ws.sib.processor.impl.LocalConsumerPoint, 1:1526:1.28, com.ibm.ws.sib.msgstore.ProtocolException: CWSIS1001E: The requested action could not be carried out as it does not comply with the resource manager's internal transaction protocol..
         at com.ibm.ws.sib.api.jms.impl.JmsMsgConsumerImpl.receiveInboundMessage(JmsMsgConsumerImpl.java:1637)
         at com.ibm.ws.sib.api.jms.impl.JmsMsgConsumerImpl.receive(JmsMsgConsumerImpl.java:707)
         at oracle.toplink.internal.remotecommand.jms.JMSTopicRemoteConnection.run(JMSTopicRemoteConnection.java:229)
         ... 1 more
    Caused by: com.ibm.websphere.sib.exception.SIResourceException: CWSIP0003E: An internal messaging error occurred Default.Topic.Space in com.ibm.ws.sib.processor.impl.LocalConsumerPoint, 1:1526:1.28, com.ibm.ws.sib.msgstore.ProtocolException: CWSIS1001E: The requested action could not be carried out as it does not comply with the resource manager's internal transaction protocol.
         at com.ibm.ws.sib.processor.impl.JSLocalConsumerPoint.receive(JSLocalConsumerPoint.java:1521)
         at com.ibm.ws.sib.processor.impl.ConsumerSessionImpl.receiveWithWait(ConsumerSessionImpl.java:421)
         at com.ibm.ws.sib.api.jms.impl.JmsMsgConsumerImpl.receiveInboundMessage(JmsMsgConsumerImpl.java:1525)
         ... 3 more
    Caused by: com.ibm.ws.sib.msgstore.ProtocolException: CWSIS1001E: The requested action could not be carried out as it does not comply with the resource manager's internal transaction protocol.
         at com.ibm.ws.sib.msgstore.transactions.MSDelegatingXAResource.addWork(MSDelegatingXAResource.java:140)
         at com.ibm.ws.sib.msgstore.cache.links.AbstractItemLink.cmdRemove(AbstractItemLink.java:1330)
         at com.ibm.ws.sib.msgstore.AbstractItem.remove(AbstractItem.java:828)
         at com.ibm.ws.sib.processor.impl.JSLocalConsumerPoint.receive(JSLocalConsumerPoint.java:1487)
         ... 5 more
    Any idea what I am doing wrong here?
    Lukas

    Fixing listener is not enough. Old and lastest code has this for references to ServerPlatform.launchContainerRunnable, which WebSpherePlatform do not override:
    CommandPropagator:
    public void asynchronousPropagateCommand() {
    // The async logic is in the run() method
    rcm.logDebug("async_propagation", (Object[])null);
    this.rcm.getServerPlatform().launchContainerRunnable(this);
    public void propagateCommand(RemoteConnection conn) {
    Object[] arguments = { command.getClass().getName(), conn.getServiceId() };
    rcm.logDebug("propagate_command_to", arguments);
    try {
    // The result will be null on success, and an exception string on failure
    Object result = conn.executeCommand(command);
    if (result != null) {
    // An error occurred executing the remote command
    handleExceptionFromRemoteExecution(conn, (String)result);
    } catch (CommunicationException comEx) {
    // We got a comms exception.
    this.handleCommunicationException(conn, comEx);
    JMSTopicRemoteConnection:
    DiscoveryManager:
    public void startDiscovery() {
    if (rcm.isCommandProcessorASession()) {
    rcm.getCommandProcessor().processCommand(new ProfileDiscoveryStartedCommand());
    // Only start if we are currently stopped
    if (this.isDiscoveryStopped()) {
    this.rcm.getServerPlatform().launchContainerRunnable(this);
    JMSTopicTransportManager:
    public Hashtable getConnectionsToExternalServicesForCommandPropagation() {
    if(this.getConnectionsToExternalServices().isEmpty() && !this.rcm.isStopped()) {
    this.createExternalConnection();
    if(this.localConnection == null) {
    // It's a good time to create localConnection,
    // in a new thread - to return externalConnections promptly.
    this.rcm.getServerPlatform().launchContainerRunnable(new Runnable() {
    public void run() {
    try {
    createLocalConnection();
    } catch (RemoteCommandManagerException ex) {
    // Ignore exception - user had a chance to handle it in createLocalConnection method:
    // for instance to change host url and create a new local connection.
    return super.getConnectionsToExternalServicesForCommandPropagation();
    }

Maybe you are looking for

  • When the evening begins...your experience of this ...

    Dear fellow BT users I have been a BT customer for all of my adult life...25 years...and only today did I find out that the evening since April 2010 begins at 7pm as opposed to 6pm which it had always been. I thought this ignorance was due to some ov

  • Trouble downloading iTunes 10.5, "the feature you are trying to use is on a network resource that is unavailable."

    I am trying to download the latest version of iTunes, iTunes 10.5. When I go to install an error pops up reading "the feature you are trying to use is on a network resource that is unavailable." It says that it can't find iTunes64.msi. Does anyone ha

  • Object oriented

    I have completed a program that assigns letter grades to students and displays average. Now i have to take this application and implement it into two separate java files one for implementation and the other for its definition (object oriented) I have

  • Vertical lines and image gradients appearing on G5? PLEASE HELP!

    Hello! I have been experiencing some issues with my G5 recently, in which I haven't been able to find very much information at all on. So, I figured I'd try to get everything sorted out here, and see if any one knows how I can fix my problem? Vertica

  • Popup creation - syntax error

    Hi, I am developing a webdynpro application.am creating pop-up window for that when am trying to declare a attribute called WD_COMP_Controller  type ig_componentcontroller  for a view, It s throwing an error like "Field Wd_comp_controller is unknown"