- Steve McNiven
The Row not found: GenericOID error pops up in the forums every once and a while, so I thought I’d blog a bit on a potential fix for it.
The problem comes from the OpenAccess level 2 cache which of course is the cause of and solution to…all of life’s problems :)
Its purpose is to sit as a layer in memory between your app (IIS in this case) and the database. So the obvious benefit is faster results since the object you want is cached in memory and no call needs to happen back to the database. So if you have multiple users with multiple active OA Context objects, they’d all be just pinging back to that sweet sweet cache layer and not hammering your DB over and over again…which clearly is why it’s enabled in SF (and all of my non-SF sites).
Don’t get worried though, OA is smart enough to refresh the objects when you call certain methods which change the object, like .SaveChanges(). However if you manually change some data directly in the DB, I’ve found that unless there’s an explicit cache evict in the code somewhere you’d need to restart the app pool to get that change reflected.
So the cache seems to be a bit funkified right now I’m guessing with in a webservice context. Perhaps what might be happening is that there’s multiple contexts going on and one knows about a new object where another doesn’t (me guessing on that).
Long boring story short, disabling the OA L2 Cache should resolve this error…and it’s a quick fix.
Open your Data.Config file, and just add the following
This also should lower memory consumption, but again…should probably slightly imapct performance as you;re hitting the DB way more often.
This is just a quick stop-gap measure until it can be 100% resolved in a future release, so please don’t see this as a shortcoming in either product…I can tell you from experience that OpenAccess is an awesome ORM, and we all know how much I love SF :)
Thanks to Dr. Georgi Chokov for this solution!
It should be noted if you’re having issues with the events module NOT saving content items, disabling the L2 will help that as well. Symptoms would be you open an event, make a change, publish, and it appears as if nothing happened.