javax.jms.JMSException: Failed to build body from content. Serializable class not available to broker. Reason: java.lang.ClassNotFoundException: Forbidden class foo.bar.classNmae! 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.. Message: ActiveMQObjectMessage {commandId = 3961, responseRequired = true, messageId = ID:DFRAPPQ20VW-58360-1475857780933-6671:1:566:1:1, originalDestination = null, originalTransactionId = null, producerId = ID:DFRAPPQ20VW-58360-1475857780933-6671:1:566:1, destination = queue://saveCorrespondenceQueue, transactionId = null, expiration = 0, timestamp = 1475869221862, arrival = 0, brokerInTime = 1475869221878, brokerOutTime = 1475869222018, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = org.apache.activemq.util.ByteSequence@e5dbb3b5, marshalledProperties = org.apache.activemq.util.ByteSequence@f9a0747e, dataStructure = null, redeliveryCounter = 3, size = 0, properties = {breadcrumbId=ID-DFRAPPQ20VW-58343-1475857776245-0-7}, readOnlyProperties = true, readOnlyBody = true, droppable = false, jmsXGroupFirstForConsumer = false}] org.apache.camel.RuntimeCamelException: Failed to extract body due to: javax.jms.JMSException: Failed to build body from content. Serializable class not available to broker. Reason: java.lang.ClassNotFoundException: Forbidden class foo.bar.classNmae! 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.. Message: ActiveMQObjectMessage {commandId = 3961, responseRequired = true, messageId = ID:DFRAPPQ20VW-58360-1475857780933-6671:1:566:1:1, originalDestination = null, originalTransactionId = null, producerId = ID:DFRAPPQ20VW-58360-1475857780933-6671:1:566:1, destination = queue://saveCorrespondenceQueue, transactionId = null, expiration = 0, timestamp = 1475869221862, arrival = 0, brokerInTime = 1475869221878, brokerOutTime = 1475869222018, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = org.apache.activemq.util.ByteSequence@e5dbb3b5, marshalledProperties = org.apache.activemq.util.ByteSequence@f9a0747e, dataStructure = null, redeliveryCounter = 3, size = 0, properties = {breadcrumbId=ID-DFRAPPQ20VW-58343-1475857776245-0-7}, readOnlyProperties = true, readOnlyBody = true, droppable = false, jmsXGroupFirstForConsumer = false}


Solutions on the web

Solution icon of stackoverflow
broker. Reason: java.lang.ClassNotFoundException: Forbidden class foo.bar.classNmae! 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

Solution icon of web
Failed to build body from content. Serializable class not available to broker. Reason: java.lang.ClassNotFoundException. Message: ActiveMQObjectMessage {commandId = 19, responseRequired = true, messageId = ID:rsi-eng-newsham-56811-1289358131963-0

Stack trace

javax.jms.JMSException: Failed to build body from content. Serializable class not available to broker. Reason: java.lang.ClassNotFoundException: Forbidden class foo.bar.classNmae! 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.. Message: ActiveMQObjectMessage {commandId = 3961, responseRequired = true, messageId = ID:DFRAPPQ20VW-58360-1475857780933-6671:1:566:1:1, originalDestination = null, originalTransactionId = null, producerId = ID:DFRAPPQ20VW-58360-1475857780933-6671:1:566:1, destination = queue://saveCorrespondenceQueue, transactionId = null, expiration = 0, timestamp = 1475869221862, arrival = 0, brokerInTime = 1475869221878, brokerOutTime = 1475869222018, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = org.apache.activemq.util.ByteSequence@e5dbb3b5, marshalledProperties = org.apache.activemq.util.ByteSequence@f9a0747e, dataStructure = null, redeliveryCounter = 3, size = 0, properties = {breadcrumbId=ID-DFRAPPQ20VW-58343-1475857776245-0-7}, readOnlyProperties = true, readOnlyBody = true, droppable = false, jmsXGroupFirstForConsumer = false}] org.apache.camel.RuntimeCamelException: Failed to extract body due to: javax.jms.JMSException: Failed to build body from content. Serializable class not available to broker. Reason: java.lang.ClassNotFoundException: Forbidden class foo.bar.classNmae! 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.. Message: ActiveMQObjectMessage {commandId = 3961, responseRequired = true, messageId = ID:DFRAPPQ20VW-58360-1475857780933-6671:1:566:1:1, originalDestination = null, originalTransactionId = null, producerId = ID:DFRAPPQ20VW-58360-1475857780933-6671:1:566:1, destination = queue://saveCorrespondenceQueue, transactionId = null, expiration = 0, timestamp = 1475869221862, arrival = 0, brokerInTime = 1475869221878, brokerOutTime = 1475869222018, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = org.apache.activemq.util.ByteSequence@e5dbb3b5, marshalledProperties = org.apache.activemq.util.ByteSequence@f9a0747e, dataStructure = null, redeliveryCounter = 3, size = 0, properties = {breadcrumbId=ID-DFRAPPQ20VW-58343-1475857776245-0-7}, readOnlyProperties = true, readOnlyBody = true, droppable = false, jmsXGroupFirstForConsumer = false}
	at org.apache.camel.component.jms.JmsBinding.extractBodyFromJms(JmsBinding.java:160)
	at org.apache.camel.component.jms.JmsMessage.createBody(JmsMessage.java:236)
	at org.apache.camel.impl.MessageSupport.getBody(MessageSupport.java:41)
	at org.apache.camel.impl.DefaultUnitOfWork.<init>(DefaultUnitOfWork.java:90)
	at org.apache.camel.impl.DefaultUnitOfWork.<init>(DefaultUnitOfWork.java:72)
	at org.apache.camel.impl.DefaultUnitOfWorkFactory.createUnitOfWork(DefaultUnitOfWorkFactory.java:34)
	at org.apache.camel.processor.CamelInternalProcessor$UnitOfWorkProcessorAdvice.createUnitOfWork(CamelInternalProcessor.java:663)
	at org.apache.camel.processor.CamelInternalProcessor$UnitOfWorkProcessorAdvice.before(CamelInternalProcessor.java:631)
	at org.apache.camel.processor.CamelInternalProcessor$UnitOfWorkProcessorAdvice.before(CamelInternalProcessor.java:608)
	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:138)
	at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:109)
	at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:87)
	at org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:112)
	at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:674)
	at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:634)
	at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:605)
	at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:308)
	at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:226)
	at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1144)
	at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:1038)
	at org.springframework.scheduling.commonj.DelegatingWork.run(DelegatingWork.java:62)
	at com.ibm.ws.asynchbeans.J2EEContext$RunProxy.run(J2EEContext.java:267)
	at java.security.AccessController.doPrivileged(AccessController.java:300)
	at javax.security.auth.Subject.doAs(Subject.java:494)
	at com.ibm.websphere.security.auth.WSSubject.doAs(WSSubject.java:133)
	at com.ibm.websphere.security.auth.WSSubject.doAs(WSSubject.java:91)
	at com.ibm.ws.asynchbeans.J2EEContext$DoAsProxy.run(J2EEContext.java:338)
	at java.security.AccessController.doPrivileged(AccessController.java:330)
	at com.ibm.ws.asynchbeans.J2EEContext.run(J2EEContext.java:1174)
	at com.ibm.ws.asynchbeans.WorkWithExecutionContextImpl.go(WorkWithExecutionContextImpl.java:199)
	at com.ibm.ws.asynchbeans.CJWorkItemImpl.run(CJWorkItemImpl.java:236)
	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1881)
