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

Google Groups | Harshdeep S Jawanda | 1 year ago
  1. 0

    Unit test fails if I defer save

    Google Groups | 1 year ago | Harshdeep S Jawanda
    java.lang.NullPointerException: No API environment is registered for this thread.
  2. 0

    com.google.appengine.api.datastore.Key serialization issues

    Google Groups | 6 years ago | dilbert
    java.lang.NullPointerException: No API environment is registered for this thread.
  3. 0

    Issues with Key serialization

    Google Groups | 6 years ago | dilbert
    java.lang.NullPointerException: No API environment is registered for this thread.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Initialize local datastore exception

    Google Groups | 7 years ago | antcasq
    java.lang.NullPointerException: No API environment is registered for this thread.
  6. 0

    How to deploy GWT GAE applications on external server

    Stack Overflow | 4 years ago | fl4l
    java.lang.NullPointerException: No API environment is registered for this thread.

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No API environment is registered for this thread.

      at com.google.appengine.api.datastore.DatastoreApiHelper.getCurrentAppId()
    2. Google AppEngine
      KeyFactory.createKey
      1. com.google.appengine.api.datastore.DatastoreApiHelper.getCurrentAppId(DatastoreApiHelper.java:180)
      2. com.google.appengine.api.datastore.DatastoreApiHelper.getCurrentAppIdNamespace(DatastoreApiHelper.java:196)
      3. com.google.appengine.api.datastore.Key.<init>(Key.java:96)
      4. com.google.appengine.api.datastore.Key.<init>(Key.java:86)
      5. com.google.appengine.api.datastore.KeyFactory.createKey(KeyFactory.java:84)
      6. com.google.appengine.api.datastore.KeyFactory.createKey(KeyFactory.java:77)
      6 frames
    3. Objectify App Engine
      ObjectifyService$2.close
      1. com.googlecode.objectify.util.DatastoreUtils.createKey(DatastoreUtils.java:84)
      2. com.googlecode.objectify.impl.KeyMetadata.getRawKeyOrNull(KeyMetadata.java:192)
      3. com.googlecode.objectify.impl.KeyMetadata.getRawKey(KeyMetadata.java:202)
      4. com.googlecode.objectify.impl.Keys.rawKeyOf(Keys.java:36)
      5. com.googlecode.objectify.impl.Keys.keyOf(Keys.java:29)
      6. com.googlecode.objectify.impl.Deferrer.undefer(Deferrer.java:52)
      7. com.googlecode.objectify.impl.WriteEngine.save(WriteEngine.java:73)
      8. com.googlecode.objectify.impl.SaverImpl.entities(SaverImpl.java:60)
      9. com.googlecode.objectify.impl.Deferrer.flush(Deferrer.java:109)
      10. com.googlecode.objectify.impl.ObjectifyImpl.flush(ObjectifyImpl.java:307)
      11. com.googlecode.objectify.ObjectifyService$2.close(ObjectifyService.java:118)
      11 frames
    4. in.co.amebatechnologies
      DatastoreTests.tearDown
      1. in.co.amebatechnologies.empireapp.test.DatastoreTests.tearDown(DatastoreTests.java:76)
      1 frame
    5. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      4. java.lang.reflect.Method.invoke(Unknown Source)
      4 frames
    6. JUnit
      ParentRunner.run
      1. org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
      2. org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      3. org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
      4. org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:33)
      5. org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
      6. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
      7. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
      8. org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
      9. org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
      10. org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
      11. org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
      12. org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
      13. org.junit.runners.ParentRunner.run(ParentRunner.java:363)
      13 frames
    7. JUnit4 Runner
      JUnit4TestReference.run
      1. org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
      1 frame
    8. JUnit3 Runner
      RemoteTestRunner.main
      1. org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      2. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
      3. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
      4. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
      5. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
      5 frames