经纪人AMQ

时间:2020-02-28 14:26:23

标签: java apache-camel activemq

当我尝试发送对象有效载荷消息时,我遇到了异常。

Caused by: java.lang.ClassNotFoundException: Forbidden class XXXX 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:1922)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1805)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2096)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1624)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:464)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:422)
at org.apache.activemq.command.ActiveMQObjectMessage.getObject(ActiveMQObjectMessage.java:211)
... 21 common frames omitted

检查了给定的网址。

  1. 在jar中设置jar,并在wrapper.conf中提供类路径
  2. 在客户端中将trustAllpackages设置为true
  3. 在amq代理activemq.bat中设置-Dorg.apache.activemq.SERIALIZABLE_PACKAGES = *

还需要什么?

0 个答案:

没有答案