springxd - 无法反序列化 [classname] Class 未找到
springxd - unable to deserialize [classname] Class not found
我在使用 springxd 将数据从 ESB JMS 队列保存到 avro 中的 HDFS 时遇到了这个问题。
我创建了自定义处理器来解析来自 JMS 队列的入站 xml 并转换为 avro 并使用 springxd 流保存在 HDFS 中。
这是我的流定义 -
stream create --name NewStream --definition "jms --destination=my.jms.queue --provider=tibco | mycustomprocessor | hdfs-dataset --basePath=/data_lake/avrodata --idleTimeout=60000" --deploy
这是我遇到的错误,我正在打印看起来不错的消息..
ERROR inbound.NewStream.1-redis:queue-inbound-channel-adapter1 redis.RedisMessageBus - Failed to deliver message; retries exhausted; message sent to queue 'ERRORS:NewStream.1' org.springframework.messaging.MessageHandlingException: error occurred in message handler [NewStream.1.bridge.handler]; nested exception is org.springframework.xd.dirt.integration.bus.serializer.SerializationException: unable to deserialize [classname]. Class not found.
这说 class 未找到,但 class 在那里并且正在使用,我正在从同一个 class -
打印对象
message object{"NameType": null, "Names": null, "EndDeviceEventDetails": null, "EndDeviceEvent": null, "EndDeviceEventType": null, "Header": {"Noun": "EndDeviceEvents", "Context": "PROD", "Verb": "created", "Value": null, "Source": "ADCS", "Timestamp": "2014-08-06T17:00:03.319-07:00", "CorrelationID": "eb1ccda2-6bcc-446d-b90e-3a72a46f861a", "Name": null, "MessageID": "fe567bfb-09d5-46fd-a9f4-7dcad8c51e74", "Property": {"PropertyName": ["TransactionDomain", "GridDirectorAction", "MessageIdentifier", "Stereotype"], "PropertyValue": ["MeterEvent", "urn:com.bchydro.meter.event", "Read Data Id=2.16.840.1.114416.1.63.4215386", "MeterEvent"]}}, "Payload": {"EndDeviceEvents": [{"mRID": "18541", "createdDateTime": null, "issuerID": "2014-08-06T23:05:54Z", "issuerTrackingID": null, "reason": null, "severity": null, "userID": "3", "Asset": {"AssetmRID": null, "AssetNames": [{"Name": "2.16.840.1.114416.1.63.4215386", "NameType": {"NameTypeDescription": null, "NameTypeName": "ESN", "NameTypeAuthority": null}}]}, "EndDeviceEventDetails": [{"EndDeviceEventDetailsName": "EventSequenceNumber", "EndDeviceEventDetailsValue": "46"}, {"EndDeviceEventDetailsName": "EventSequenceNumber", "EndDeviceEventDetailsValue": "46"}, {"EndDeviceEventDetailsName": "EventSequenceNumber", "EndDeviceEventDetailsValue": "46"}, {"EndDeviceEventDetailsName": "EventSequenceNumber", "EndDeviceEventDetailsValue": "46"}], "EndDeviceEventType": "HAN Meter Network Change", "EndDeviceEventNames": [{"Name": "HAN Reset non-routine", "NameType": {"NameTypeDescription": null, "NameTypeName": "Network Change Reason", "NameTypeAuthority": null}}], "Status": {"StatusDateTime": null, "StatusReason": null, "StatusRemark": null, "StatusValue": null}, "UsagePoint": null}], "EndDeviceEventType": [{"EndDeviceEventTypemRID": null, "EndDeviceEventTypedomain": null, "EndDeviceEventTypeeventOrAction": null, "EndDeviceEventTypesubDomain": null, "type": null, "EndDeviceEventTypeNames": null}]}}
感谢您的帮助...
谢谢,
阿杰
如果这是单节点部署,则可能是 class 加载程序问题 - 尝试将包含 class 的 jar 移动到 xd/lib
(并将其从各个模块中删除)。
我在使用 springxd 将数据从 ESB JMS 队列保存到 avro 中的 HDFS 时遇到了这个问题。 我创建了自定义处理器来解析来自 JMS 队列的入站 xml 并转换为 avro 并使用 springxd 流保存在 HDFS 中。
这是我的流定义 -
stream create --name NewStream --definition "jms --destination=my.jms.queue --provider=tibco | mycustomprocessor | hdfs-dataset --basePath=/data_lake/avrodata --idleTimeout=60000" --deploy
这是我遇到的错误,我正在打印看起来不错的消息..
ERROR inbound.NewStream.1-redis:queue-inbound-channel-adapter1 redis.RedisMessageBus - Failed to deliver message; retries exhausted; message sent to queue 'ERRORS:NewStream.1' org.springframework.messaging.MessageHandlingException: error occurred in message handler [NewStream.1.bridge.handler]; nested exception is org.springframework.xd.dirt.integration.bus.serializer.SerializationException: unable to deserialize [classname]. Class not found.
这说 class 未找到,但 class 在那里并且正在使用,我正在从同一个 class -
打印对象message object{"NameType": null, "Names": null, "EndDeviceEventDetails": null, "EndDeviceEvent": null, "EndDeviceEventType": null, "Header": {"Noun": "EndDeviceEvents", "Context": "PROD", "Verb": "created", "Value": null, "Source": "ADCS", "Timestamp": "2014-08-06T17:00:03.319-07:00", "CorrelationID": "eb1ccda2-6bcc-446d-b90e-3a72a46f861a", "Name": null, "MessageID": "fe567bfb-09d5-46fd-a9f4-7dcad8c51e74", "Property": {"PropertyName": ["TransactionDomain", "GridDirectorAction", "MessageIdentifier", "Stereotype"], "PropertyValue": ["MeterEvent", "urn:com.bchydro.meter.event", "Read Data Id=2.16.840.1.114416.1.63.4215386", "MeterEvent"]}}, "Payload": {"EndDeviceEvents": [{"mRID": "18541", "createdDateTime": null, "issuerID": "2014-08-06T23:05:54Z", "issuerTrackingID": null, "reason": null, "severity": null, "userID": "3", "Asset": {"AssetmRID": null, "AssetNames": [{"Name": "2.16.840.1.114416.1.63.4215386", "NameType": {"NameTypeDescription": null, "NameTypeName": "ESN", "NameTypeAuthority": null}}]}, "EndDeviceEventDetails": [{"EndDeviceEventDetailsName": "EventSequenceNumber", "EndDeviceEventDetailsValue": "46"}, {"EndDeviceEventDetailsName": "EventSequenceNumber", "EndDeviceEventDetailsValue": "46"}, {"EndDeviceEventDetailsName": "EventSequenceNumber", "EndDeviceEventDetailsValue": "46"}, {"EndDeviceEventDetailsName": "EventSequenceNumber", "EndDeviceEventDetailsValue": "46"}], "EndDeviceEventType": "HAN Meter Network Change", "EndDeviceEventNames": [{"Name": "HAN Reset non-routine", "NameType": {"NameTypeDescription": null, "NameTypeName": "Network Change Reason", "NameTypeAuthority": null}}], "Status": {"StatusDateTime": null, "StatusReason": null, "StatusRemark": null, "StatusValue": null}, "UsagePoint": null}], "EndDeviceEventType": [{"EndDeviceEventTypemRID": null, "EndDeviceEventTypedomain": null, "EndDeviceEventTypeeventOrAction": null, "EndDeviceEventTypesubDomain": null, "type": null, "EndDeviceEventTypeNames": null}]}}
感谢您的帮助...
谢谢, 阿杰
如果这是单节点部署,则可能是 class 加载程序问题 - 尝试将包含 class 的 jar 移动到 xd/lib
(并将其从各个模块中删除)。