在我的情況下,所需的jar是在WEB-INF/lib文件夾內,但錯誤仍然存在......我發現這個錯誤發生了,因爲Jetty 9還沒有完成類加載啓動過程,我初始化類是需要BlobstoreService:
public class InitializeAppContextListener implements ServletContextListener {
private BlobstoreService blobstoreService = BlobstoreServiceFactory.getBlobstoreService();
所以我不得不推遲實例變量初始化一次上下文滿載如下:
public class InitializeAppContextListener implements ServletContextListener {
private BlobstoreService blobstoreService;
public void contextInitialized(ServletContextEvent event) {
blobstoreService = BlobstoreServiceFactory.getBlobstoreService();
然後web應用程序能夠正常重新開始。這個新行爲出現在我們使用JDK 1.8從servlet-api 2.5升級到3.1之後...
Hi @Andrei,我正在使用maven。我必須在pom.xml文件中提供任何依賴項嗎? – Archit 2014-09-03 06:45:21
剛剛檢查了我的WEB-INF/lib /,並在那裏找到了appengine-api-1.0-sdk-1.8.4.jar文件。而且沒有任何警告。 – Archit 2014-09-03 06:47:36
除了找到的jar外,還需要有appengine-api.jar。 – 2014-09-03 07:05:33