# Google App Engine : java.lang.RuntimePermission

**URL:** https://discuss.aerospike.com/t/google-app-engine-java-lang-runtimepermission/691
**Category:** Requests
**Created:** [December 13, 2014, 2:24pm UTC](https://discuss.aerospike.com/t/google-app-engine-java-lang-runtimepermission/691 "2014-12-13T14:24:57Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![aftersunday](https://avatars.discourse-cdn.com/v4/letter/a/e19b73/32.png) [@aftersunday](https://discuss.aerospike.com/u/aftersunday)
#### Post date: [December 13, 2014, 2:24pm UTC](https://discuss.aerospike.com/t/google-app-engine-java-lang-runtimepermission/691/1 "2014-12-13T14:24:57Z")

</div>

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

```
AerospikeClient client = new AerospikeClient("xxx.xxx.xx.xx", 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);
	client.close();

```

Above code is ok when i use main function, but when i deploy to google app engine, i got error:

```
java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "modifyThreadGroup")
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:372)
at java.security.AccessController.checkPermission(AccessController.java:559)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at com.google.appengine.tools.development.DevAppServerFactory$CustomSecurityManager.checkPermission(DevAppServerFactory.java:429)
at com.google.appengine.tools.development.DevAppServerFactory$CustomSecurityManager.checkAccess(DevAppServerFactory.java:454)
at java.lang.ThreadGroup.checkAccess(ThreadGroup.java:315)
at java.lang.Thread.init(Thread.java:391)
at java.lang.Thread.init(Thread.java:349)
at java.lang.Thread.<init>(Thread.java:461)
at com.aerospike.client.cluster.Cluster.initTendThread(Cluster.java:163)
at com.aerospike.client.AerospikeClient.<init>(AerospikeClient.java:195)
at com.aerospike.client.AerospikeClient.<init>(AerospikeClient.java:160)

```

Any idea to solve this problem ? Thank you.

---

<div class="post-metadata">

### Author: ![anshu](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/anshu/32/27_2.png) [@anshu](https://discuss.aerospike.com/u/anshu)
#### Post date: [December 15, 2014, 1:30pm UTC](https://discuss.aerospike.com/t/google-app-engine-java-lang-runtimepermission/691/2 "2014-12-15T13:30:54Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![aftersunday](https://avatars.discourse-cdn.com/v4/letter/a/e19b73/32.png) [@aftersunday](https://discuss.aerospike.com/u/aftersunday)
#### Post date: [December 18, 2014, 6:41am UTC](https://discuss.aerospike.com/t/google-app-engine-java-lang-runtimepermission/691/3 "2014-12-18T06:41:04Z")

</div>

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

---

<div class="post-metadata">

### Author: ![anshu](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/anshu/32/27_2.png) [@anshu](https://discuss.aerospike.com/u/anshu)
#### Post date: [December 31, 2014, 1:44am UTC](https://discuss.aerospike.com/t/google-app-engine-java-lang-runtimepermission/691/4 "2014-12-31T01:44:44Z")

</div>

hi,

There is presently no timeline for a GAE compatible client.

---

<div class="post-metadata">

### Author: ![Biswajit\_Roy](https://avatars.discourse-cdn.com/v4/letter/b/df705f/32.png) [@Biswajit\_Roy](https://discuss.aerospike.com/u/Biswajit_Roy)
#### Post date: [September 30, 2015, 3:44am UTC](https://discuss.aerospike.com/t/google-app-engine-java-lang-runtimepermission/691/5 "2015-09-30T03:44:04Z")

</div>

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

com.google.apphosting.runtime.security.CustomSecurityManager.checkPermission(CustomSecurityManager.java:55)

this is really stupid.

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

---

<div class="post-metadata">

### Author: ![Mnemaudsyne](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.aerospike.com/mnemaudsyne/32/200_2.png) [@Mnemaudsyne](https://discuss.aerospike.com/u/Mnemaudsyne)
#### Post date: [October 2, 2015, 12:24am UTC](https://discuss.aerospike.com/t/google-app-engine-java-lang-runtimepermission/691/6 "2015-10-02T00:24:22Z")

</div>

@Biswajit_Roy,

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.
