• Disputes and Claims
  • Payments
  • My Account
  • My Money
  • All About PayPal
  • Merchant
  • Tax Information

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

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 -------------------------------

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

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.

Was this article helpful?

More ways we can help

Resolution Center
Fix transaction and account related issues
Community Forum
Join the discussion with PayPal customers
Tax center
Get your 1099-K and other tax info here
Business Help
Get help with using any of our PayPal products
Technical Help
Find out how PayPal works for your business
Contact Us
Contact customer service
Message Center
Send, receive, and view your PayPal messages
How are we doing?
Take our survey