**exception in thread "main" org.springframework.jms.UncategorizedJmsException:Uncategorized Exception occured during JMS processing; Nested exception is javax.jms.JMSException:Failed to build body from content. Serializable class not available to broker. Reason:java.lang.ClassNotFoundException:Forbidden class springactivemq.activemqtest.person! This class was not a trusted to being serialized as ObjectMessage payload.
* Reason: Activemq's objectmessage relies on the serialization and deserialization of Java, but this process is considered unsafe. Specific Information view URL:
Please take a look at http://activemq.apache.org/objectmessage.html for more information in how to configure trusted class Es.
Workaround:
<bean id= "ConnectionFactory" class= "Org.apache.activemq.ActiveMQConnectionFactory" >
<property name= "Brokerurl" >
<value>tcp://198.201.51.131:61616</value>
</property>
<!--add a trust pack to Trustallpackages
<property name= "Trustallpackages" value= "true"/> * *
<property name= "UserName" >
<value>admin</value>
</property>
<property name= "Password" >
<value>admin</value>
</property>
</bean>
Troubleshooting Spring Integrated ACTIVEMQ using ObjectMessage error