Posted By:
David_Duran
Posted On:
Friday, January 10, 2003 11:30 AM
After much trial and error, I found out what the culprit was. This might differ for you depending on what circumstances you are getting this error.
Our client code caches the remote object. It will do a Naming Lookup and store the object in a HashMap associated with the URI that it was given.
Then, the next time a request is made for the object with that same URI, the Map would be checked first. If a value existed with that key then we would just return the cached remote object. If one didn't, then we would do a Naming.lookup and again store it in the Map.
For an application that receives thousands of hits/day, it seemed like a time saver, especially since doing a Naming.lookup EACH time was very redundant.
Unfortunately, that exception would be the result of the caching on the client code and the daily inactivation of the RMI servers that we were doing. SOMETHING, I don't even know exactly what, would cause the cached object to fail. By disabling the daily inactivation (& not the caching), the problem went away.