Hi Eyal, Where do you run your application when getting this exception: on your dev env or on the google infrastructure ? regards didier
On Nov 8, 8:44 am, Eyal <[email protected]> wrote: > Thank you lp, and Didier. > > Actually this application will need to run in production, and not only > in testing. > > I need to be able to update the application's datastore with a feed > from Analytics. When I create a very simple GUI for it using GWT > (basically just a submit button,) I get a timeout exception because > the Analytics server takes too long to respond (it seems to be > unsolvable at this point.) So I thought I'll just run it as a simple > Java application -- and than I don't have the timeout problem and the > Analytics feed works beautifully. > > But then -- this problem. When I create objects from the Analytics > feed, and try to insert them into the datastore, I get the exception > above. > > What am I missing? > > You help is greatly appreciated! > > Eyal > > On Nov 8, 6:21 am, Didier Durand <[email protected]> wrote: > > > Hi, > > > This comes when you are trying to run code within Eclipse without > > having starting properly the local runtime of App Engine: > > seehttp://code.google.com/appengine/docs/java/tools/localunittesting.html > > (parag Datastore tests) > > > I can also supply my Junit init code when needed > > > regards > > didier > > > On Nov 7, 5:45 pm, Eyal <[email protected]> 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(Datas > > > toreApiHelper.java: > > > 108) > > > at > > > com.google.appengine.api.datastore.DatastoreApiHelper.getCurrentAppIdNamesp > > > ace(DatastoreApiHelper.java: > > > 118) > > > at com.google.appengine.api.datastore.Query.<init>(Query.java:87) > > > at > > > org.datanucleus.store.appengine.query.DatastoreQuery.validate(DatastoreQuer > > > y.java: > > > 649) > > > at > > > org.datanucleus.store.appengine.query.DatastoreQuery.performExecute(Datasto > > > reQuery.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.DatastoreJDOPersistenceManagerFa > > > ctory"/ > > > > <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! > > > Eyal -- 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.
