# Template Query on embedded server results in "script\_lang not supported \[mustache\]"

**URL:** <https://discuss.elastic.co/t/template-query-on-embedded-server-results-in-script-lang-not-supported-mustache/38765>\
**Category:** Elasticsearch\
**Created:** [January 8, 2016, 11:55pm UTC](https://discuss.elastic.co/t/template-query-on-embedded-server-results-in-script-lang-not-supported-mustache/38765 "2016-01-08T23:55:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidbkemp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidbkemp/32/594_2.png) [@davidbkemp](https://discuss.elastic.co/u/davidbkemp)\
**Post date:** [January 8, 2016, 11:55pm UTC](https://discuss.elastic.co/t/template-query-on-embedded-server-results-in-script-lang-not-supported-mustache/38765/1 "2016-01-08T23:55:05Z")

</div>

We use an embedded Elasticsearch within our Java integration tests, but upon upgrading to Elasticsearch 2 we are getting the following error on our Template Queries:

[{"type":"illegal\_argument\_exception","reason":"script\_lang not supported [mustache]"}]

Template Query works fine on a stand-alone server.

Our maven dependencies have been set up with:

```auto
groupId: org.elasticsearch
artifactId: elasticsearch
version: 2.1.1

```

The code to start the embedded server looks more or less like this:

```auto
settings = Settings.settingsBuilder()
    .put("path.home", dataDir.toString)
    .put("cluster.name", clusterName)
    .put("http.enabled", "true")
    .put("http.port", httpPort)
    .put("transport.tcp.port", PortFinder.random())
    .build();

nodeBuilder().local(true).settings(settings).build().start()

```

Anyone else having this sort of problem?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 9, 2016, 10:25am UTC](https://discuss.elastic.co/t/template-query-on-embedded-server-results-in-script-lang-not-supported-mustache/38765/2 "2016-01-09T10:25:47Z")

</div>

I can reproduce your issue.

I fixed it by adding this to my project:

> <https://github.com/elastic/elasticsearch/blob/2.1/pom.xml#L305-L309>

---

<div class="post-metadata">

**Author:** ![davidbkemp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidbkemp/32/594_2.png) [@davidbkemp](https://discuss.elastic.co/u/davidbkemp)\
**Post date:** [January 9, 2016, 10:04pm UTC](https://discuss.elastic.co/t/template-query-on-embedded-server-results-in-script-lang-not-supported-mustache/38765/3 "2016-01-09T22:04:02Z")

</div>

Thanks worked. Thanks for that.

---

<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 5, 2017, 11:25pm UTC](https://discuss.elastic.co/t/template-query-on-embedded-server-results-in-script-lang-not-supported-mustache/38765/4 "2017-07-05T23:25:44Z")

</div>