Caused by: javax.jms.JMSException: Failed to build body from content. Serializable class not available to broker. Reason: java.lang.ClassNotFoundException: Forbidden class foo.bar.classNmae! 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)
	at org.apache.activemq.command.ActiveMQObjectMessage.getObject(ActiveMQObjectMessage.java:208)
	at org.apache.camel.component.jms.JmsBinding.extractBodyFromJms(JmsBinding.java:135)
	... 31 more
Caused by: java.lang.ClassNotFoundException: Forbidden class foo.bar.classNmae! 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.ClassLoadingAwareObjectInputStream.checkSecurity(ClassLoadingAwareObjectInputStream.java:112)
	at org.apache.activemq.util.ClassLoadingAwareObjectInputStream.resolveClass(ClassLoadingAwareObjectInputStream.java:57)
	at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1695)
	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1600)
	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1873)
	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1432)
	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:428)
	at org.apache.activemq.command.ActiveMQObjectMessage.getObject(ActiveMQObjectMessage.java:206)
	... 32 more

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 2 months ago
Samebug visitor profile picture
Unknown user
Once, 2 months ago
Samebug visitor profile picture
Unknown user
Once, 2 months ago
Samebug visitor profile picture
Unknown user
Once, 2 months ago
Samebug visitor profile picture
Unknown user
Once, 2 months ago
16 more bugmates