IBM WebSphere Commerce - Payment related debugging - AEDPPIEditCtrlCmdImpl getOrderIdByEDPPIID
Here I am going to share my recent experience in debugging a payment related issue. This issue started occurring all of a sudden without any recent changes to the code. All the orders were failing after entering the payment information. Error log for the issue was as below.
There was no clue what is causing the issue. But we proceeded with our investigation by going through and understanding out-of-the-box code for AEDPPIEditCtrlCmdImpl.getOrderIdByEDPPIID because from the errors we can see the error is thrown from that command and method.
From the out-of-the-box command we could see the logic is trying to find orderId from EDPORDER DB table. And for that they are first trying to find the EDPPAYINST using the piId received and it was failing at this step.
The reason for the failure was out-of-the-box logic is expecting both PPCPAYINST_ID and EDPPAYINST_ID are equal, but in our case for the failed orders both of these values were different. The reason for this could be a manual insert in any of PPCPAYINST or EDPPAYINST tables which caused both these payment instruction IDs to be out of sync. And the fix for the issue was a server restart, because after a server restart new values will be fetched from KEYS table for these tables and that brought back both PPCPAYINST_ID and EDPPAYINST_ID values in sync.
Hope this helps someone. If you find this helpful please share with your friends and colleagues.
Thanks!
[9/27/17 0:31:23:137 EST] 0000002e CommerceSrvr A AEDPPIEditCtrlCmdImpl getOrderIdByEDPPIID Object of type payment instruction with primary key 79,172 could not be found in the database.
[9/27/17 0:31:23:139 EST] 0000002e ExtendedInfo I CWXFR9010I: Extended information : [URL=http://localhost/webapp/wcs/stores/servlet/webapp/wcs/stores/servlet/XPaymentProcessCmd] [parameters=signature=+Yuun7p7fwRo6hgHvdf4CBz2lNvrKUN/BtKbQZgFsue= encryptedparameters=2SDSwUkztXgotmmLbKuB+P2ZoiX1Rd65ai3932yezsdHLI2wb1deUvHoNKzaP9KvXsedZd0SgLBWjv+COHyZXTLyFEDXBcfCcYBFzkgTc2JdTl3XAjKai4KbGp0sJ8haesjbeZKIavF6AK7LjdsF05guWvsEkQ6ymn7OvK9UvLrIQDTT1/UNW4i9G/qXJ3WIYp3H8E1BCHS+HfFj/1wS/ORpartRTNxwYCloHwT4qjPVr/toH2LWtzNTICMEdgJ4We+SzSSSNBUHfoK1MAsIfMrJHDS30oinKS2cB3wEky4OWMDR671sQ+KkwRSj3CVwvjO6GOBvJz4lcA9FOADqfOKW6Abes8VvR4GfRKYXM72HECWlePqqNKIjsYvwiOlz2ASf ] [userId=-1002]
There was no clue what is causing the issue. But we proceeded with our investigation by going through and understanding out-of-the-box code for AEDPPIEditCtrlCmdImpl.getOrderIdByEDPPIID because from the errors we can see the error is thrown from that command and method.
From the out-of-the-box command we could see the logic is trying to find orderId from EDPORDER DB table. And for that they are first trying to find the EDPPAYINST using the piId received and it was failing at this step.
The reason for the failure was out-of-the-box logic is expecting both PPCPAYINST_ID and EDPPAYINST_ID are equal, but in our case for the failed orders both of these values were different. The reason for this could be a manual insert in any of PPCPAYINST or EDPPAYINST tables which caused both these payment instruction IDs to be out of sync. And the fix for the issue was a server restart, because after a server restart new values will be fetched from KEYS table for these tables and that brought back both PPCPAYINST_ID and EDPPAYINST_ID values in sync.
Hope this helps someone. If you find this helpful please share with your friends and colleagues.
Thanks!
Comments
Post a Comment