Google App Engine : java.lang.RuntimePermission


My client: Google App Engine. Server: Compute Engine, Aerospike Installed.

AerospikeClient client = new AerospikeClient("", 3000);
	Key key = new Key("test", "demo", "putgetkey");
	Bin bin1 = new Bin("bin1", "value1");
	Bin bin2 = new Bin("bin2", "value2");

	// Write a record
	client.put(null, key, bin1, bin2);

	// Read a record
	Record record = client.get(null, key);

Above code is ok when i use main function, but when i deploy to google app engine, i got error: access denied ("java.lang.RuntimePermission" "modifyThreadGroup")
at java.lang.SecurityManager.checkPermission(
at java.lang.ThreadGroup.checkAccess(
at java.lang.Thread.init(
at java.lang.Thread.init(
at java.lang.Thread.<init>(
at com.aerospike.client.cluster.Cluster.initTendThread(
at com.aerospike.client.AerospikeClient.<init>(
at com.aerospike.client.AerospikeClient.<init>(

Any idea to solve this problem ? Thank you.


GAE does not allow front end instances (GAE instances) to spawn threads, and an attempt to do so results in AccessControlException.

You will need to run the Aerospike client on a GCE machine and then use your GAE application to connect to the GCE machine instead of running the Aerospike Client on GAE.

We are looking into it to see if we can make our client GAE compatible. The other way would be to create an app layer on top of the client on GCE and connect to it from your GAE app using single threaded calls.


I’ll waiting for your client GAE compatible. Thank you very much.



There is presently no timeline for a GAE compatible client.


I am using Webcam Capture library for my project which is using Thread and because of that I am getting

this is really stupid.

Now I have two options 1) Change the library or 2) replace GAE with something like Openshift etc.



Thank you for your interest in the GAE-compatible client.

Unfortunately, this is not something that we are planning to work on right now. Please use the aforementioned workaround in the meantime.