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}

Stack Overflow | cnu | 5 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Active MQ Serialization error - class is not trusted to be serialized as ObjectMessage

    Stack Overflow | 5 months ago | cnu
    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}
  2. 0

    What is the best way to send a file reference through ActiveMQ, when using SpringBoot 1.3.2.RELEASE?

    Stack Overflow | 1 year ago | user1581366
    java.lang.ClassNotFoundException: Forbidden class java.io.File! 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 unregistered visitors

    Root Cause Analysis

    1. 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()
    2. ActiveMQ :: Broker
      ClassLoadingAwareObjectInputStream.resolveClass
      1. org.apache.activemq.util.ClassLoadingAwareObjectInputStream.checkSecurity(ClassLoadingAwareObjectInputStream.java:112)
      2. org.apache.activemq.util.ClassLoadingAwareObjectInputStream.resolveClass(ClassLoadingAwareObjectInputStream.java:57)
      2 frames
    3. Java RT
      ObjectInputStream.readObject
      1. java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1695)
      2. java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1600)
      3. java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1873)
      4. java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1432)
      5. java.io.ObjectInputStream.readObject(ObjectInputStream.java:428)
      5 frames
    4. ActiveMQ :: Core
      ActiveMQObjectMessage.getObject
      1. org.apache.activemq.command.ActiveMQObjectMessage.getObject(ActiveMQObjectMessage.java:206)
      1 frame
    5. Camel :: JMS
      JmsMessage.createBody
      1. org.apache.camel.component.jms.JmsBinding.extractBodyFromJms(JmsBinding.java:135)
      2. org.apache.camel.component.jms.JmsMessage.createBody(JmsMessage.java:236)
      2 frames
    6. Camel :: Core
      DelegateAsyncProcessor.process
      1. org.apache.camel.impl.MessageSupport.getBody(MessageSupport.java:41)
      2. org.apache.camel.impl.DefaultUnitOfWork.<init>(DefaultUnitOfWork.java:90)
      3. org.apache.camel.impl.DefaultUnitOfWork.<init>(DefaultUnitOfWork.java:72)
      4. org.apache.camel.impl.DefaultUnitOfWorkFactory.createUnitOfWork(DefaultUnitOfWorkFactory.java:34)
      5. org.apache.camel.processor.CamelInternalProcessor$UnitOfWorkProcessorAdvice.createUnitOfWork(CamelInternalProcessor.java:663)
      6. org.apache.camel.processor.CamelInternalProcessor$UnitOfWorkProcessorAdvice.before(CamelInternalProcessor.java:631)
      7. org.apache.camel.processor.CamelInternalProcessor$UnitOfWorkProcessorAdvice.before(CamelInternalProcessor.java:608)
      8. org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:138)
      9. org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:109)
      10. org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:87)
      10 frames
    7. Camel :: JMS
      EndpointMessageListener.onMessage
      1. org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:112)
      1 frame
    8. Spring Framework
      DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run
      1. org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:674)
      2. org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:634)
      3. org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:605)
      4. org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:308)
      5. org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:226)
      6. org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1144)
      7. org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:1038)
      7 frames
    9. Spring Context Support
      DelegatingWork.run
      1. org.springframework.scheduling.commonj.DelegatingWork.run(DelegatingWork.java:62)
      1 frame
    10. com.ibm.ws
      J2EEContext$RunProxy.run
      1. com.ibm.ws.asynchbeans.J2EEContext$RunProxy.run(J2EEContext.java:267)
      1 frame
    11. Java RT
      Subject.doAs
      1. java.security.AccessController.doPrivileged(AccessController.java:300)
      2. javax.security.auth.Subject.doAs(Subject.java:494)
      2 frames
    12. com.ibm.websphere
      WSSubject.doAs
      1. com.ibm.websphere.security.auth.WSSubject.doAs(WSSubject.java:133)
      2. com.ibm.websphere.security.auth.WSSubject.doAs(WSSubject.java:91)
      2 frames
    13. com.ibm.ws
      J2EEContext$DoAsProxy.run
      1. com.ibm.ws.asynchbeans.J2EEContext$DoAsProxy.run(J2EEContext.java:338)
      1 frame
    14. Java RT
      AccessController.doPrivileged
      1. java.security.AccessController.doPrivileged(AccessController.java:330)
      1 frame
    15. com.ibm.ws
      ThreadPool$Worker.run
      1. com.ibm.ws.asynchbeans.J2EEContext.run(J2EEContext.java:1174)
      2. com.ibm.ws.asynchbeans.WorkWithExecutionContextImpl.go(WorkWithExecutionContextImpl.java:199)
      3. com.ibm.ws.asynchbeans.CJWorkItemImpl.run(CJWorkItemImpl.java:236)
      4. com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1881)
      4 frames