我试图使用ActiveMQ作为JMS提供程序发送包含myObject,myClass实例的ObjectMessage。
接收应用程序中发生错误,说:
Failed to build body from content. Serializable class not available
to broker. Reason: java.lang.ClassNotFoundException: Forbidden class
client.MyClass! 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.
我阅读了该页面并说:
If you need to exchange object messages, you need to add packages your
applications are using. You can do that with by using
org.apache.activemq.SERIALIZABLE_PACKAGES system property of the
broker. You can add this system property to ACTIVEMQ_OPTS variable in
${ACTIVEMQ_HOME}/bin/env script.
我正在使用ActiveMQ从我解压缩rar的目录启动它,并使用命令提示符启动它。在\ bin子文件夹中,没有env脚本,只有activemq脚本。
env脚本在哪里?