I want to use this java client library for Kubernetes from app engine. But I ran into issues because this client library uses okhttp client which doesn't work in app engine as per this link.
The error described in the previous SO link is the exact error I am getting on app engine.
As per this link, okhttp exposes the method which can be over-ridden such that this issue isn't seen. There is actually a library for this here. But the issue is that the OkHttpClient has been moved from package com.squareup.okhttp to okhttp3 from version 3.x onwards in which the changes that I require are present. This old version of okhttp is used in the Kubernetes client library and shows error if I try to set the new okhttp.
Is there any way to solve this issue? Or are there any other client libraries which can be used from app engine. I know of client from fabric8 but it has support only till kubernetes version 1.7.10 as of now. I still haven't tried it on app engine though.
Edit:
Even the fabric8 client has the same issue in app engine. It is trying to get the ProxySelector which is not a whitelisted class in appengine.
Alternatively, you could try the Java 8 runtime where you can use all the standard Java library, unlike the Java 7 runtime which allows only select whitelisted JRE classes. After all, the Java 7 runtime is now deprecated: https://cloud.google.com/appengine/docs/standard/java/runtime
However, do note that there are some differences, so you may want to take a look at the migration guide: https://cloud.google.com/appengine/docs/standard/java/migrating-to-java8
Related
I have a few Google App Engine standard Java environment applications that are backends for mobile apps, there are both Android and iOS clients.
Some time ago I received an email that the Cloud Endpoints v1 will be no longer supported and that I need to migrate to the new version v2.
What happens to the already existing (and using endpoints v1) mobile clients when I upgrade the version of the server?
My Android clients use maven-generated libs and the integration with iOS is based on discovery docs generated by another maven command.
I'm afraid that after the upgrade the clients will not be able to communicate with my backend anymore (as long as they do not update their libs / docs). As we cannot make the app-users upgrade their apps, I hope that the server changes will not affect all the clients that are already running on production.
No. It will not affect anything. The old version would not be supported after 2, August 2018. The new version has few benefits as given in the documentation.
Reduced request latency
Better integration with App Engine features (such as custom domains)
Official support for Guice configurations
Optionally, new API management features
Please follow the instructions given here. I have shifted to the new version just a few days ago and everything is working as usual.
There are several examples of configuring the service bus environment to use http/https with C#, using the call:
ServiceBusEnvironment.SystemConnectivity.Mode = ConnectivityMode.Http;
My question is - can and how do I do this via a java client?
The newer versions of the SDK (1.0 and later) do not support HTTP connectivity (AMQP only), and the older ones do not support AMQP (HTTP only). As a result there's no "need" for connectivity mode settings.
The Java SDK is AMQP only.
If http is what you want, try Azure SDK for Java older version, which is http only. It can be found at https://github.com/yvgopal/azure-sdk-for-java/blob/0.9/services/azure-servicebus/pom.xml. Be careful with the version of the package as the new AMQP only SDK also has the same package name. You should be good with any version starting with 0.9, but before 1.0. Also note that the SDKs are completely different. Applications written with one SDk don't work with the other SDK.
https://github.com/Azure/azure-service-bus-java/issues/171
I want to use Google Cloud App Engine (Java) to integrate with Facebook from Server side.
I understand that the following Web SDKs are available which can be potentially used:
Javascipt SDK (https://developers.facebook.com/docs/javascript)
PHP SDK (https://developers.facebook.com/docs/reference/php)
But I can't find any native server side Java SDK for Facebook.
Or we can directly use Facebook Graph API:
https://developers.facebook.com/docs/graph-api
What would be the best way to implement this?
Further investigation on the lead provided by #mhasan, found the following third-party Java SDKs have been acknowledged (Not endorsed or recommended) by Facebook:
Java (Spring) by Spring Social
Java (Blackberry) by RIM
Kinvey by Kinvey
RestFB by Mark Allen
We still have an implementation of this running on an old Tomcat java 1.5 box. Its used to sso for our own domain email via google
https://developers.google.com/google-apps/sso/saml_reference_implementation_web#file-and-directory-structure-for-saml-reference-code
I noticed there is a warning that this is old and no longer compatible. Is there an updated how to or sample that we can implement into an Ear file for websphere with java 1.6 ? I haven't been able to find anything yet. Thanks.
I am writing a GWT application and in that I am trying to make SSH connection to a server using private key. For this I am using J2SSH library. But, while executing this, I am getting the following error:
How can I make SSH connection to a remote server from GWT application server package? Please advice.
It looks like you are getting an Access Control issue with the application environment.
Here it is stated that
The problem occurs if you mistakenly enabled the Google App Engine feature for your project when you created the project, or at a later time during development, and have server-side libraries or classes packaged with your GWT application war folder that violate the Java App Engine sandbox."
You may also want to consider upgrading the J2SSH library, if you want a similar interface to J2SSH use the more recent J2SSH Maverick release from the same author (that is me btw).
This version of the API does not try to set any thread properties and therefore if you do need to run this in the Google App Engine you will have more success.