• Bug
  • Status: Closed
  • Resolution: Fixed
  • drb
  • Reporter: sourceforgetracker
  • September 21, 2009
  • 0
  • Watchers: 0
  • September 22, 2009
  • September 22, 2009

Description

When used in a server context, like Tomcat, for instance, retrieving objects from the DiskStore can throw errors. This is due to way in which objects get resolved by the class loader - in Tomcat, for instance, each webapp has its own classloader. If you put local objects loaded by the webapp’s class loader into the disk cache, ehcache throws an error on retrieval.

A simple fix is to redefine the resolveClass method of ObjectInputStream to get the contextClassLoader of the currentThread. A patch file is included for DiskStore.java that makes this change, and fixes this issue. (Hopefully the patch works - if not, the code changes are very small)

  • ben houston
  • [email protected] Sourceforge Ticket ID: 1324221 - Opened By: nobody - 11 Oct 2005 21:03 UTC

Comments

Sourceforge Tracker 2009-09-21

Logged In: YES user_id=693320

Ben

The patch looks good. Thanks.

It is in CVS HEAD.

Regards Greg Comment by: gregluck - 16 Oct 2005 00:04 UTC

Fiona OShea 2009-09-22

Re-opening so that I can properly close out these issues and have correct Resolution status in Jira