JMS replication not working

Developers
2010-11-05
2013-05-14
  • pavan challa
    pavan challa
    2010-11-05

    I am using IBM -  RAD - 7.5 with server - 6.1  to develop an application with EHCache and JMS replication… I am using ehcache  - 2.2.0  , and jms replication - 0.4 ,  and active mq - 5.4.1  .( running on local server) …

    I have followed everything from the ehcache jms doc. but getting the below error… any ideas ?

    2010-11-05 14:33:53,896  ERROR com.excentus.en.cache.ENCacheManager - Initalization Error -
    java.lang.NullPointerException
    at javax.naming.InitialContext.getURLScheme(InitialContext.java:240)
    at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:289)
    at javax.naming.InitialContext.lookup(InitialContext.java:363)
    at net.sf.ehcache.distribution.jms.JMSUtil.lookup(JMSUtil.java:181)
    at net.sf.ehcache.distribution.jms.JMSCacheManagerPeerProviderFactory.createCachePeerProvider(JMSCacheManagerPeerProviderFactory.java:112)
    at net.sf.ehcache.config.ConfigurationHelper.createCachePeerProviders(ConfigurationHelper.java:132)
    at net.sf.ehcache.CacheManager.configure(CacheManager.java:550)
    at net.sf.ehcache.CacheManager.init(CacheManager.java:323)
    at net.sf.ehcache.CacheManager.<init>(CacheManager.java:280)
    at com.excentus.en.cache.ENCacheManager.<clinit>(ENCacheManager.java:21)
    at java.lang.J9VMInternals.initializeImpl(Native Method)

    My ehcache.xml is below

      <defaultCache
                maxElementsInMemory="10000"
                eternal="false"
                timeToIdleSeconds="120"
                timeToLiveSeconds="120"
                overflowToDisk="true"
                diskSpoolBufferSizeMB="30"
                maxElementsOnDisk="10000000"
                diskPersistent="false"
                diskExpiryThreadIntervalSeconds="120"
                memoryStoreEvictionPolicy="LRU"
               
               
                />
                
                
                <cacheManagerPeerProviderFactory
    class="net.sf.ehcache.distribution.jms.JMSCacheManagerPeerProviderFactory"
    properties="initialContextFactoryName=com.excentus.en.cache.ExampleActiveMQInitialContextFactory,
    providerURL=tcp://localhost:61616?wireFormat.maxInactivityDuration=0,
    replicationTopicConnectionFactoryBindingName=topicConnectionFactory,
        replicationTopicBindingName=ehcache1"
    propertySeparator="," />

        <cache name="DATA_CACHE"
               maxElementsInMemory="20"
               eternal="false"
               timeToIdleSeconds="0"
               timeToLiveSeconds="0"
               overflowToDisk="false"
               diskPersistent="false"
               diskExpiryThreadIntervalSeconds="0"
               memoryStoreEvictionPolicy="LFU">

    <cacheEventListenerFactory
    class="net.sf.ehcache.distribution.jms.JMSCacheReplicatorFactory"
    properties="replicateAsynchronously=true,
    replicatePuts=true,
    replicateUpdates=true,
    replicateUpdatesViaCopy=true,
    replicateRemovals=true,
    asynchronousReplicationIntervalMillis=1000"
    propertySeparator="," />
    </cache>