+++
title = "Does Bonsai Support Groovy Scripting?"
weight = 87
updated = 2023-06-12
aliases = ["/docs/does-bonsai-support-groovy-scripting.html", "/docs/bonsai-api/faq/groovy-scripting/"]

[extra]
nav_title = "Groovy Scripting"
weight = 20
+++

The Groovy scripting language was introduced in Elasticsearch in version 1.4 as a replacement for [MVEL](https://en.wikipedia.org/wiki/MVEL). This replacement was supposed to address a number of security vulnerabilities in MVEL (among other things). However, Groovy also introduced some serious vulnerabilities that led to some [high profile attacks](https://www.theregister.co.uk/2015/03/10/elastic_search_vuln/).

While those specific vulnerabilities were ultimately patched, the decision was made that Groovy was not a safe option for multitenant configurations. As a result, Groovy scripting is only enabled for single tenant plans.

#### Groovy Errors

If your app returns errors containing `ExpressionScriptCompilationException`, it's likely that you need Groovy Scripting enabled on your cluster. This is a feature available on Dedicated and Enterprise plans. Users with a Business or Enterprise plan should contact us to get Groovy enabled. Users on our multitenant plans can still use dynamic scripting with the faster (but somewhat limited) [Lucene Expressions](https://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting-expression.html) language.
