在我的情况下,所需的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