# Script\_lang not supported \[groovy\]

**URL:** <https://discuss.elastic.co/t/script-lang-not-supported-groovy/23397>\
**Category:** Elasticsearch\
**Created:** [April 25, 2015, 11:18am UTC](https://discuss.elastic.co/t/script-lang-not-supported-groovy/23397 "2015-04-25T11:18:52Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![terrasacer](https://avatars.discourse-cdn.com/v4/letter/t/ecd19e/32.png) [@terrasacer](https://discuss.elastic.co/u/terrasacer)\
**Post date:** [April 25, 2015, 11:18am UTC](https://discuss.elastic.co/t/script-lang-not-supported-groovy/23397/1 "2015-04-25T11:18:52Z")

</div>

While partial update with java api I get this error: Caused by:  
org.elasticsearch.ElasticsearchIllegalArgumentException: script\_lang not  
supported [groovy]

My es version 1.5.1

My code

client.prepareUpdate(index, type, documentID)

```
        .setScript("ctx._source.current=current; "
        + "ctx._source.updatedate=updatedate", ScriptService.ScriptType.

```

INLINE)  
.setScriptParams(updateObject).execute().actionGet();

updateObject variable is defined as follows.

private Map\<String, Object\> updateObject = new HashMap\<String, Object\>();

Help me please, what is problem?

--  
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/b3c83cad-ee94-46f9-8296-c87da825b1a6%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b3c83cad-ee94-46f9-8296-c87da825b1a6%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![terrasacer](https://avatars.discourse-cdn.com/v4/letter/t/ecd19e/32.png) [@terrasacer](https://discuss.elastic.co/u/terrasacer)\
**Post date:** [April 25, 2015, 11:29am UTC](https://discuss.elastic.co/t/script-lang-not-supported-groovy/23397/2 "2015-04-25T11:29:31Z")

</div>

I forgot to express. My project have got groovy dependency.

 org.codehaus.groovy groovy-all 2.3.5 jar

On Saturday, April 25, 2015 at 2:18:52 PM UTC+3, Terra Sacer wrote:

> While partial update with java api I get this error: Caused by:  
> org.elasticsearch.ElasticsearchIllegalArgumentException: script\_lang not  
> supported [groovy]
> 
> My es version 1.5.1
> 
> My code
> 
> client.prepareUpdate(index, type, documentID)
> 
> ```
> .setScript("ctx._source.current=current; "
> + "ctx._source.updatedate=updatedate", ScriptService.
> 
> ```
> 
> ScriptType.INLINE)  
> .setScriptParams(updateObject).execute().actionGet();
> 
> updateObject variable is defined as follows.
> 
> private Map\<String, Object\> updateObject = new HashMap\<String, Object\>();
> 
> Help me please, what is problem?

--  
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/889b18cd-8564-4601-8b36-28a74bcf4c55%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/889b18cd-8564-4601-8b36-28a74bcf4c55%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [April 25, 2015, 1:52pm UTC](https://discuss.elastic.co/t/script-lang-not-supported-groovy/23397/3 "2015-04-25T13:52:25Z")

</div>

Not sure it’s your issue but elasticsearch 1.5 uses Groovy 2.4.0

```
    <dependency>
        <groupId>org.codehaus.groovy</groupId>
        <artifactId>groovy-all</artifactId>
        <version>2.4.0</version>
    </dependency>

```

--  
David Pilato - Developer | Evangelist

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co/)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

@dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr [https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr) | @scrutmydocs [https://twitter.com/scrutmydocs](https://twitter.com/scrutmydocs)

> Le 25 avr. 2015 à 13:29, Terra Sacer [terrasacer@gmail.com](mailto:terrasacer@gmail.com) a écrit :
> 
> I forgot to express. My project have got groovy dependency.
> 
> org.codehaus.groovy groovy-all 2.3.5 jar
> 
> On Saturday, April 25, 2015 at 2:18:52 PM UTC+3, Terra Sacer wrote:  
> While partial update with java api I get this error: Caused by: org.elasticsearch.ElasticsearchIllegalArgumentException: script\_lang not supported [groovy]
> 
> My es version 1.5.1
> 
> My code
> 
> client.prepareUpdate(index, type, documentID)
> 
> ```
> .setScript("ctx._source.current=current; "
> + "ctx._source.updatedate=updatedate",ScriptService.ScriptType.INLINE)
> .setScriptParams(updateObject).execute().actionGet();
> 
> ```
> 
> updateObject variable is defined as follows.
> 
> private Map\<String, Object\> updateObject = new HashMap\<String,Object\>();
> 
> Help me please, what is problem?
> 
> --  
> 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) [mailto:elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/889b18cd-8564-4601-8b36-28a74bcf4c55%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/889b18cd-8564-4601-8b36-28a74bcf4c55%40googlegroups.com) [https://groups.google.com/d/msgid/elasticsearch/889b18cd-8564-4601-8b36-28a74bcf4c55%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/889b18cd-8564-4601-8b36-28a74bcf4c55%40googlegroups.com?utm_medium=email&utm_source=footer).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout) [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/C543ACDF-D9D6-433F-912D-9D8A7276CD60%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/C543ACDF-D9D6-433F-912D-9D8A7276CD60%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![terrasacer](https://avatars.discourse-cdn.com/v4/letter/t/ecd19e/32.png) [@terrasacer](https://discuss.elastic.co/u/terrasacer)\
**Post date:** [April 26, 2015, 12:25pm UTC](https://discuss.elastic.co/t/script-lang-not-supported-groovy/23397/4 "2015-04-26T12:25:00Z")

</div>

Yes David, the issue is not related to it.

I changed my code, but annoying can't find the root problem.

client.prepareUpdate(index, type, documentID).setDoc(updateObject).get();

On Saturday, April 25, 2015 at 4:52:48 PM UTC+3, David Pilato wrote:

> Not sure it’s your issue but elasticsearch 1.5 uses Groovy 2.4.0
> 
> ```
> <dependency>
> <groupId>org.codehaus.groovy</groupId>
> <artifactId>groovy-all</artifactId>
> <version>2.4.0</version>
> </dependency>
> 
> ```
> 
> --  
> _David Pilato_ - Developer | Evangelist  
> _[elastic.co](http://elastic.co) [http://elastic.co](http://elastic.co)_  
> @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr  
> [https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr) | @scrutmydocs  
> [https://twitter.com/scrutmydocs](https://twitter.com/scrutmydocs)
> 
> Le 25 avr. 2015 à 13:29, Terra Sacer \<[terra...@gmail.com](mailto:terra...@gmail.com) \<javascript:\>\> a  
> écrit :
> 
> I forgot to express. My project have got groovy dependency.
> 
> org.codehaus.groovy groovy-all 2.3.5 jar
> 
> On Saturday, April 25, 2015 at 2:18:52 PM UTC+3, Terra Sacer wrote:
> 
> > While partial update with java api I get this error: Caused by:  
> > org.elasticsearch.ElasticsearchIllegalArgumentException: script\_lang not  
> > supported [groovy]
> > 
> > My es version 1.5.1
> > 
> > My code
> > 
> > client.prepareUpdate(index, type, documentID)
> > 
> > ```
> > .setScript("ctx._source.current=current; "
> > + "ctx._source.updatedate=updatedate",ScriptService.
> > 
> > ```
> > 
> > ScriptType.INLINE)  
> > .setScriptParams(updateObject).execute().actionGet();
> > 
> > updateObject variable is defined as follows.
> > 
> > private Map\<String, Object\> updateObject = new HashMap\<String,Object\>();
> > 
> > Help me please, what is problem?
> 
> --  
> 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/889b18cd-8564-4601-8b36-28a74bcf4c55%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/889b18cd-8564-4601-8b36-28a74bcf4c55%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/889b18cd-8564-4601-8b36-28a74bcf4c55%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/889b18cd-8564-4601-8b36-28a74bcf4c55%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/1ef63e25-e438-41f1-b2f9-8a9f73687901%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/1ef63e25-e438-41f1-b2f9-8a9f73687901%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![shreyasbr](https://avatars.discourse-cdn.com/v4/letter/s/9de053/32.png) [@shreyasbr](https://discuss.elastic.co/u/shreyasbr)\
**Post date:** [March 8, 2016, 3:35pm UTC](https://discuss.elastic.co/t/script-lang-not-supported-groovy/23397/5 "2016-03-08T15:35:42Z")

</div>

Were you able to find a solution to this? I'm facing the same issue with ES 2.2.0  
I've tried using Groovy versions 2.3.2, 2.4.0 and 2.4.4

Thanks!

---

<div class="post-metadata">

**Author:** ![Brooks\_Brown](https://avatars.discourse-cdn.com/v4/letter/b/5f9b8f/32.png) [@Brooks\_Brown](https://discuss.elastic.co/u/Brooks_Brown)\
**Post date:** [July 26, 2016, 5:37pm UTC](https://discuss.elastic.co/t/script-lang-not-supported-groovy/23397/6 "2016-07-26T17:37:34Z")

</div>

Yes, hello ES?? I'm having the same problem with ES 2.3.4. What do I need to do to get groovy scripts to execute? The ES documentation is silent about this.

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [July 26, 2016, 5:52pm UTC](https://discuss.elastic.co/t/script-lang-not-supported-groovy/23397/7 "2016-07-26T17:52:09Z")

</div>

Reviving and old thread usually isn't the way to go.

Usually if groovy scripts aren't running it is because the module didn't load - when Elasticsearch starts up it logs all the modules it loaded. You should check there.

---

<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, 10:32pm UTC](https://discuss.elastic.co/t/script-lang-not-supported-groovy/23397/8 "2017-07-05T22:32:46Z")

</div>


