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

Description

I am trying to use EHCache with JDeveloper’s OC4J and keep getting a ClassNotFoundException from the DiskStore.ExpireTask.resolveClass method.

The problem has to do with the class loaders used by the thread. The thread is using the ContextClassLoader which, as best as I can tell, is using the System class loader as determined by the CLASSPATH for OC4J and not the application specific CLASSPATH.

If I simply put the ehcache-1.2beta2.jar file in the WEB-INF/lib directory of my war file I get a ClassNotFoundException looking for the net.sf.ehcache.Element class. If I put the ehcache, commons-logging and log4j jar files in the CLASSPATH for OC4J, it then throws the ClassNotFoundException looking for the specific classes that were cached to disk when it is trying to reload them so they can be expired.

A simple remove works fine, it is only on the expiring where it has the problem.

I also tried it on Tomcat 9.0.5.2 with the jars in the WEB-INF/lib of the war and I don’t get the Exceptions, however I don’t see the file shrink like I would expect it to. I get log output that elements are being removed, but I don’t see the file shrinking.
This might be because it is a random access file and simply viewing the file doesn’t work, I’m not sure.

Any insight on this would be greatly appreciated.

Thanks, Maury Mills Motorola [email protected] Sourceforge Ticket ID: 1385486 - Opened By: nobody - 19 Dec 2005 20:46 UTC

Comments

Fiona OShea 2009-09-22

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