Exception while dispatching incoming RPC call Object Manager has been closed (repost)
Hey, I've been trying to get my RPC Call to AppEngine to work since last Wed, with no luck. My issue now seems to be with my query. I'm willing to post any code needed, but I just want to get this working, as this has completely halted me on any further progress on my app. Everything looks like it should be working. Here is my TestServiceImpl.java : package com.spierce7.gwt.test.server; import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.logging.Logger; import javax.jdo.JDOHelper; import javax.jdo.PersistenceManager; import javax.jdo.PersistenceManagerFactory; import javax.jdo.Query; import com.google.gwt.user.server.rpc.RemoteServiceServlet; import com.spierce7.gwt.test.client.TestService; import com.spierce7.gwt.test.shared.PersistentShift; public class TestServiceImpl extends RemoteServiceServlet implements TestService{ private static final Logger LOG = Logger.getLogger(TestServiceImpl.class.getName()); private static final PersistenceManagerFactory PMF = JDOHelper.getPersistenceManagerFactory(transactions-optional); public void addShift(Date startDate, Date endDate) { PersistenceManager pm = getPersistenceManager(); try { pm.makePersistent(new PersistentShift(startDate, endDate)); } finally { pm.close(); } } public ListPersistentShift getShifts() { PersistenceManager pm = getPersistenceManager(); ListPersistentShift results = new ArrayListPersistentShift(); Query query = pm.newQuery(PersistentShift.class); query.setFilter(search == 1); try { results = (ListPersistentShift) query.execute(); } finally { pm.close(); } return results; } private PersistenceManager getPersistenceManager() { return PMF.getPersistenceManager(); } } ___ My addShift function works fine, and I can add objects to the database just fine. I just can't retrieve them. I finally changed the objects in the database to all have an int variable called search, and it's always set to 1. When I call the getShifts() method though, it gives me this error: javax.servlet.ServletContext log: Exception while dispatching incoming RPC call Object Manager has been closed org.datanucleus.exceptions.NucleusUserException: Object Manager has been closed at org.datanucleus.ObjectManagerImpl.assertIsOpen(ObjectManagerImpl.java: 3876) at org.datanucleus.ObjectManagerImpl.getFetchPlan(ObjectManagerImpl.java: 376) at org.datanucleus.store.query.Query.getFetchPlan(Query.java: 497) at org.datanucleus.store.appengine.query.DatastoreQuery $6.apply(DatastoreQuery.java:631) at org.datanucleus.store.appengine.query.DatastoreQuery $6.apply(DatastoreQuery.java:630) at org.datanucleus.store.appengine.query.LazyResult.resolveNext(LazyResult.java: 94) at org.datanucleus.store.appengine.query.LazyResult $LazyAbstractListIterator.computeNext(LazyResult.java:215) at org.datanucleus.store.appengine.query.AbstractIterator.tryToComputeNext(AbstractIterator.java: 132) at org.datanucleus.store.appengine.query.AbstractIterator.hasNext(AbstractIterator.java: 127) at org.datanucleus.store.appengine.query.LazyResult $AbstractListIterator.hasNext(LazyResult.java:169) at java.util.AbstractCollection.toString(Unknown Source) ... (it goes on) ___ I saw some examples where queries are ended with query.closeAll(), and I tried that also, but I get a different error telling me something couldn't be serialized from the datanucleus. At this point I just want it to work. Any help, or any ideas would be great. Let me know if you'd like some other code posted. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Exception while dispatching incoming RPC call Object Manager has been closed
Hey, I've been trying to get my RPC Call to AppEngine to work since last Wed, with no luck. My issue now seems to be with my query. I'm willing to post any code needed, but I just want to get this working, as this has completely halted me on any further progress on my app. Everything looks like it should be working. Here is my TestServiceImpl.java : package com.spierce7.gwt.test.server; import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.logging.Logger; import javax.jdo.JDOHelper; import javax.jdo.PersistenceManager; import javax.jdo.PersistenceManagerFactory; import javax.jdo.Query; import com.google.gwt.user.server.rpc.RemoteServiceServlet; import com.spierce7.gwt.test.client.TestService; import com.spierce7.gwt.test.shared.PersistentShift; public class TestServiceImpl extends RemoteServiceServlet implements TestService{ private static final Logger LOG = Logger.getLogger(TestServiceImpl.class.getName()); private static final PersistenceManagerFactory PMF = JDOHelper.getPersistenceManagerFactory(transactions-optional); public void addShift(Date startDate, Date endDate) { PersistenceManager pm = getPersistenceManager(); try { pm.makePersistent(new PersistentShift(startDate, endDate)); } finally { pm.close(); } } public ListPersistentShift getShifts() { PersistenceManager pm = getPersistenceManager(); ListPersistentShift results = new ArrayListPersistentShift(); Query query = pm.newQuery(PersistentShift.class); query.setFilter(search == 1); try { results = (ListPersistentShift) query.execute(); } finally { pm.close(); } return results; } private PersistenceManager getPersistenceManager() { return PMF.getPersistenceManager(); } } ___ My addShift function works fine, and I can add objects to the database just fine. I just can't retrieve them. I finally changed the objects in the database to all have an int variable called search, and it's always set to 1. When I call the getShifts() method though, it gives me this error: javax.servlet.ServletContext log: Exception while dispatching incoming RPC call Object Manager has been closed org.datanucleus.exceptions.NucleusUserException: Object Manager has been closed at org.datanucleus.ObjectManagerImpl.assertIsOpen(ObjectManagerImpl.java: 3876) at org.datanucleus.ObjectManagerImpl.getFetchPlan(ObjectManagerImpl.java: 376) at org.datanucleus.store.query.Query.getFetchPlan(Query.java:497) at org.datanucleus.store.appengine.query.DatastoreQuery $6.apply(DatastoreQuery.java:631) at org.datanucleus.store.appengine.query.DatastoreQuery $6.apply(DatastoreQuery.java:630) at org.datanucleus.store.appengine.query.LazyResult.resolveNext(LazyResult.java: 94) at org.datanucleus.store.appengine.query.LazyResult $LazyAbstractListIterator.computeNext(LazyResult.java:215) at org.datanucleus.store.appengine.query.AbstractIterator.tryToComputeNext(AbstractIterator.java: 132) at org.datanucleus.store.appengine.query.AbstractIterator.hasNext(AbstractIterator.java: 127) at org.datanucleus.store.appengine.query.LazyResult $AbstractListIterator.hasNext(LazyResult.java:169) at java.util.AbstractCollection.toString(Unknown Source) ... (it goes on) ___ I saw some examples where queries are ended with query.closeAll(), and I tried that also, but I get a different error telling me something couldn't be serialized from the datanucleus. At this point I just want it to work. Any help, or any ideas would be great. Let me know if you'd like some other code posted. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.