Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 有没有办法识别可反序列化的未知jms对象?_Java_Spring_Jms_Ibm Mq - Fatal编程技术网

Java 有没有办法识别可反序列化的未知jms对象?

Java 有没有办法识别可反序列化的未知jms对象?,java,spring,jms,ibm-mq,Java,Spring,Jms,Ibm Mq,因此,您在日志中发现一个异常: Execution of JMS message listener failed, and no ErrorHandler has been set. com.company.eq.mo.app.exception.DefaultMessageListenerException: Failed to handle message.; nested exception is com.company.eq.mo.app.exception.DefaultMessage

因此,您在日志中发现一个异常:

Execution of JMS message listener failed, and no ErrorHandler has been set.
com.company.eq.mo.app.exception.DefaultMessageListenerException: Failed to handle message.; nested exception is com.company.eq.mo.app.exception.DefaultMessageListenerException: This message does not contain a recognised java object; nested exception is javax.jms.MessageFormatException: MQJMS1061: Unable to deserialize object the class name to find out anymore info about the message:
该消息可反序列化,您无法在运行时获取并打印该对象:

    Object object = ((ObjectMessage) message).getObject();
                object.getClass();
因为它不存在于类路径中


是否有其他方法获取类/对象名?

您可以实现自己的Java解析器,但出于最实际的目的,您确实需要在类路径中提供所有序列化类