Object reference not set ... On NON-customized form

Started getting a “Object reference not set to an instance of an object.” error in the SO Entry form, but only when opening certain Orders.

Ruled out it being caused by a customization, because it even happens when we run the Base form (i.e. no customizations).

The “Details” for the error message are below.

Any ideas on where to look?


Application Error

Exception caught in: Epicor.ServiceModel

Error Detail

Message: Object reference not set to an instance of an object.
Program: Epicor.ServiceModel.dll
Method: ShouldRethrowNonRetryableException

Client Stack Trace

at Epicor.ServiceModel.Channels.ImplBase`1.ShouldRethrowNonRetryableException(Exception ex, DataSet[] dataSets)
at Erp.Proxy.BO.SalesOrderImpl.GetByID(Int32 orderNum)
at Erp.Adapters.SalesOrderAdapter.OnGetByID(Int32 ID)
at Ice.Lib.Framework.EpiBaseAdapter.GetByID(Int32 intId)
at Erp.UI.App.SalesOrderTracker.Transaction.GetOrderData(Int32 orderNum)

Are you 100% sure there isn’t a personalization layer that was accidentally built on that form?

This tells you its happening at GetByID looks like it could be bad data of some sort? Have you or someone else been playing with SQL Direct updates by chance?
Does it happen to all users? if not it could be a personalization but since its failing on GetByID and only some records I suspect bad data.

Have you tried restarting your app servers (iisreset on app server)? Bar that, sounds like maybe some bad data got into your SO tables, might run some SQL queries to look at them under the hood. I’ve seen before where we get negative numbers where the UI doesn’t expect them, but that is typically a different error message (something about unable to bind negative numbers to control X).

I didn’t think you could save customizations to to the Base form.

Follow up -

I can create a new SO, but after adding a Line to it, it gets squirrely

Go into developer mode, click on sales order. Do you see a personalization layer there?

< cough >


I was just reading that. Was at the part that says …

you should avoid restarting, stopping, or rebooting your server if at all possible."


I’ll give it a try

Looks like the IISRESET did the trick.

FWIW - I had tried just Recycling the App Pool from Epicor Admin Console. But seemed like it needed a full IISRESET.

1 Like

There might be some middle ground between recycling the app pool, and doing an IISRESET, which would make Nathan feel better while still clearing out the gremlins that like to sneak into Epicor 10. (Just had some gremlins in our test E10.1.500.14 environment this morning… couldn’t search for Setup Groups - got an error about the WCF service or BO not being activated or something… which just went away after iisreset). I think if you do an actual STOP of the app pool, wait for it to be dead in Task Manager, and then start it again, it does a little better job of clearing the gremlins than doing a recycle, which I think attempt to bring up the new app pool and then “hand things over” before taking down the old one.

That said, thanks for the thoughts on ways to avoid iisreset Nathan - I guess even though I knew most of the methods you described, it just never really occurred to me that I should try them sometimes before “pulling the plug” even though I would only use that as a last resort on hardware. :smile:

1 Like

From the E10 online help fof the topic Regenerate Data Model:

Kind of odd that a software guide would suggest doing something that might work :slight_smile:


In the end, even Epicor is at the mercy of what Microsoft keeps hidden behind the green curtain.