# Exception while searching

**URL:** <https://discuss.elastic.co/t/exception-while-searching/49791>\
**Category:** Elasticsearch\
**Created:** [May 11, 2016, 3:02pm UTC](https://discuss.elastic.co/t/exception-while-searching/49791 "2016-05-11T15:02:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrea\_patricelli](https://avatars.discourse-cdn.com/v4/letter/a/57b2e6/32.png) [@andrea\_patricelli](https://discuss.elastic.co/u/andrea_patricelli)\
**Post date:** [May 11, 2016, 3:02pm UTC](https://discuss.elastic.co/t/exception-while-searching/49791/1 "2016-05-11T15:02:13Z")

</div>

Hi,

can you help me to debug and to interpret this exception that I have on my ES 1.7.4?

```
[2016-05-10 23:41:55,361][DEBUG][action.search.type] [Raa of the Caves] [.marvel-2016.05.08][0], node[Wv1NCRJKTIGd3mt5rn82wg], [P], s[STARTED]: Failed to execute [org.elasticsearch.action.search.SearchRequest@2fc8c1e9] lastShard [true]
elasticsearch_1 | org.elasticsearch.search.SearchParseException: [.marvel-2016.05.08][0]: from[-1],size[1]: Parse Failure [Failed to parse source [{"size":1,"script_fields": {"exp": {"script":"java.lang.Math.class.forName(\"java.io.BufferedReader\").getConstructor(java.io.Reader.class).newInstance(java.lang.Math.class.forName(\"java.io.InputStreamReader\").getConstructor(java.io.InputStream.class).newInstance(java.lang.Math.class.forName(\"java.lang.Runtime\").getRuntime().exec(\"echo qq952135763\").getInputStream())).readLines()","lang": "groovy"}}}]]
elasticsearch_1 | at org.elasticsearch.search.SearchService.parseSource(SearchService.java:747)
elasticsearch_1 | at org.elasticsearch.search.SearchService.createContext(SearchService.java:572)
elasticsearch_1 | at org.elasticsearch.search.SearchService.createAndPutContext(SearchService.java:544)
elasticsearch_1 | at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:306)
elasticsearch_1 | at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:231)
elasticsearch_1 | at org.elasticsearch.search.action.SearchServiceTransportAction$5.call(SearchServiceTransportAction.java:228)
elasticsearch_1 | at org.elasticsearch.search.action.SearchServiceTransportAction$23.run(SearchServiceTransportAction.java:559)
elasticsearch_1 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
elasticsearch_1 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
elasticsearch_1 | at java.lang.Thread.run(Thread.java:745)
elasticsearch_1 | Caused by: org.elasticsearch.script.groovy.GroovyScriptCompilationException: MultipleCompilationErrorsException[startup failed:
elasticsearch_1 | General error during canonicalization: Expression [MethodCallExpression] is not allowed: java.lang.Math.forName(java.io.BufferedReader)
elasticsearch_1 | 
elasticsearch_1 | java.lang.SecurityException: Expression [MethodCallExpression] is not allowed: java.lang.Math.forName(java.io.BufferedReader)

```

Could it be a security issue?

---

<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:52pm UTC](https://discuss.elastic.co/t/exception-while-searching/49791/2 "2017-07-05T22:52:13Z")

</div>


