[Topaz-dev] serializing Article from Session.get()
Pradeep Krishnan
pradeepk at soft-point.com
Tue Mar 11 18:05:18 PDT 2008
Hi Russ,
Russell Uman wrote:
> tried it. patched fine.
>
> i got new and interesting errors!
>
> we're still only able to share a single key between caches (the
> Annotation-info key) out of the 3 that are generated on
> fetchArticle.action.
>
> i noticed that you added a logger to Session.java. i upped logging for
> org.topazproject to debug, but i did not see its log message after
> fetchArticle.
>
Cool!
> [root at topaz01-multi ~]# grep "Serializable replacement"
> /var/log/topaz/plosone.log
Yes. See below as to why that is.
> [root at topaz01-multi ~]#
>
> here's what i did get:
>
> 2008-03-11 17:29:08,013 WARN RMIAsynchronousCacheReplicator()> Unable
> to send message to remote peer. Message was: error performing query:
> select $s $p $o\
> subquery (select $t from <local:///topazproject#filter:model=profiles>
> where $o <rdf:type> $t) from <local:///topazproject#filter:model=ri>
> where $s $p $o \
> and $s <mulgara:is>
> <info:doi/10.1371/journal.pone.0000581/bibliographicCitation>; select $s
> $p $o subquery (select $t from <local:///topazproject#filter:mo\
> del=ri> where $s <rdf:type> $t) from
> <local:///topazproject#filter:model=ri> where $s $p $o and $o
> <mulgara:is> <info:doi/10.1371/journal.pone.0000581/bibli\
> ographicCitation>; [Replication Thread
> net.sf.ehcache.distribution.RMIAsynchronousCacheReplicator]
> org.topazproject.otm.OtmException: error performing query: select $s $p
> $o subquery (select $t from
> <local:///topazproject#filter:model=profiles> where $o <\
> rdf:type> $t) from <local:///topazproject#filter:model=ri> where $s $p
> $o and $s <mulgara:is>
> <info:doi/10.1371/journal.pone.0000581/bibliographicCitation>;\
> select $s $p $o subquery (select $t from
> <local:///topazproject#filter:model=ri> where $s <rdf:type> $t) from
> <local:///topazproject#filter:model=ri> where\
> $s $p $o and $o <mulgara:is>
> <info:doi/10.1371/journal.pone.0000581/bibliographicCitation>;
> at org.topazproject.otm.stores.ItqlStore.get(ItqlStore.java:333)
> at org.topazproject.otm.Session.getFromStore(Session.java:596)
> at org.topazproject.otm.Session.access$100(Session.java:45)
> at org.topazproject.otm.Session$1.invoke(Session.java:736)
> at
> org.plos.models.Citation_$$_javassist_6.writeReplace(Citation_$$_javassi
> st_6.java)
[snip]
Looks like the Citation object is a lazy loaded proxy that isn't loaded.
For caching and serialization to work all proxies must be eager loaded
or force loaded. Since you guys are using a fairly old version of OTM,
the pub-app should have to manually force load all proxy associations
before adding an object to the cache.
Cheers,
Pradeep
More information about the Topaz-Dev
mailing list