I've been seeing the same thing, and also only on the first access
after application start.  It happens consistently for me with my first
call to either getObjectById makePersistent or makePersistentAll.  In
my attempts to search the web for info, I ran across a snippet of code
that included the specified error message text.  A comment in that
source said something like "this is a harmless exception, we should
figure out a way to suppress it."  Yeah, I was annoyed at having spent
a bunch of time thinking this was the source of an issue when it was
only a red herring.  Sorry I don't remember the url to that code
snippet but searching for pieces of the error message from the
beginning of your stack trace should eventually find it.

I'm currently choosing to ignore the exception and everything appears
to be working for me.

On Sep 11, 12:01 pm, "Jason (Google)" <apija...@google.com> wrote:
> You shouldn't need the @Persistent(valueStrategy =
> IdGeneratorStrategy.IDENTITY) line since you're using a key name and not a
> String-encoded ID.
>
> The only thing that looks suspicious is your pmf object. The best practice
> is to use a PersistenceManagerFactory singleton as documented 
> athttp://code.google.com/appengine/docs/java/datastore/usingjdo.html#Ge...,
> but I would expect to see exceptions with subsequent calls to saveUser, not
> the first call. All the same, I recommend you try this to see if it helps,
> and please also let me know which version of the SDK you're using.
>
> - Jason
>
>
>
> On Thu, Sep 10, 2009 at 1:09 AM, bysse <erik.byst...@gmail.com> wrote:
>
> > As expected, this has nothing to do with wicket or sessions, just to
> > be sure i've checked those. If fact, all entities get persisted as
> > they should and the exception is caught somewhere in makePersistent.
> > So as far as i know, no harm is done(?)
> > So i think i'll just ignore this stacktrace and continue as usual.
>
> > On Sep 10, 12:22 am, bysse <erik.byst...@gmail.com> wrote:
> > > I also get this exception, but only on the first call to
> > > makePersistent.
>
> > > First Call:
> > >   Exception
> > >   Store objects ?
> > > Later Calls
> > >   Ok
> > >   Stores objects
>
> > > Can't think of anything that causes this. I'm using Wicket, how about
> > > you?
>
> > > /Erik
>
> > > On Sep 8, 7:48 pm, cancunmods <archie.she...@gmail.com> wrote:
>
> > > > I am having trouble saving an object on google app engine. Here is my
> > > > POJO class:
>
> > > > package subasta.domain.users;
>
> > > > import javax.jdo.annotations.IdentityType;
> > > > import javax.jdo.annotations.PersistenceCapable;
> > > > import javax.jdo.annotations.PrimaryKey;
> > > > import javax.jdo.annotations.Persistent;
>
> > > > @PersistenceCapable(identityType = IdentityType.APPLICATION)
> > > > public class User {
> > > >     @PrimaryKey
> > > >     @Persistent
> > > >     private String nombre;
>
> > > >     public User(String nombre){
> > > >         this.nombre = nombre;
> > > >     }
>
> > > >     public String getNombre() {
> > > >         return nombre;
> > > >     }
>
> > > >     public void setNombre(String nombre) {
> > > >         this.nombre = nombre;
> > > >     }
>
> > > > }
>
> > > > Here is my JDO Code.:
>
> > > > package subasta.repository.users;
>
> > > > import java.util.Set;
> > > > import java.util.logging.Logger;
>
> > > > import javax.jdo.JDOHelper;
> > > > import javax.jdo.PersistenceManagerFactory;
> > > > import javax.jdo.PersistenceManager;
>
> > > > import subasta.domain.users.User;
>
> > > > public class JDOUserDAO implements UserDAO{
> > > >     /** Logger for this class and subclasses */
> > > >     private static final Logger log = Logger.getLogger(UserDAO.class
> > > >             .getName());
>
> > > >     private static final PersistenceManagerFactory pmf =
> > > >         JDOHelper.getPersistenceManagerFactory("transactions-
> > > > optional");
>
> > > >     //PersistenceManagerFactory pmf;
>
> > > >     //public void setPmf(PersistenceManagerFactory pmf) {
> > > >         //this.pmf = pmf;
> > > >     //}
>
> > > >     public void saveUser(User user){
> > > >         PersistenceManager pm = pmf.getPersistenceManager();
> > > >         try{
> > > >             pm.makePersistent(user);
> > > >         }finally {
> > > >             pm.close();
> > > >         }
> > > >     }
>
> > > >     @SuppressWarnings("unchecked")
> > > >     public Set<User> getUsers(){
> > > >         PersistenceManager pm = pmf.getPersistenceManager();
> > > >         Set<User> users = (Set<User>)pm.getManagedObjects
> > > > (User.class);
> > > >         pm.close();
> > > >         return users;
> > > >     }
>
> > > > }
>
> > > > Things go wrong when making the call tomakePersistent. The exception
> > > > is:
>
> > > > 08-sep-2009 16:51:35
>
> > com.google.appengine.repackaged.com.google.common.base.FinalizableReference­Queue
> > > > <init>
> > > > INFO: Failed to start reference finalizer thread. Reference cleanup
> > > > will only occur when new references are created.
> > > > java.lang.reflect.InvocationTargetException
> > > >     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:597)
> > > >     at
>
> > com.google.appengine.repackaged.com.google.common.base.FinalizableReference­Queue.<init>
> > > > (FinalizableReferenceQueue.java:124)
> > > >     at
>
> > com.google.appengine.repackaged.com.google.common.labs.misc.InterningPools
> > > > $WeakInterningPool.<clinit>(InterningPools.java:104)
> > > >     at
>
> > com.google.appengine.repackaged.com.google.common.labs.misc.InterningPools.­newWeakInterningPool
> > > > (InterningPools.java:48)
> > > >     at
>
> > com.google.appengine.repackaged.com.google.io.protocol.ProtocolSupport.<cli­nit>
> > > > (ProtocolSupport.java:55)
> > > >     at com.google.apphosting.api.DatastorePb$PutRequest.freeze
> > > > (DatastorePb.java:8452)
> > > >     at com.google.apphosting.api.DatastorePb$PutRequest$1.<init>
> > > > (DatastorePb.java:8367)
> > > >     at com.google.apphosting.api.DatastorePb$PutRequest.<clinit>
> > > > (DatastorePb.java:8364)
> > > >     at com.google.appengine.api.datastore.DatastoreServiceImpl.put
> > > > (DatastoreServiceImpl.java:152)
> > > >     at com.google.appengine.api.datastore.DatastoreServiceImpl.put
> > > > (DatastoreServiceImpl.java:138)
> > > >     at com.google.appengine.api.datastore.DatastoreServiceImpl.put
> > > > (DatastoreServiceImpl.java:130)
> > > >     at
>
> > org.datanucleus.store.appengine.RuntimeExceptionWrappingDatastoreService.pu­t
> > > > (RuntimeExceptionWrappingDatastoreService.java:93)
> > > >     at org.datanucleus.store.appengine.DatastorePersistenceHandler.put
> > > > (DatastorePersistenceHandler.java:165)
> > > >     at org.datanucleus.store.appengine.DatastorePersistenceHandler.put
> > > > (DatastorePersistenceHandler.java:112)
> > > >     at
>
> > org.datanucleus.store.appengine.DatastorePersistenceHandler.insertObjects
> > > > (DatastorePersistenceHandler.java:239)
> > > >     at
>
> > org.datanucleus.store.appengine.DatastorePersistenceHandler.insertObject
> > > > (DatastorePersistenceHandler.java:225)
> > > >     at org.datanucleus.state.JDOStateManagerImpl.internalMakePersistent
> > > > (JDOStateManagerImpl.java:3185)
> > > >     at org.datanucleus.state.JDOStateManagerImpl.makePersistent
> > > > (JDOStateManagerImpl.java:3161)
> > > >     at org.datanucleus.ObjectManagerImpl.persistObjectInternal
> > > > (ObjectManagerImpl.java:1298)
> > > >     at org.datanucleus.ObjectManagerImpl.persistObject
> > > > (ObjectManagerImpl.java:1175)
> > > >     at org.datanucleus.jdo.JDOPersistenceManager.jdoMakePersistent
> > > > (JDOPersistenceManager.java:669)
> > > >     at org.datanucleus.jdo.JDOPersistenceManager.makePersistent
> > > > (JDOPersistenceManager.java:694)
> > > >     at subasta.repository.users.JDOUserDAO.saveUser(JDOUserDAO.java:
> > > > 29)
> > > >     at subasta.web.users.RegisterController.onSubmit
> > > > (RegisterController.java:38)
> > > >     at
> > > > org.springframework.web.servlet.mvc.SimpleFormController.onSubmit
> > > > (SimpleFormController.java:409)
> > > >     at
> > > > org.springframework.web.servlet.mvc.SimpleFormController.onSubmit
> > > > (SimpleFormController.java:381)
> > > >     at
>
> > org.springframework.web.servlet.mvc.SimpleFormController.processFormSubmiss­ion
> > > > (SimpleFormController.java:267)
> > > >     at
>
> > org.springframework.web.servlet.mvc.AbstractFormController.handleRequestInt­ernal
> > > > (AbstractFormController.java:265)
> > > >     at
> > > > org.springframework.web.servlet.mvc.AbstractController.handleRequest
> > > > (AbstractController.java:153)
> > > >     at
>
> > org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle
> > > > (SimpleControllerHandlerAdapter.java:48)
> > > >     at org.springframework.web.servlet.DispatcherServlet.doDispatch
> > > > (DispatcherServlet.java:875)
> > > >     at org.springframework.web.servlet.DispatcherServlet.doService
> > > > (DispatcherServlet.java:807)
> > > >     at org.springframework.web.servlet.FrameworkServlet.processRequest
> > > > (FrameworkServlet.java:571)
> > > >     at org.springframework.web.servlet.FrameworkServlet.doPost
> > > > (FrameworkServlet.java:511)
> > > >     at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
> > > >     at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
> > > >     at org.mortbay.jetty.servlet.ServletHolder.handle
> > > > (ServletHolder.java:487)
> > > >     at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
> > > > (ServletHandler.java:1093)
> > > >     at
> > > > com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter
> > > > (TransactionCleanupFilter.java:43)
> > > >     at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
> > > > (ServletHandler.java:1084)
> > > >     at com.google.appengine.tools.development.StaticFileFilter.doFilter
> > > > (StaticFileFilter.java:121)
> > > >     at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
> > > > (ServletHandler.java:1084)
> > > >     at org.mortbay.jetty.servlet.ServletHandler.handle
> > > > (ServletHandler.java:360)
> > > >     at org.mortbay.jetty.security.SecurityHandler.handle
> > > > (SecurityHandler.java:216)
> > > >     at org.mortbay.jetty.servlet.SessionHandler.handle
> > > > (SessionHandler.java:181)
> > > >     at org.mortbay.jetty.handler.ContextHandler.handle
> > > > (ContextHandler.java:712)
> > > >     at org.mortbay.jetty.webapp.WebAppContext.handle
> > > > (WebAppContext.java:405)
> > > >     at
> > > > com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle
> > > > (DevAppEngineWebAppContext.java:54)
>
> ...
>
> read more »- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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 google-appengine-java@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to