• Bug
  • Status: Closed
  • Resolution: Fixed
  • drb
  • Reporter: sourceforgetracker
  • September 21, 2009
  • 0
  • Watchers: 0
  • September 23, 2009
  • September 22, 2009


Using version 0.3 of JMS Replication, the remote peer which listens for cache updates produces the following stack trace when it receives a request to update a DECORATED cache:

14-Apr-2009 16:47:28 net.sf.ehcache.distribution.jms.JMSCachePeer onMessage WARNING: Unable to handle JMS Notification: null java.lang.NullPointerException at net.sf.ehcache.distribution.jms.JMSCachePeer.put(JMSCachePeer.java:210) at net.sf.ehcache.distribution.jms.JMSCachePeer.handleNotification(JMSCachePeer.java:132) at net.sf.ehcache.distribution.jms.JMSCachePeer.handleObjectMessage(JMSCachePeer.java:305) at net.sf.ehcache.distribution.jms.JMSCachePeer.onMessage(JMSCachePeer.java:246) at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:967) at org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:122) at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:192) at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:122) at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:43) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) at java.lang.Thread.run(Thread.java:619)

The cause is that JMSCachePeer is used to obtain strictly Cache implementations and not the more general Ehcache implementations from the CacheManager; i.e. it should use cacheManager.getEhcache(cacheName) rather than cacheManager.getCache(cacheName).

I will submit a patch for this to be used against JMSCachePeer SVN Rev 855.

(If others use this to create their own version of JMS Replication then you should know that JMS Replication project won’t compile against the HEAD version of Ehcache since there are some changes due to JSR exceptions - perhaps this relates to Bug 2780720?? - anyhow my second patch file provides a patch to JMSCacheLoader and JMSCacheLoaderFactory)

I have a fix for this which Sourceforge Ticket ID: 2785071 - Opened By: alphabravo - 1 May 2009 14:24 UTC


Sourceforge Tracker 2009-09-21

Patches applied.

This is in trunk and will soon be in 0.4. I have upped the ehcache core dependency to beta5 (about to be released) which bring in the CacheLoaderFactory change.

Should be released this weekend.

Thanks, Comment by: gregluck - 8 May 2009 06:21 UTC

Fiona OShea 2009-09-22

Re-opening so that I can properly close out these issues and have correct Resolution status in Jira