Hi
I'm using GAEJ 1.3.3.1 and datanucleus-cache-1.1.1. I'm trying to
enable 2nd level cache in my application following the official
instructions:
http://www.datanucleus.org/products/accessplatform%5F1%5F1/jpa/cache.html
Already configured persistence.xml to use datanucleus cache with
javax.cache. Already made my entities Serializable. But when calling
EntityManager#merge, memcache throws:
Caused by: java.lang.IllegalArgumentException: can't accept class
org.datanucleus.identity.IdentityReference as a memcache entity
at
com.google.appengine.api.memcache.MemcacheSerialization.serialize(MemcacheSerialization.java:
262)
at
com.google.appengine.api.memcache.MemcacheSerialization.makePbKey(MemcacheSerialization.java:
199)
at
com.google.appengine.api.memcache.MemcacheServiceImpl.get(MemcacheServiceImpl.java:
234)
at
com.google.appengine.api.memcache.stdimpl.GCache.remove(GCache.java:
174)
at
org.datanucleus.cache.javaxcache.JavaxCacheLevel2Cache.evict(JavaxCacheLevel2Cache.java:
192)
at
org.datanucleus.ObjectManagerImpl.performLevel2CacheUpdateAtCommit(ObjectManagerImpl.java:
2982)
at
org.datanucleus.ObjectManagerImpl.preCommit(ObjectManagerImpl.java:
2925)
at
org.datanucleus.TransactionImpl.internalPreCommit(TransactionImpl.java:
369)
at org.datanucleus.TransactionImpl.commit(TransactionImpl.java:
256)
at
org.datanucleus.jpa.EntityTransactionImpl.commit(EntityTransactionImpl.java:
104)
It doesn't seem to be something related to my application. Any ideas?
I'm used to Hibernate, not Datanucleus, so a few things are not clear
to me. First, why are all entities cacheable by default? Shouldn't I
enable caching only when needed?
And, second, how query cache works on datanucleus? Is it enabled too?
For all queries? Or should I enable query cache per query? And how to
do that?
----
Also, we know both Google and Datanucleus people post here. So here is
a suggestion: make things more clear. It's very very difficult to find
information about those things. There is no mention in Google
Documentations. And Datanucleus' doesn't mention GAE, you have to
figure out how to configure, what's the right version. Also the
@Cacheable annotation mentioned there doesn't work, only @Extension.
Anyway, just a suggestion... I think it'd be better to GAE community
to have better tutorials.
Thanks again
Sérgio
--
You received this message because you are subscribed to the Google Groups
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine-java?hl=en.