You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. Configure a cache in ehcache.xml with diskPersistent=true
2. Annotate a method using Cacheable with that cache and
DecoratedCacheType.REFRESHING_SELF_POPULATING_CACHE
What is the expected output?
Can use diskPersistent=true with
DecoratedCacheType.REFRESHING_SELF_POPULATING_CACHE
What do you see instead?
Method return value is not cached and stack trace:
2012-03-21 14:59:45,631 ERROR
[net.sf.ehcache.store.compound.factories.DiskStorageFactory$DiskWriteTask.call(D
iskStorageFactory.java:422)] kcNewsFeed.data - Disk Write of -1927703584078
failed (it will be evicted instead):
java.io.NotSerializableException:
com.googlecode.ehcache.annotations.RefreshableCacheEntry
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:391)
at net.sf.ehcache.Element.writeObject(Element.java:791)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:917)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1339)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
at net.sf.ehcache.util.MemoryEfficientByteArrayOutputStream.serialize(MemoryEfficientByteArrayOutputStream.java:97)
at net.sf.ehcache.store.compound.factories.DiskStorageFactory.serializeElement(DiskStorageFactory.java:332)
at net.sf.ehcache.store.compound.factories.DiskStorageFactory.write(DiskStorageFactory.java:311)
at net.sf.ehcache.store.compound.factories.DiskStorageFactory$DiskWriteTask.call(DiskStorageFactory.java:415)
at net.sf.ehcache.store.compound.factories.DiskPersistentStorageFactory$PersistentDiskWriteTask.call(DiskPersistentStorageFactory.java:565)
at net.sf.ehcache.store.compound.factories.DiskPersistentStorageFactory$PersistentDiskWriteTask.call(DiskPersistentStorageFactory.java:551)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
at java.util.concurrent.FutureTask.run(FutureTask.java:123)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:65)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:172)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:651)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:676)
at java.lang.Thread.run(Thread.java:595)
What version of the product are you using? On what operating system?
Using version 1.2 on Windows 2000 with Tomcat 6
Please provide any additional information below.
Can com.googlecode.ehcache.annotations.RefreshableCacheEntry be made
Serializable so that it can be written to disk.
Here is my cache config:
<cache name="kcNewsFeed" maxElementsInMemory="1000" eternal="true"
overflowToDisk="true" diskPersistent="true"/>
And my annotated method signature:
@Cacheable(cacheName = "kcNewsFeed", selfPopulating = true, decoratedCacheType
= DecoratedCacheType.REFRESHING_SELF_POPULATING_CACHE, refreshInterval = 1000 *
60 * 5)
public String getSupportNewsXml()
Original issue reported on code.google.com by [email protected] on 21 Mar 2012 at 7:18
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
[email protected]
on 21 Mar 2012 at 7:18The text was updated successfully, but these errors were encountered: