Search code examples
javahdfsavrospring-xd

springxd - unable to deserialize [classname] Class not found


I am facing this issue while saving data from ESB JMS Queue to HDFS in avro using springxd. I have created custom processor to parse inbound xml from JMS Queue and convert to avro and save in HDFS using springxd stream.

Here is my stream definition -

stream create --name NewStream --definition "jms --destination=my.jms.queue --provider=tibco | mycustomprocessor | hdfs-dataset --basePath=/data_lake/avrodata --idleTimeout=60000" --deploy

Here is the error I am getting, also I am printing the message which looks ok..

ERROR inbound.NewStream.1-redis:queue-inbound-channel-adapter1 redis.RedisMessageBus$1 - 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.

This says class not found but the class is there and is being used and i am printing the object from the same 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}]}}

Appreciate your help ...

Thanks, AJ


Solution

  • If this is a singlenode deployment, it's probably a classloader issue - try moving the jar that contains the class to xd/lib (and remove it from individual modules).