Thread: TopLink 11g Cache Coordination failure in WebSphere 6.1

This question is not answered. Helpful answers available: 5. Correct answers available: 1.


Permlink Replies: 3 - Pages: 1 - Last Post: Apr 16, 2009 12:40 PM Last Post By: SebTardif
lukas.sliwka

Posts: 1
Registered: 04/14/09
TopLink 11g Cache Coordination failure in WebSphere 6.1
Posted: Apr 14, 2009 6:33 PM
 
Click to report abuse...   Click to reply to this thread Reply
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
SebTardif

Posts: 229
Registered: 04/04/06
Re: TopLink 11g Cache Coordination failure in WebSphere 6.1
Posted: Apr 16, 2009 6:58 AM   in response to: lukas.sliwka in response to: lukas.sliwka
 
Click to report abuse...   Click to reply to this thread Reply
Last time I check TopLink cache coordination/invalidation was still not J2EE container compliant because it's creating threads -> oracle.toplink.internal.remotecommand.jms.JMSTopicRemoteConnection.run

It's very well known issue by Oracle team, we have logged many bugs years ago about it.

Spring framework has explicit integration with WebSphere when it needs to create threads, so at least some framework demonstrated how to be compliant with WebSphere.

There is not much to the invalidation/coordination code of TopLink. We have learn that in the long term it makes more sense to hook to the TopLink event via SessionEventAdapter and implement the communication ourselve. You can access UnitOfWorkChangetSet on this event postCalculateUnitOfWorkChangeSet.
Doug Clarke

Posts: 1,933
Registered: 06/25/02
Re: TopLink 11g Cache Coordination failure in WebSphere 6.1
Posted: Apr 16, 2009 10:29 AM   in response to: SebTardif in response to: SebTardif
 
Click to report abuse...   Click to reply to this thread Reply
Yes, we have encountered issues with starting our own threads. In general we avoid creating threads but we do in the case of a listener for JMS cache coordination messages. To work-around this we have documented the use of Message Driven Beans.

http://www.oracle.com/technology/products/ias/toplink/technical/tips/cache-jms-mdb/index.html

Doug
SebTardif

Posts: 229
Registered: 04/04/06
Re: TopLink 11g Cache Coordination failure in WebSphere 6.1
Posted: Apr 16, 2009 12:40 PM   in response to: Doug Clarke in response to: Doug Clarke
 
Click to report abuse...   Click to reply to this thread Reply
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();
}

Legend
Guru Guru : 2500 - 1000000 pts
Expert Expert : 1000 - 2499 pts
Pro Pro : 500 - 999 pts
Journeyman Journeyman : 200 - 499 pts
Newbie Newbie : 0 - 199 pts
Oracle ACE Director
Oracle ACE Member
Oracle Employee ACE
Helpful Answer (5 pts)
Correct Answer (10 pts)

Point your RSS reader here for a feed of the latest messages in all forums