Monday, January 18, 2010

Troubleshooting eConnect "System Error" Message

Over the last several months, I have developed several eConnect integrations for a client. The integrations work fine on my development machine, but sometimes when the integrations are run on the client server, eConnect generates errors and simply returns the text "System Error", with no additional detail.

After much poking around, I discovered that in general, this is often caused by a required eConnect field that is not being populated when the data is sent to eConnect. But other times, I have been unable to explain why the System Error is occurring.

I thought I had searched the GP Knowledge Base previously to see if there was any reference to these frustrating "System Error" messages, but today, after yet another error, I decided to check the KB again.

Sure enough, there is KB article 943133 that discusses the System Error. Not sure why I didn't see it earlier.

It appears that I used an older copy of my .NET class that calls eConnect. I had a catch block for an eConnectException and a generic Exception, but not for a SqlException.

I know that Steve Gray has pointed this out on his excellent eConnect forums, so I knew that any call to the eConnect_EntryPoint should have all three catch blocks, but I just didn't have the SqlException catch block in my code for this client, and it didn't dawn on me that this is why I only received "System Error" with no additional detail.

I take the blame for this oversight, but I don't think the errors are all my fault. The client does not have the latest release of eConnect 9 installed, so it does seem that eConnect 9.0.1 does have some flaws. Instead of returning errors for certain field level issues in the XML data, it seems to miss these errors and attempt to send the XML off to the SQL stored procedures, which is why the SqlExceptions are being thrown.

Running the exact same .NET integration with the same source data on eConnect 9.04 on my server does not generate any errors, so my guess is that these are quasi-bugs in eConnect 9 that have been resolved in service packs.

So lesson #2 is to make sure to install eConnect service packs!

And with that, I return to the pouring rain here in Los Angeles...

1 comment:

Vaidy Mohan said...

Hi Steve,

A good post on eConnect Exceptions. I thought I would share my troubleshooting story also on similar line:

http://www.vaidy-dyngp.com/2009/01/econnect-configured-identity-incorrect.html

Often, developers miss capturing other Exceptions just like that. But it would prove very crucial under circumstances.

Vaidy