You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Pub/Sub give problem in AppEngine with Standard Environment with Java 7 #2405
Pub/Sub give problem in AppEngine with Standard Environment with Java 7
Hi, I have created Google PUB/SUB using topic. I get error in my Subscriber code. my code works on my local tomcat server but when I deployed it on Google cloud AppEngine with standard environment. It gives following error. Could not initialize class com.google.cloud.pubsub.v1.Subscriber
Initialization of Subscriber instance is failed on Google cloud AppEngine whereas Subscriber is initialized in local tomcat
com.google.cloud.pubsub.v1.Subscriber subscriber = Subscriber.defaultBuilder(subscription,receiver).build();
I did not get the answer of my question. I once again describe my problem in short. I have AppEngine with Standard Environment whenever I deploy my web app on AppEngine on standard environment, it gives me error as "java.lang.NoClassDefFoundError: Could not initialize class com.google.cloud.pubsub.v1.Subscriber" but same webapp application run fine on my local tomcat server. I want to know if AppEngine with Standard Environment supports com.google.cloud.pubsub.v1.Subscriber initialization or not?
java.io.IOException: Cannot run program "C:\jdk1.8.0_144\jre\bin\java.exe": Crea
teProcess error=206, The filename or extension is too long
Unable to update app: Cannot run program "C:\jdk1.8.0_144\jre\bin\java.exe": Cre
ateProcess error=206, The filename or extension is too long
Please see the logs [C:\Users\farhanm\AppData\Local\Temp\appcfg16888316327372592
11.log] for further information.
Activity
michaelbausor commentedon Sep 5, 2017
@neozwu can you comment on this?
ahzamfarhan commentedon Sep 11, 2017
I did not get the answer of my question. I once again describe my problem in short. I have AppEngine with Standard Environment whenever I deploy my web app on AppEngine on standard environment, it gives me error as "java.lang.NoClassDefFoundError: Could not initialize class com.google.cloud.pubsub.v1.Subscriber" but same webapp application run fine on my local tomcat server. I want to know if AppEngine with Standard Environment supports com.google.cloud.pubsub.v1.Subscriber initialization or not?
michaelbausor commentedon Sep 11, 2017
We do not expect PubSub (or other gRPC-based APIs) to work with Java 7 on AppEngine Standard. (See for example this comment).
It should work using Java 8 on AppEngine Standard.
It doesn't look like you have a direct dependency on the google-cloud-pubsub package (see here on github: https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-pubsub). If you are using Java 8 and seeing this problem, you could try adding this dependency.
ahzamfarhan commentedon Sep 11, 2017
Thanks michaelbauso,
AppEngine Standard by default uses jdk 7. I want to know to change AppEngine Standard to use jdk 8.
michaelbausor commentedon Sep 11, 2017
No worries! For Java 8, take a look at the documentation here: https://cloud.google.com/appengine/docs/standard/java/runtime-java8
ahzamfarhan commentedon Sep 11, 2017
I have followed the steps specified on URL https://cloud.google.com/appengine/docs/standard/java/runtime-java8 for changing from java 7 to java 8 for standard AppEngine. I am getting following error while executing command 'mvn appengine:update'
java.io.IOException: Cannot run program "C:\jdk1.8.0_144\jre\bin\java.exe": Crea
teProcess error=206, The filename or extension is too long
Unable to update app: Cannot run program "C:\jdk1.8.0_144\jre\bin\java.exe": Cre
ateProcess error=206, The filename or extension is too long
Please see the logs [C:\Users\farhanm\AppData\Local\Temp\appcfg16888316327372592
11.log] for further information.
lesv commentedon Sep 20, 2017
@ahzamfarhan Can you post a copy of your log? (if it doesn't have any confidential info in it)
lesv commentedon Sep 20, 2017
@ahzamfarhan Also, take a look at https://cloud.google.com/appengine/docs/standard/java/migrating-to-java8
for migration info.
anthmgoogle commentedon Nov 9, 2017
Looks like the original issue has been clarified. If there are issues with moving to Java8 it may be best to create a new issue.
chore(deps): update dependency com.google.cloud:libraries-bom to v26.…
deps: update dependency com.google.cloud:sdk-platform-java-config to …
chore(main): release 2.35.4 (googleapis#2400)
chore: make server streaming transformer safer (googleapis#2405)