cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Max Pfingsthorn" <m.pfingsth...@hippo.nl>
Subject RE: repository block
Date Fri, 03 Mar 2006 11:22:26 GMT
Hi!

Okay, for the WebDAVSource, or any Inspectable and Traverseable source, you will get an InspectableTraversableCachingSource
from the CachingSourceFactory. This source will actually put SourceProperty objects in a map
for its cached response. The cached response is Serializable, but not the elements in that
map, so ObjectOutputStream.writeObject() fails. This only happens when the in-memory part
of the Cache which uses the EHDefaultStore becomes too full and loads objects off to disk.

Here is the exception we get:

2006-02-28 12:03:57,173 ERROR net.sf.ehcache.store.DiskStore           cocoon-ehcache-1Cache:
Could not write elements to disk cache
java.io.NotSerializableException: org.apache.cocoon.components.source.helpers.SourceProperty
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
        at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
        at java.util.HashMap.writeObject(HashMap.java:980)
        at sun.reflect.GeneratedMethodAccessor789.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:809)
        at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1296)
        at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
        at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)
        at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304)
        at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
        at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)
        at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304)
        at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
        at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)
        at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304)
        at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
        at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)
        at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304)
        at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
        at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
        at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
        at net.sf.ehcache.store.DiskStore.flushSpool(DiskStore.java:515)
        at net.sf.ehcache.store.DiskStore.spoolThreadMain(DiskStore.java:488)
        at net.sf.ehcache.store.DiskStore.access$600(DiskStore.java:89)
        at net.sf.ehcache.store.DiskStore$SpoolThread.run(DiskStore.java:755)



max

> -----Original Message-----
> From: Jean-Baptiste Quenot [mailto:jbq@apache.org]
> Sent: Thursday, March 02, 2006 16:59
> To: dev@cocoon.apache.org
> Subject: Re: repository block
> 
> 
> * Max Pfingsthorn:
> 
> > I want to  refactor the repository block  so that SourceProperty
> > is  an   interface. Or  at  least  implement   readObject()  and
> > writeObject(),  so  it  can  be  serialized. SourceProperty  not
> > being  Serializable  makes  the   WebDAVSource  (and  any  other
> > which  implements  InspectableSource)   not  cacheable  via  the
> > CachingSourceFactory from the scratchpad.
> 
> Hello Max,
> 
> Does CachingSourceFactory give an error?   How do you observe that
> WebDAVSource is not cacheable?
> -- 
> Jean-Baptiste Quenot
> http://caraldi.com/jbq/
> 

Mime
View raw message