???????????д???????????д?С????????????????????????С????????μ????????????????????д???д????????????????????????????????????????
??????GAE?????У??????????????????Junit jar????????test??????????????????????С??????????е??????г??????????????????????????????java.lang.NullPointerException: No API environment is registered for this thread.??????????????????????????????????????????“???API???????????????”???????????????????????????????????????????????????????????main????????С?Oh??my god!??????????????????????????????
??????????????д?????????????С?????????????????????????????飬????????????gae??????????????????????????????????gae??????????????????????????????μ????:
????GAE ???????????????弰???????????????????μ?????????????????????ó?????????Щ????????GAE?????????????????JPA?????????????????????????????????????????????????÷?????????????????????????????
?????????????“?????”??gae???????????????????GAE???????????????GAE?????????????????????????????????????????????????????????????г????????????????????????????????????????“?????”???“?????”?????????????????????……
??????gae?????????????????????????????й?gae??????????????????????????????????????????????????С??????????£?
????${SDK_ROOT}/lib/impl/appengine-api.jar
????${SDK_ROOT}/lib/impl/appengine-api-labs.jar
????${SDK_ROOT}/lib/impl/appengine-api-stubs.jar
????${SDK_ROOT}/lib/testing/appengine-testing.jar
????????${SDK_ROOT}???GAE SDK????????????????????????????????Щ?????????????????.???????????????м??????′???
private final LocalServiceTestHelper helper =
new LocalServiceTestHelper(new LocalDatastoreServiceTestConfig());
@Before
public void setUp() {
helper.setUp();
}
@After
public void tearDown() {
helper.tearDown();
}
???????????????????????????????????á????????????飬???????????????????????????????涼?д??????Щ?????????????????????????????????????GAE??????????????????е?gae???????????????????????????Щ?鷳???
????????????????????????????????????????????????????????????????????????????????????????