# TransportClient on Google app engine

**URL:** <https://discuss.elastic.co/t/transportclient-on-google-app-engine/9972>\
**Category:** Elasticsearch\
**Created:** [December 6, 2012, 3:20pm UTC](https://discuss.elastic.co/t/transportclient-on-google-app-engine/9972 "2012-12-06T15:20:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![q42jaap](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/q42jaap/32/2241_2.png) [@q42jaap](https://discuss.elastic.co/u/q42jaap)\
**Post date:** [December 6, 2012, 3:20pm UTC](https://discuss.elastic.co/t/transportclient-on-google-app-engine/9972/1 "2012-12-06T15:20:48Z")

</div>

I was trying to see what I would run into when I would run the  
TransportClient on Google app engine (to connect to Elasticsearch as a  
service somewhere).

I un into a restricted class error almost emediately so it's not really  
going to work unfortunately:

Error injecting constructor, java.lang.NoClassDefFoundError: sun.misc.Unsafe is a restricted class. Please see the Google App Engine developer's guide for more details.  
at org.elasticsearch.threadpool.ThreadPool.(Unknown Source)  
while locating org.elasticsearch.threadpool.ThreadPool  
Caused by: java.lang.NoClassDefFoundError: sun.misc.Unsafe is a restricted class. Please see the Google App Engine developer's guide for more details.

Has somebody done any research as to how you could run Elasticsearch e.g.  
on Compute Engine and connect to it from google appengine?

--

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [December 7, 2012, 12:14am UTC](https://discuss.elastic.co/t/transportclient-on-google-app-engine/9972/2 "2012-12-07T00:14:10Z")

</div>

You will have a very hard time to get a TransportClient working on GAE due  
to the sandbox restrictions outlined  
in [https://developers.google.com/appengine/docs/java/runtime#The\_Sandbox](https://developers.google.com/appengine/docs/java/runtime#The_Sandbox)

The most promising approach would be a complete rewrite of a Java client,  
simplifying the TransportClient, by utilizing the HTTP URL methods of the  
GAE SDK instead of Netty and the related thread pooling, and mimicking a  
single-threaded HTTP REST client.

Jörg

--

---

<div class="post-metadata">

**Author:** ![Michael\_Sander](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/michael_sander/32/838_2.png) [@Michael\_Sander](https://discuss.elastic.co/u/Michael_Sander)\
**Post date:** [January 20, 2014, 9:21am UTC](https://discuss.elastic.co/t/transportclient-on-google-app-engine/9972/3 "2014-01-20T09:21:07Z")

</div>

I got Elastic Search working on Google App Engine using the python API. It  
was not easy, but now that it's setup it works great.

On Thursday, December 6, 2012 7:14:10 PM UTC-5, Jörg Prante wrote:

> You will have a very hard time to get a TransportClient working on GAE due  
> to the sandbox restrictions outlined in  
> [Java on Google App Engine &nbsp;|&nbsp; App Engine Documentation &nbsp;|&nbsp; Google Cloud](https://developers.google.com/appengine/docs/java/runtime#The_Sandbox)
> 
> The most promising approach would be a complete rewrite of a Java client,  
> simplifying the TransportClient, by utilizing the HTTP URL methods of the  
> GAE SDK instead of Netty and the related thread pooling, and mimicking a  
> single-threaded HTTP REST client.
> 
> Jörg

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/3cf35e58-d35f-470f-85b7-52036f6ed03a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/3cf35e58-d35f-470f-85b7-52036f6ed03a%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:55am UTC](https://discuss.elastic.co/t/transportclient-on-google-app-engine/9972/4 "2017-07-06T01:55:55Z")

</div>


