Cache does not get updated even when publishing already cached items. Deployer logs show the error: ERROR JMSCacheChannelConnector - JMS Exception occurred during reception of event. Attempting setting up JMS connectivity again javax.jms.JMSException: Failed to build body from content. Serializable class not available to broker. Reason: java.lang.ClassNotFoundException: Forbidden class com.tridion.cache.CacheEvent! This class is not trusted to be serialized as ObjectMessage payload. Please take a look at http://activemq.apache.org/objectmessage.html for more information on how to configure trusted classes. at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:36) ~[activemq-client-5.14.4.jar:5.14.4] at org.apache.activemq.command.ActiveMQObjectMessage.getObject(ActiveMQObjectMessage.java:208) ~[activemq-client-5.14.4.jar:5.14.4] at com.tridion.cache.JMSCacheChannelConnector.handleJmsMessage(JMSCacheChannelConnector.java:219) ~[cd_cache-8.1.1-1005.jar:8.1.1-1005] at com.tridion.cache.JMSCacheChannelConnector$2.onMessage(JMSCacheChannelConnector.java:84) [cd_cache-8.1.1-1005.jar:8.1.1-1005] at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:1401) [activemq-client-5.14.4.jar:5.14.4] at org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:131) [activemq-client-5.14.4.jar:5.14.4] at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:202) [activemq-client-5.14.4.jar:5.14.4] at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:133) [activemq-client-5.14.4.jar:5.14.4] at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:48) [activemq-client-5.14.4.jar:5.14.4] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.8.0_121] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.8.0_121] at java.lang.Thread.run(Unknown Source) [na:1.8.0_121] Caused by: java.lang.ClassNotFoundException: Forbidden class com.tridion.cache.CacheEvent! This class is not trusted to be serialized as ObjectMessage payload. Please take a look at http://activemq.apache.org/objectmessage.html for more information on how to configure trusted classes. |
1. Configure ActiveMQ to allow ObjectMessages to be deserialized. Either enable it for all ObjectMessages or just for com.tridion.cache.CacheEvent. Explanation and instructions are here: http://activemq.apache.org/objectmessage.html If you're running ActiveMQ on Windows then you can configure this in wrapper.conf, this config file can be found in the ActiveMQ root directory bin/win64 and bin/win32 folders. wrapper.java.additional.13=-Dorg.apache.activemq.SERIALIZABLE_PACKAGES="*"Note: the '13' in the above line may need changing, depending on your configuration. Look at the 'Java Additional Parameters' section in wrapper.conf. 2. Verify that the RemoteSynchronization element is uncommented and details are correct in the cd_storage_conf.xml file of the Deployer and Session Content services, as in below example. Note that the Topic ("Tridion" in below example is arbitrary and does not need to be updated to SDLWeb") <RemoteSynchronization FlushCacheDuringDisconnectInterval="20000" Queuesize="512" ServiceMonitorInterval="10000"> <Connector Class="com.tridion.cache.JMSCacheChannelConnector" Strategy="AsyncJMS11MDB" Topic="Tridion"> <JndiContext> <Property Name="java.naming.factory.initial" Value="org.apache.activemq.jndi.ActiveMQInitialContextFactory"/> <Property Name="java.naming.provider.url" Value="tcp://localhost:61616?soTimeout=5000"/> <Property Name="topic.Tridion" Value="Tridion_CCS"/> </JndiContext> </Connector> </RemoteSynchronization> One customer resolved issue by doing the following instead of modifying the wrapper.conf files. 1. Adding Property trustAllPackages as in below example to the cd_storage_conf.xml files. <Property Name="trustAllPackages" Value="true" /> </JndiContext>2. The following JVM option was added to the ACTIVEMQ_OPTS variable on the ActiveMQ server ACTIVEMQ_OPTS = “$ACTIVEMQ_OPTS –Dorg.apache.activemq.SERIALIZABLE_PACKAGES=*” |
Apache ActiveMQ is blocking the JMS ObjectMessages for security reasons. This is the default configuration. |