Help Article

Why did I get the error "Unable to deserialize object" when using the Java SDK to issue an API call?

Issue
PayPal returned an "unable to deserialize object" error, with a message something like this:

ERROR: Unable to deserialize object for Could not call com.paypal.soap.api.PaymentTransactionClassCodeType.readResolve() : null ---- Debugging information ---- required-type : com.paypal.soap.api.PaymentTransactionClassCodeType cause-message : Could not call com.paypal.soap.api.PaymentTransactionClass CodeType.readResolve() : null class : com.paypal.soap.api.TransactionSearchRequestType message : Could not call com.paypal.soap.api.PaymentTransactionClass CodeType.readResolve() : null line number : 1 path : /com.paypal.soap.api.TransactionSearchRequestType/transact ionClass cause-exception : com.thoughtworks.xstream.converters.reflection.ObjectAcces sException -------------------------------

Cause
Your request template contains unused optional fields, or your XML contains extra or missing characters.

Solution
If you get this kind of error when using the Java SDK Console to issue an API call, remove any optional fields in the request template that you left blank. Leave in the template only the fields for which you provided values. Also, check your XML syntax to make sure that it contains no extra slashes or missing end tags.

 
We’re sorry, the page you’re looking for is no longer available. Please try your search again in our Help Center if you have a question or want to contact us.