Test top 3 APIs on GAE Flex, GKE, and GCP
Test Storage, Datastore, and Logging client libraries on all the GCP platforms (don't include GAE Standard).
Close this issue once we confirm it all works.
Removing bigquery.
The tests executed: https://gist.github.com/vam-google/862b1dc2c1badf0e675ef04a552ac872#file-gae_gce_gke_tests_run-txt
The tests results: GCE: https://gist.github.com/vam-google/862b1dc2c1badf0e675ef04a552ac872#file-gae_gce_gke_tests_run-txt
GAE Flex Java: https://gist.github.com/vam-google/862b1dc2c1badf0e675ef04a552ac872#file-gae_flex_java_test_results-txt
GAE Flex Custom: https://gist.github.com/vam-google/862b1dc2c1badf0e675ef04a552ac872#file-gae_flex_custom_test_results-txt
GKE: https://gist.github.com/vam-google/862b1dc2c1badf0e675ef04a552ac872#file-gke_test_results-txt
GAE Std Java8 Issues:
- CGLib: https://gist.github.com/vam-google/862b1dc2c1badf0e675ef04a552ac872#file-gae_std_java8_test_failure___cglib-txt
- EasyMock verify not allowed: https://gist.github.com/vam-google/862b1dc2c1badf0e675ef04a552ac872#file-gae_std_java8_test_failure___easymock_verify_not_allowed-txt
- System Prooperty: https://gist.github.com/vam-google/862b1dc2c1badf0e675ef04a552ac872#file-gae_std_java8_test_failure___env_variable-txt
- Wierd NoClassDefFound: https://gist.github.com/vam-google/862b1dc2c1badf0e675ef04a552ac872#file-gae_std_java8_test_failure___noclassdeffounderror_serialization_test-txt
- ThreadManager: https://gist.github.com/vam-google/862b1dc2c1badf0e675ef04a552ac872#file-gae_std_java8_test_failure___threadmanager-txt
Other issues (all paltforms):
- google-cloud-java seems very demanding on memory. The full test run consumes around 1.5 Gig memory on testing machine. 1.1) Was not able to run tests on default GAE Flex instances (execution was interrupted and instance restarted automatically). After adding more memory to machine, tests succeeded. 1.2) The biggest instance on GAE Std has 1Gb of ram, which may be not enough for any practical usage of google-cloud-java.
Conclusion
- GCE, GKE, GAE Flex seem more or less working properly, though with some issues (potentially memory issues).
- GAE Java8 has issues. Most of the issues seem environment specific, and at least one (Env Variable one) google-cloud-java specific.
- Potential (not confirmed yet) memory issues (google-cloud-java consumes too much memory).
Test App Code can be found here: https://github.com/vam-google/google-cloud-java/commit/35af49e35b69fbe98f37c3086803de85c807efb9
@ludoch FYI
Re GAE Java 8 Standard:
"the biggest instance on GAE Std has 1Gb of ram, which may be not enough for any practical usage of google-cloud-java": I hope that doesn't mean that making an API call requires 1.5Gb of RAM. Maybe the issue is with the test that has high parallelism? Can you run everything sequentially?
Leaving the memory issue aside for a second, I would start with fixing the issues that are more clearly tied to the difference in environments. Here's two of them:
Issue 3 ("env variable"): Can you include the parent exception where you throw that RuntimeException? The API classes should always be loadable. Minor points re the message: "com.google.appengine.runtime.version" is a system property, not an environment variable; the preferred way to check for GAE presence is to check that the "com.google.appengine.runtime.environment" system property is present; it's also a good idea to log its value in case of error; we don't call the AppEngine APIs "appengine-sdk" classes -- "AppEngine API classes" sounds better.
Issue 5 ("thread manager"): "Can't make API call urlfetch.Fetch in a thread that is neither the original request thread nor a thread created by ThreadManager" is fully expected if you're using a ThreadPoolExecutor with the default JRE ThreadFactory. Instead, you should pass in a ThreadFactory returned by https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/ThreadManager. If your test app is not a frontend, as I'd expect given that the tests may take more than 60s to complete, then you should ThreadManager.backgroundThreadFactory().
Hi Roberto,
The issue 3 is clearly veneer's problem and must be easy to fix. Also sorry for calling it env variable, I don't know why I did that (probably I did it automatically, thinking about a similar issue https://github.com/GoogleCloudPlatform/google-cloud-java/issues/1492, which uses both: system properties and env variables).
Issue 5. According to gblock@ there should be zero cost to supporting GAE Standard on 8+, and code should just work. Not being able to use normal thread executors (without specific thread factories based on env) is a big issue for us. We do use them in many places, it is also a part of GAPIC clients generation. In general there is a lot of heavy multithreading in multiple places of the library, which is hard to support by itself. Customization for GAE will make things much worse. Plus, we don't want to have dependency on AppEngine API in libraries at all (ThreadManger belongs to the appengine api). Also, actually the code I was running was already relying on default thread factory heavily. The tests themselves are executed in a background thread, not withing the context of a HTTP request (the app receives POST request, submits the task in default ThreadPoolExecutor, and returns). All that worked just fine, except that single case, described in the issue.
Not, that I was not able to run integration tests on GAEJ8 yet, because of the issue 3 (prevents ITs from starting). After that issue is fixed, there are potentially more problems with GAE std J8.
Thanks
On Fri, Apr 7, 2017 at 12:56 PM, Roberto Chinnici [email protected] wrote:
Re GAE Java 8 Standard:
"the biggest instance on GAE Std has 1Gb of ram, which may be not enough for any practical usage of google-cloud-java": I hope that doesn't mean that making an API call requires 1.5Gb of RAM. Maybe the issue is with the test that has high parallelism? Can you run everything sequentially?
Leaving the memory issue aside for a second, I would start with fixing the issues that are more clearly tied to the difference in environments. Here's two of them:
Issue 3 ("env variable"): Can you include the parent exception where you throw that RuntimeException? The API classes should always be loadable. Minor points re the message: "com.google.appengine.runtime.version" is a system property, not an environment variable; the preferred way to check for GAE presence is to check that the "com.google.appengine.runtime.environment" system property is present; it's also a good idea to log its value in case of error; we don't call the AppEngine APIs "appengine-sdk" classes -- "AppEngine API classes" sounds better.
Issue 5 ("thread manager"): "Can't make API call urlfetch.Fetch in a thread that is neither the original request thread nor a thread created by ThreadManager" is fully expected if you're using a ThreadPoolExecutor with the default JRE ThreadFactory. Instead, you should pass in a ThreadFactory returned by https://cloud.google.com/appengine/docs/standard/java/ javadoc/com/google/appengine/api/ThreadManager. If your test app is not a frontend, as I'd expect given that the tests may take more than 60s to complete, then you should ThreadManager.backgroundThreadFactory().
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/GoogleCloudPlatform/google-cloud-java/issues/1752#issuecomment-292636542, or mute the thread https://github.com/notifications/unsubscribe-auth/AYI4w3lvGBcKCrM5Px--lhzpSK-kA4q5ks5rtpTqgaJpZM4MdPkG .
Could you explain which App Engine APIs you need to call? If we brought their number down to zero, then you could run the client code in any thread.
We don't call any App Engine APIs, we don't even depend on App Engine Api explicitly. I thought that your previous comment for the issue 5 implied that we should switch to specific ThreadFactory when we create threads (thus we would have to add dependency on App Engine API). Currently we do not use it. google-cloud-java currently does not depend on App Engine API at all, but somehow we receive app engine api specific error, when running on GAE Std J8.
This error (issue 5) is not present on any other environment. On all platforms I was running 100% same code, without any modifications, except those configuration changes, which are env specific, but as for Java code itself it is 100% same everywhere.
Note, there could be some wierd transitive dependency on appengine-sdk, but I cannot find any. The only place where we use appengine-sdk as dependency is for google-cloud-appengine-flex-compat module, but it is a requirement fro java-compat environment, and is not related to GAE Std Java8 tests.
Are you using java.net.HttpURLConnection by any chance?
Yes, at least here: https://github.com/GoogleCloudPlatform/google-cloud-java/blob/master/google-cloud-logging/src/main/java/com/google/cloud/logging/GaeFlexLoggingEnhancer.java#L84
By default we redirect HttpURLConnection to the URLFetch API. This can overridden by adding this line to application-web.xml:
You should add it, but I think that we have a bug in Java 8 and that setting is not honored anyway. It'd be nice to verify this. If you can log the stack trace from the IOException where you use HttpURLConnection, I'd expect it to show some urlfetch API classes even when url-stream-handler is set to native.
Correct line:
<url-stream-handler>native</url-stream-handler>
It seems having no impact. https://std-java8-dot-vam-veneer.appspot.com/ is currently deployed with the following appengine-web.xml:
<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<application>vam-veneer</application>
<service>std-java8</service>
<version>1</version>
<runtime>java8</runtime>
<threadsafe>true</threadsafe>
<instance-class>B8</instance-class>
<manual-scaling>
<instances>1</instances>
</manual-scaling>
<url-stream-handler>native</url-stream-handler>
</appengine-web-app>
Running a test for com.google.cloud.datastore.testing.LocalDatastoreHelperTest on it gives same result as before: https://std-java8-dot-vam-veneer.appspot.com/test
Thanks. It looks like we have to fix some bugs on our side before the metadata server can work.
In the meantime, could you set the "GOOGLE_CLOUD_PROJECT" system property in application-web.xml? Based on the link to the code you provided before, if the system property is set the client won't even try to use HttpURLConnection to retrieve the metadata.
Sorry, I keep writing the descriptor name wrong. It's appengine-web.xml of course. Here's a snippet:
<system-properties>
<property name="GOOGLE_CLOUD_PROJECT" value="TBD"/>
</system-properties>
That did not have impact on the issue 5, but it kind of fixes issue 3, and allows to run integration tests, with lots of NoClassDefFound, for example:
Running com.google.cloud.datastore.it.ITDatastoreTest
.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EEE
Time: 0.408
There were 33 failures:
1) testGet(com.google.cloud.datastore.it.ITDatastoreTest)
com.google.cloud.datastore.DatastoreException: java.lang.NoClassDefFoundError: com/google/appengine/api/urlfetch/HTTPMethod
at com.google.cloud.datastore.DatastoreException.translateAndThrow(DatastoreException.java:71)
at com.google.cloud.datastore.DatastoreImpl.commit(DatastoreImpl.java:408)
at com.google.cloud.datastore.DatastoreImpl.commitMutation(DatastoreImpl.java:392)
at com.google.cloud.datastore.DatastoreImpl.put(DatastoreImpl.java:352)
at com.google.cloud.datastore.it.ITDatastoreTest.setUp(ITDatastoreTest.java:150)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298)
at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
That's odd, because the API classes should always be available. Does the test infrastructure create any classloaders? Could you print out the classloader for one of the test classes, like ITDatastoreTest? If it's a URLClassLoader, please also print the result of getURLs().
Here it is:
Running com.google.cloud.datastore.it.ITDatastoreTest (loaded by java.net.URLClassLoader)
ClassLoader urls:
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/classes/
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/google-api-services-dns-v1-rev7-1.21.0.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/google-cloud-pubsub-0.12.1-alpha-SNAPSHOT.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/guice-4.0.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/google-cloud-trace-0.12.1-alpha-SNAPSHOT.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/json-20151123.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/jackson-core-asl-1.9.11.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/google-cloud-vision-0.12.1-beta-SNAPSHOT-tests.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/grpc-google-common-protos-0.1.5.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/google-http-client-jackson-1.21.0.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/google-api-services-compute-v1-rev103-1.21.0.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/google-cloud-trace-0.12.1-alpha-SNAPSHOT-tests.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/easymock-3.4.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/grpc-stub-1.0.3.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/datastore-v1-proto-client-1.3.0.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/aopalliance-1.0.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/protobuf-java-util-3.0.0.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/grpc-google-cloud-monitoring-v3-0.1.5.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/junit-4.12.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/netty-transport-4.1.6.Final.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/google-cloud-core-0.12.1-alpha-SNAPSHOT.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/protobuf-java-3.0.0.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/grpc-google-cloud-pubsub-v1-0.1.6.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/grpc-google-cloud-speech-v1beta1-0.1.5.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/google-cloud-language-0.12.1-beta-SNAPSHOT.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/grpc-google-cloud-language-v1-0.1.6.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/google-api-services-bigquery-v2-rev330-1.22.0.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/google-cloud-resourcemanager-0.12.1-alpha-SNAPSHOT-tests.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/google-http-client-appengine-1.21.0.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/netty-codec-http2-4.1.6.Final.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/google-cloud-speech-0.12.1-alpha-SNAPSHOT.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/grpc-context-1.0.3.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/commons-io-2.2.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/grpc-google-cloud-trace-v1-0.1.5.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/google-cloud-core-0.12.1-alpha-SNAPSHOT-tests.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/auto-value-1.2.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/grpc-protobuf-1.0.3.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/google-oauth-client-1.21.0.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/hamcrest-core-1.3.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/google-cloud-datastore-0.12.1-beta-SNAPSHOT-tests.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/api-common-0.0.2.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/netty-buffer-4.1.6.Final.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/gax-0.8.1.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/netty-handler-proxy-4.1.6.Final.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/netty-common-4.1.6.Final.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/httpcore-4.0.1.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/google-cloud-logging-0.12.1-beta-SNAPSHOT.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/google-http-client-1.21.0.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/gson-2.3.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/commons-codec-1.3.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/google-cloud-monitoring-0.12.1-alpha-SNAPSHOT.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/commons-fileupload-1.3.1.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/grpc-google-cloud-vision-v1-0.1.6.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/grpc-google-cloud-language-v1beta2-0.1.6.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/google-cloud-storage-0.12.1-beta-SNAPSHOT.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/google-cloud-compute-0.12.1-alpha-SNAPSHOT-tests.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/google-cloud-language-0.12.1-beta-SNAPSHOT-tests.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/netty-codec-http-4.1.6.Final.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/grpc-auth-1.0.3.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/google-cloud-errorreporting-0.12.1-alpha-SNAPSHOT-tests.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/google-cloud-translate-0.12.1-beta-SNAPSHOT-tests.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/netty-handler-4.1.6.Final.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/netty-resolver-4.1.6.Final.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/google-api-services-cloudresourcemanager-v1beta1-rev10-1.21.0.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/httpclient-4.0.1.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/grpc-google-cloud-error-reporting-v1beta1-0.1.5.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/google-cloud-bigquery-0.12.1-beta-SNAPSHOT.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/jsr305-1.3.9.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/google-auth-library-oauth2-http-0.6.1.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/google-cloud-dns-0.12.1-alpha-SNAPSHOT.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/google-http-client-protobuf-1.20.0.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/grpc-google-cloud-logging-v2-0.1.5.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/javax.inject-1.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/google-cloud-bigquery-0.12.1-beta-SNAPSHOT-tests.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/google-auth-library-credentials-0.6.1.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/google-cloud-storage-0.12.1-beta-SNAPSHOT-tests.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/guava-19.0.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/google-cloud-compute-0.12.1-alpha-SNAPSHOT.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/google-api-services-storage-v1-rev100-1.22.0.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/google-cloud-datastore-0.12.1-beta-SNAPSHOT.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/netty-tcnative-boringssl-static-1.1.33.Fork19.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/jackson-core-2.1.3.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/google-cloud-vision-0.12.1-beta-SNAPSHOT.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/google-cloud-resourcemanager-0.12.1-alpha-SNAPSHOT.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/grpc-protobuf-lite-1.0.3.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/google-cloud-speech-0.12.1-alpha-SNAPSHOT-tests.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/google-api-client-1.21.0.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/grpc-netty-1.0.3.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/datastore-v1-protos-1.3.0.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/google-cloud-translate-0.12.1-beta-SNAPSHOT.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/google-http-client-jackson2-1.19.0.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/netty-codec-4.1.6.Final.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/google-cloud-dns-0.12.1-alpha-SNAPSHOT-tests.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/commons-logging-1.1.1.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/google-api-services-translate-v2-rev47-1.22.0.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/grpc-google-cloud-speech-v1-0.1.6.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/google-cloud-errorreporting-0.12.1-alpha-SNAPSHOT.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/netty-codec-socks-4.1.6.Final.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/joda-time-2.9.2.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/grpc-core-1.0.3.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/grpc-google-iam-v1-0.1.5.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/objenesis-2.2.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/google-cloud-pubsub-0.12.1-alpha-SNAPSHOT-tests.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/google-cloud-logging-0.12.1-beta-SNAPSHOT-tests.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/google-cloud-monitoring-0.12.1-alpha-SNAPSHOT-tests.jar
file:/base/data/home/apps/s~vam-veneer/std-java8:1.400477007343946424/WEB-INF/lib/google-cloud-managed-test-0.12.1-alpha-SNAPSHOT.jar
file:/base/java8_runtime/conscrypt.jar
.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EEE
Time: 0.424
There were 33 failures:
1) testGet(com.google.cloud.datastore.it.ITDatastoreTest)
com.google.cloud.datastore.DatastoreException: java.lang.NoClassDefFoundError: com/google/appengine/api/urlfetch/HTTPMethod
at com.google.cloud.datastore.DatastoreException.translateAndThrow(DatastoreException.java:71)
at com.google.cloud.datastore.DatastoreImpl.commit(DatastoreImpl.java:408)
at com.google.cloud.datastore.DatastoreImpl.commitMutation(DatastoreImpl.java:392)
at com.google.cloud.datastore.DatastoreImpl.put(DatastoreImpl.java:352)
at com.google.cloud.datastore.it.ITDatastoreTest.setUp(ITDatastoreTest.java:150)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298)
at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoClassDefFoundError: com/google/appengine/api/urlfetch/HTTPMethod
at com.google.api.client.extensions.appengine.http.UrlFetchTransport.buildRequest(UrlFetchTransport.java:121)
at com.google.api.client.extensions.appengine.http.UrlFetchTransport.buildRequest(UrlFetchTransport.java:50)
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:863)
at com.google.datastore.v1.client.RemoteRpc.call(RemoteRpc.java:87)
at com.google.datastore.v1.client.Datastore.commit(Datastore.java:84)
at com.google.cloud.datastore.spi.v1.HttpDatastoreRpc.commit(HttpDatastoreRpc.java:152)
at com.google.cloud.datastore.DatastoreImpl$4.call(DatastoreImpl.java:402)
at com.google.cloud.datastore.DatastoreImpl$4.call(DatastoreImpl.java:399)
at com.google.api.gax.retrying.DirectRetryingExecutor.submit(DirectRetryingExecutor.java:92)
at com.google.cloud.RetryHelper.runWithRetries(RetryHelper.java:47)
at com.google.cloud.datastore.DatastoreImpl.commit(DatastoreImpl.java:398)
... 16 more
Caused by: java.lang.ClassNotFoundException: com.google.appengine.api.urlfetch.HTTPMethod
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
If I add the sdk explicitly in app's pom as dependency, then I get another set of errors:
.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EE.EEE
Time: 37.757
There were 33 failures:
1) testGet(com.google.cloud.datastore.it.ITDatastoreTest)
com.google.cloud.datastore.DatastoreException: I/O error
at com.google.cloud.datastore.spi.v1.HttpDatastoreRpc.translate(HttpDatastoreRpc.java:128)
at com.google.cloud.datastore.spi.v1.HttpDatastoreRpc.commit(HttpDatastoreRpc.java:154)
at com.google.cloud.datastore.DatastoreImpl$4.call(DatastoreImpl.java:402)
at com.google.cloud.datastore.DatastoreImpl$4.call(DatastoreImpl.java:399
```)
Right, adding the GAE SDK API jar in the pom dependency is the temporary solution to address ClassNotFoundException: com.google.appengine.api.urlfetch.HTTPMethod
Soon, a new Java8 GAE Standard runtime will make this addition irrelevant, but this is what you need to do for now. Now, I am not sure about the next one (com.google.cloud.datastore.DatastoreException: I/O error) but seems more Google Cloud APIs related than GAE Standard...
Testing is completed, closing the issue.
The discovered issues fixing for GAE Std Java8 will be tracked by https://github.com/GoogleCloudPlatform/google-cloud-java/issues/1918.
The memory issue will be tracked by: https://github.com/GoogleCloudPlatform/google-cloud-java/issues/1907