PUBLIC - Liferay Portal Community Edition
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-39022

net.sf.ehcache.CacheException is thrown when replicateputsViaCopy=true

    Details

    • Branch Version/s:
      6.1.x, 6.0.x
    • Backported to Branch:
      Committed
    • Story Points:
      10
    • Similar Issues:
      Show 5 results 

      Description

      Steps to reproduce:

      1. Set up two bundles.
      2. In both bundles:
      Add the following properties to the portal-ext.properties:

      cluster.link.enabled=true
      ehcache.cluster.link.replication.enabled=true
      

      Add "replicatePutsViaCopy=true" under "defaultCache" section in liferay-multi-vm-clustered.xml (turn others to true also).

      <defaultCache
      eternal="false"
      maxElementsInMemory="10000"
      overflowToDisk="false"
      timeToIdleSeconds="600"
      >
      <cacheEventListenerFactory
      class="com.liferay.portal.cache.ehcache.LiferayCacheEventListenerFactory"
      properties="replicatePutsViaCopy=true,replicatePuts=true,replicateUpdatesViaCopy=true"
      propertySeparator=","
      />
      <bootstrapCacheLoaderFactory class="com.liferay.portal.cache.ehcache.LiferayBootstrapCacheLoaderFactory" />
      </defaultCache>

      3. Deploy ehcache-cluster-web plugins in both bundles.
      4. Start up bundles in sequence.
      5. On one bundle site, go to control panel -> server administration -> script.
      Choose language as Groovy, put script as:

         com.liferay.portal.kernel.cache.PortalCache pc = com.liferay.portal.kernel.cache.MultiVMPoolUtil.getCache("testCacheId");
         pc.put("one", "ONE");
         pc.put("two", "TWO");
         pc.put("three", "THREE");
      

      then hit "Execute" button.

      Error Message:

      com.liferay.portal.kernel.messaging.MessageListenerException: net.sf.ehcache.CacheException: You have configured the cache with a replication scheme that cannot properly support CAS operation guarantees.
              at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:32)
              at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:72)
              at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:69)
              at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:682)
              at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:593)
              at java.lang.Thread.run(Thread.java:724)
      

      Expected result:
      No error will be seen in the whole process.

      Actual result:
      The Error Message was thrown in console.

        Issue Links

          Activity

          Hide
          Shitian "Shelton" Zhang added a comment - - edited

          PASSED Manual Testing following the steps in the description.

          Reproduced on:
          Tomcat 7.0 + MySQL 5. Portal 6.2.x GIT ID: c9c40034c3d039f24d17ce77dbacc4ed95ac89f1.
          Plugins 6.2.x EE GIT ID: e73d326e0696ade9d9dcb4bff54f0a2fc63779f0.

          CacheException was thrown in console.

          Fixed on:
          Tomcat 7.0 + MySQL 5. Portal 6.2.x GIT ID: 101c0c55b3da4f5631fc2df41bc2b6416bb82e7e.
          Plugins 6.2.x EE GIT ID: e73d326e0696ade9d9dcb4bff54f0a2fc63779f0.

          No CacheException any more.

          Show
          Shitian "Shelton" Zhang added a comment - - edited PASSED Manual Testing following the steps in the description. Reproduced on: Tomcat 7.0 + MySQL 5. Portal 6.2.x GIT ID: c9c40034c3d039f24d17ce77dbacc4ed95ac89f1. Plugins 6.2.x EE GIT ID: e73d326e0696ade9d9dcb4bff54f0a2fc63779f0. CacheException was thrown in console. Fixed on: Tomcat 7.0 + MySQL 5. Portal 6.2.x GIT ID: 101c0c55b3da4f5631fc2df41bc2b6416bb82e7e. Plugins 6.2.x EE GIT ID: e73d326e0696ade9d9dcb4bff54f0a2fc63779f0. No CacheException any more.
          Hide
          Shitian "Shelton" Zhang added a comment - - edited

          PASSED Manual Testing following the steps in the description.

          Fixed on:
          Tomcat 6.0 + MySQL 5. Portal 6.0.x GIT ID: 58f18f4da76902323feefacab09b52f0e6070e45.
          Plugins 6.0.x GIT ID: 850c05b8d03bb8e7e35b3d1bc1bd8aba1d04cd10.
          Tomcat 7.0 + MySQL 5. Portal 6.1.x EE GIT ID: 4d0de946018bd83ab7d9ddd491fa86d09630a9e2.
          Plugins 6.1.x EE GIT ID: 60d93921e2160dfb69d86bfbe4d8659242d2105b.

          No CacheException any more.

          Show
          Shitian "Shelton" Zhang added a comment - - edited PASSED Manual Testing following the steps in the description. Fixed on: Tomcat 6.0 + MySQL 5. Portal 6.0.x GIT ID: 58f18f4da76902323feefacab09b52f0e6070e45. Plugins 6.0.x GIT ID: 850c05b8d03bb8e7e35b3d1bc1bd8aba1d04cd10. Tomcat 7.0 + MySQL 5. Portal 6.1.x EE GIT ID: 4d0de946018bd83ab7d9ddd491fa86d09630a9e2. Plugins 6.1.x EE GIT ID: 60d93921e2160dfb69d86bfbe4d8659242d2105b. No CacheException any more.

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                1 year, 29 weeks ago

                Development

                  Structure Helper Panel