Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.0
-
SQL Server 2008 10.0.2531.0, OSCache 2.4, jTDS Driver 1.2.4, Kernel: 2.6.31-20-generic
Description
When using persistent OSCache with prefetching like:
SelectQuery q = proto.queryWithParameters(params);
q.addPrefetch(RichProduct.MANUFACTURER_PROPERTY);
q.addPrefetch(RichProduct.RAW_PRODUCT_PROPERTY);
q.setCacheStrategy(QueryCacheStrategy.SHARED_CACHE);
q.setCacheGroups("products");
Upon execution of this query the following exception occurs:
ERROR com.opensymphony.oscache.base.algorithm.AbstractConcurrentReadCache
[oscache] Exception persisting RichProduct/subCategory =
<ObjectId:SubCategory, category_id=1,
id=1>/categoryName/subCategoryName/cost
com.opensymphony.oscache.base.persistence.CachePersistenceException:
Unable to write
'/tmp/cache/application/0/0/5/005126BC80FABAA4C582919EDF0B9304.cache'
in the cache. Exception: java.io.NotSerializableException, Message:
org.apache.cayenne.access.ListWithPrefetches
at com.opensymphony.oscache.plugins.diskpersistence.AbstractDiskPersistenceListener.store(AbstractDiskPersistenceListener.java:376)
at com.opensymphony.oscache.plugins.diskpersistence.AbstractDiskPersistenceListener.store(AbstractDiskPersistenceListener.java:238)
<rest of stack trace removed>
If the prefetches are removed the issue does not occur.
If the in memory cache is used the issue does not occur either.