Hi Eyal, Now I get it: you're reaching the URL fetch timeout of App Engine
Read http://code.google.com/appengine/docs/java/urlfetch/overview.html#Requests to get the instructions to set this timeout to see if it's enough for you to go through. regards didier On Nov 9, 10:23 am, Bhim Khadka <khadka.b...@gmail.com> wrote: > On 11/7/10, Eyal <twoworldsf...@gmail.com> wrote: > > > Hi all, > > > I'm trying to use JDO in an app engine application on Eclipse. When I > > use a web interface I'm able to make it work just fine. But I need to > > be able to run it as a java application and when I try I get the > > following exception: > > > java.lang.NullPointerException: No API environment is registered for > > this thread. > > at > > com.google.appengine.api.datastore.DatastoreApiHelper.getCurrentAppId(DatastoreApiHelper.java: > > 108) > > at > > com.google.appengine.api.datastore.DatastoreApiHelper.getCurrentAppIdNamespace(DatastoreApiHelper.java: > > 118) > > at com.google.appengine.api.datastore.Query.<init>(Query.java:87) > > at > > org.datanucleus.store.appengine.query.DatastoreQuery.validate(DatastoreQuery.java: > > 649) > > at > > org.datanucleus.store.appengine.query.DatastoreQuery.performExecute(DatastoreQuery.java: > > 215) > > at > > org.datanucleus.store.appengine.query.JDOQLQuery.performExecute(JDOQLQuery.java: > > 89) > > at org.datanucleus.store.query.Query.executeQuery(Query.java:1489) > > at org.datanucleus.store.query.Query.executeWithArray(Query.java: > > 1371) > > at org.datanucleus.store.query.Query.execute(Query.java:1344) > > at org.datanucleus.jdo.JDOQuery.execute(JDOQuery.java:221) > > at com.eyes.manager.UpdateManager.main(UpdateManager.java:39) > > > This is my jdeoconfig.xml, which is generated by the Eclipse plugin: > > > <?xml version="1.0" encoding="utf-8"?> > > <jdoconfig xmlns="http://java.sun.com/xml/ns/jdo/jdoconfig" > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > > xsi:noNamespaceSchemaLocation="http://java.sun.com/xml/ns/jdo/ > > jdoconfig"> > > > <persistence-manager-factory name="transactions-optional"> > > <property name="javax.jdo.PersistenceManagerFactoryClass" > > > value="org.datanucleus.store.appengine.jdo.DatastoreJDOPersistenceManagerFactory"/ > > > <property name="javax.jdo.option.ConnectionURL" > > value="appengine"/> > > <property name="javax.jdo.option.NontransactionalRead" > > value="true"/> > > <property name="javax.jdo.option.NontransactionalWrite" > > value="true"/> > > <property name="javax.jdo.option.RetainValues" value="true"/> > > <property name="datanucleus.appengine.autoCreateDatastoreTxns" > > value="true"/> > > </persistence-manager-factory> > > </jdoconfig> > > > Any idea how can I solve this? How do I register the "API > > Environment?" > > > Thanks! > > Bhim Bdr. Khadka > Lalrakshak Prakashan Pvt. Ltd > Phone: 01 4111974 > Mobile No: 981096073 -- 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-j...@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.