java.lang.NullPointerException: No API environment is registered for this thread.

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Stack Overflow by Unknown author, 1 year ago
via Google Groups by Siddharth Patnaik, 2 years ago
No API environment is registered for this thread.
via Google Groups by GMap, 2 years ago
No API environment is registered for this thread.
via Google Groups by Erem, 2 years ago
No API environment is registered for this thread.
via Google Groups by dilbert, 2 years ago
No API environment is registered for this thread.
via Google Groups by dilbert, 2 years ago
No API environment is registered for this thread.
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.Key.(Key.java:104)
at com.google.appengine.api.datastore.Key.(Key.java:88)
at com.google.appengine.api.datastore.Key.(Key.java:84)
at com.google.appengine.api.datastore.Entity.(Entity.java:122)
at com.google.appengine.api.datastore.Entity.(Entity.java:103)
at org.datanucleus.store.appengine.DatastoreFieldManager.(DatastoreFieldManager.java:187)
at org.datanucleus.store.appengine.DatastorePersistenceHandler.insertPreProcess(DatastorePersistenceHandler.java:338)
at org.datanucleus.store.appengine.DatastorePersistenceHandler.insertObjects(DatastorePersistenceHandler.java:251)
at org.datanucleus.store.appengine.DatastorePersistenceHandler.insertObject(DatastorePersistenceHandler.java:240)
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 com.stuff.server.GreetingServiceImpl.saveContact(GreetingServiceImpl.java:25)
at com.stuff.server.TestCase.testServerCallBack(TestCase.java:18)
at com.stuff.server.TestCase.main(TestCase.java:13)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
2 times, 1 year ago

Know the solutions? Share your knowledge to help other developers to debug faster.