2

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. I'm using:

  • Eclipse Version: Oxygen.3 Release (4.7.3)
  • Google Cloud Tools SDK 194.0.0
  • 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

6
  • Why down vote?? The Query.Filter class is not found .. how can this be ?? Commented Mar 22, 2018 at 17:33
  • Provide the full stacktrace as well. Commented Mar 24, 2018 at 15:25
  • Did you ever figure this out? I started getting this error today. When I deploy to AppEngine, I get NoClassDefFoundError on com/google/appengine/api/datastore/Query$Filter. It was working fine before and I don't think I changed anything. Commented Mar 25, 2018 at 4:49
  • @pldenc44: no solution yet - updated the description with the link to the Google issue Commented Mar 25, 2018 at 13:21
  • I was able to get past this issue by updating my Google Cloud SDK and upgrading to JAVA8 runtime. I'm not sure which one did the trick, but I'd say running "gcloud components update" is a good place to start. Commented Mar 26, 2018 at 15:04

1 Answer 1

1

This is a Google issue which is currently being looked into: 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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.