简体   繁体   English

Google App Engine:java.lang.NoClassDefFoundError:com / google / appengine / api / datastore / Query $ Filter

[英]Google App Engine: java.lang.NoClassDefFoundError: com/google/appengine/api/datastore/Query$Filter

I'm getting this error in production only - the development server works fine. 我仅在生产中遇到此错误-开发服务器工作正常。

An older version of my app works fine in production as well - but every time I do a new deployment I get this error when I access my app. 我的应用程序的旧版本在生产中也可以正常工作-但是每次我进行新的部署时,访问应用程序时都会出现此错误。 I tried to recompile the particular class where the error is thrown and to change the code, but still no luck. 我试图重新编译引发错误的特定类并更改代码,但是仍然没有运气。

I'm not really sure, but I guess it has something to do with the deployment process itself .. I'm deploying from Eclipse. 我不太确定,但是我想这与部署过程本身有关。我正在从Eclipse进行部署。 I'm using: 我正在使用:

  • Eclipse Version: Oxygen.3 Release (4.7.3) Eclipse版本:Oxygen.3发布(4.7.3)
  • Google Cloud Tools SDK 194.0.0 Google Cloud Tools SDK 194.0.0
  • App Engine 1.9.63 App Engine 1.9.63

Thanks! 谢谢!

UPDATE: 更新:

Here is some simple test code: 这是一些简单的测试代码:

@Override
public void doGet(HttpServletRequest req, HttpServletResponse res) throws IOException {
    res.setContentType("text/plain");
    res.setCharacterEncoding("UTF-8");

    // this throws: java.lang.NoClassDefFoundError - only in PRODUCTION
    Query.Filter filter = Query.FilterOperator.EQUAL.of("name", null);

    res.getWriter().print("Hello App Engine: " + filter);
}

This fails in production but works on the development server! 这在生产中失败,但是可以在开发服务器上使用!

Update 2: Opened an issue with Google: https://issuetracker.google.com/issues/76144204 更新2:提出了与Google的问题: https : //issuetracker.google.com/issues/76144204

This is a Google issue which is currently being looked into: https://issuetracker.google.com/issues/76144204 这是目前正在调查的Google问题: https : //issuetracker.google.com/issues/76144204

The fix for the moment is to copy appengine-api-1.0-sdk-1.9.63.jar file into the WEB-INF/lib directory as explained in this comment: https://issuetracker.google.com/issues/76144204#comment45 目前的解决方法是按照以下注释中的说明将appengine-api-1.0-sdk-1.9.63.jar文件复制到WEB-INF / lib目录中: https ://issuetracker.google.com/issues/76144204# comment45

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Google App Engine-java.lang.NoClassDefFoundError:com.google.appengine.api.datastore.DatastoreServiceFactory - Google App Engine - java.lang.NoClassDefFoundError: com.google.appengine.api.datastore.DatastoreServiceFactory java.lang.NoClassDefFoundError: com/google/appengine/api/datastore/AsyncDatastoreService - java.lang.NoClassDefFoundError: com/google/appengine/api/datastore/AsyncDatastoreService java.lang.NoClassDefFoundError: com/google/appengine/api/urlfetch/HTTPMethod - java.lang.NoClassDefFoundError: com/google/appengine/api/urlfetch/HTTPMethod App Engine java.lang.NoClassDefFoundError:com / google / api / server / spi / guice / GuiceSystemServiceServletModule - App Engine java.lang.NoClassDefFoundError: com/google/api/server/spi/guice/GuiceSystemServiceServletModule Google App Engine:java.lang.ClassCastException:com.google.appengine.api.datastore.Key 无法转换为 java.lang.Integer - Google App Engine: java.lang.ClassCastException: com.google.appengine.api.datastore.Key cannot be cast to java.lang.Integer java.lang.NoClassDefFoundError:com / google / appengine / tools / cloudstorage / GcsFilename - java.lang.NoClassDefFoundError: com/google/appengine/tools/cloudstorage/GcsFilename Twitter4j Google App Engine-java.lang.NoClassDefFoundError - Twitter4j Google App Engine - java.lang.NoClassDefFoundError java.lang.NoClassDefFoundError 在谷歌应用引擎和 maven 上 - java.lang.NoClassDefFoundError On a google app engine & maven java.lang.NoClassDefFoundError:com / google / api / client / json / JsonFactory - java.lang.NoClassDefFoundError: com/google/api/client/json/JsonFactory java.lang.NoClassDefFoundError: com/google/api/client/http/HttpRequestInitializer - java.lang.NoClassDefFoundError: com/google/api/client/http/HttpRequestInitializer
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM