Hi,
I'm new to Google App Engine.
I try to develop a Servlet using Java

public class IsoServlet extends HttpServlet {
        final Logger log = Logger.getLogger(IsoServlet.class.getName());
        public PersistenceManager pm = PMF.get().getPersistenceManager();
....
....
}


I have implemented this class:
http://code.google.com/intl/it-IT/appengine/docs/java/datastore/usingjdo.html#Getting_a_PersistenceManager_Instance

when call my Servlet from web,
the function, search the object:

                        Utente u = pm.getObjectById(Utente.class, ut);

and then save the object:

                        u.setVip(true);
                        u.setRAQ(true);
                        pm.makePersistent(u);

finally closes the connection:

                        pm.close();

the first time, work correctly

the second time (when call my Servlet from web), not working properly
this is the log error:


10-21 05:35AM 17.590 /iso?method=login&1=12001&2=9002&3=pin 200 13ms
19cpu_ms 0kb Mozilla/4.0 (compatible; MSIE 6.0; Windows NT
5.0),gzip(gfe)
85.18.117.122 - - [21/Oct/2010:05:35:17 -0700] "POST /iso?
method=login&1=12001&2=9002&3=pin HTTP/1.1" 200 238 - "Mozilla/4.0
(compatible; MSIE 6.0; Windows NT 5.0),gzip(gfe)"
"iso-9001.appspot.com" ms=14 cpu_ms=19 api_cpu_ms=0 cpm_usd=0.000581
I 10-21 05:35AM 17.598
iso9001.server.IsoServlet login: invocato Login
I 10-21 05:35AM 17.598
iso9001.server.IsoServlet process: Crash
I 10-21 05:35AM 17.598
iso9001.server.IsoServlet process: javax.jdo.JDOFatalUserException:
Object Manager has been closed
NestedThrowables:
org.datanucleus.exceptions.NucleusUserException: Object Manager has
been closed




after 5 minutes of waiting, go back to work
this is the log:

10-21 05:35AM 18.809 /iso?method=login&1=12001&2=9002&3=pin 200 71ms
160cpu_ms 25api_cpu_ms 0kb Mozilla/4.0 (compatible; MSIE 6.0; Windows
NT 5.0),gzip(gfe)
85.18.117.122 - - [21/Oct/2010:05:35:18 -0700] "POST /iso?
method=login&1=12001&2=9002&3=pin HTTP/1.1" 200 280 - "Mozilla/4.0
(compatible; MSIE 6.0; Windows NT 5.0),gzip(gfe)"
"iso-9001.appspot.com" ms=71 cpu_ms=161 api_cpu_ms=25 cpm_usd=0.004521
I 10-21 05:35AM 18.818
iso9001.server.IsoServlet login: invocato Login


How can I fix it?
Thank's Giancarlo
from Turin Italy

-- 
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.

Reply via email to