# Compiling Ingest Plugin Fails

**URL:** <https://discuss.elastic.co/t/compiling-ingest-plugin-fails/204867>\
**Category:** Elasticsearch\
**Created:** [October 23, 2019, 12:18pm UTC](https://discuss.elastic.co/t/compiling-ingest-plugin-fails/204867 "2019-10-23T12:18:58Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![val](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/val/32/138203_2.png) [@val](https://discuss.elastic.co/u/val)\
**Post date:** [October 23, 2019, 12:18pm UTC](https://discuss.elastic.co/t/compiling-ingest-plugin-fails/204867/1 "2019-10-23T12:18:58Z")

</div>

I'm having a weird issue while trying to compile and package an ingest plugin for ES 7.4.0.

I started from @spinscale's [cookiecutter project template](https://github.com/spinscale/cookiecutter-elasticsearch-ingest-processor) and was able to properly create the project and implement the business logic.

However, when trying to compile the project using `gradle clean check` I get the following error:

```
> Task :generateGlobalBuildInfo FAILED

FAILURE: Build failed with an exception.

* What went wrong:

Execution failed for task ':generateGlobalBuildInfo'.

> The compiler java.home must be set to a JDK installation directory for Java 12 but is [/Library/Java/JavaVirtualMachines/jdk-11.0.4.jdk/Contents/Home] corresponding to [11]

* Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 597ms

1 actionable task: 1 executed 

```

I have Java 11 installed (as can be seen in the error message). Since Java 12 is EOL, it is impossible for me to install it. I have tried with Java 13, but I get a different error message:

```
FAILURE: Build completed with 2 failures.

1: Task failed with an exception.

-----------

* Where:

Build file '/Users/consulthys/workspaces/elasticsearch-ingest-h3/build.gradle' line: 18

* What went wrong:

A problem occurred evaluating root project 'ingest-h3'.

> Failed to apply plugin [class 'de.thetaphi.forbiddenapis.gradle.ForbiddenApisPlugin']

> Could not create plugin of type 'ForbiddenApisPlugin'.

> Could not initialize class de.thetaphi.forbiddenapis.gradle.ForbiddenApisPlugin

* Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

==============================================================================

2: Task failed with an exception.

-----------

* What went wrong:

A problem occurred configuring root project 'ingest-h3'.

> Must specify license and notice file for project :

* Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

==============================================================================

* Get more help at https://help.gradle.org

BUILD FAILED in 615ms

```

So it seems to require me to have Java 12, even though the [support matrix](https://www.elastic.co/support/matrix#matrix_jvm) explicitly states that Java 12 is not supported with 7.4.0, only Java 11 ad 13.

I'd appreciate if anyone could shed some light on this and how to resolve this issue, it's a bit frustrating.

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [October 23, 2019, 3:41pm UTC](https://discuss.elastic.co/t/compiling-ingest-plugin-fails/204867/2 "2019-10-23T15:41:05Z")

</div>

the java version should only be required for building, but you can still run elasticsearch and the plugin with java 8.

Forbidden APIs has just been released to properly support java 13, and was updated in the ES project only a few days ago. To me it seems that building the plugin with java 12 should be fine and run it with the java version you run Elasticsearch as.

hope that makes sense.

---

<div class="post-metadata">

**Author:** ![val](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/val/32/138203_2.png) [@val](https://discuss.elastic.co/u/val)\
**Post date:** [October 23, 2019, 5:24pm UTC](https://discuss.elastic.co/t/compiling-ingest-plugin-fails/204867/3 "2019-10-23T17:24:34Z")

</div>

Thank you for answering @spinscale .

The problem is that I have never installed Java 12 and since it's EOL it's not possible to install it any more. So as it stands, I cannot build the plugin with either Java 8, 11 or 13.

---

<div class="post-metadata">

**Author:** ![Tri\_Nhan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tri_nhan/32/56380_2.png) [@Tri\_Nhan](https://discuss.elastic.co/u/Tri_Nhan)\
**Post date:** [October 24, 2019, 2:45am UTC](https://discuss.elastic.co/t/compiling-ingest-plugin-fails/204867/4 "2019-10-24T02:45:26Z")

</div>

I have a same problem. Have you solved it yet?

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [October 24, 2019, 2:40pm UTC](https://discuss.elastic.co/t/compiling-ingest-plugin-fails/204867/5 "2019-10-24T14:40:02Z")

</div>

Small workaround around the installation issue: Using `sdkman` installing java 12 is just a single command away. `sdk install java 12.0.2-open`. You can use `sdk list java` to list possible installation candidates.

You can get sdkman at [https://sdkman.io](https://sdkman.io/)

---

<div class="post-metadata">

**Author:** ![val](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/val/32/138203_2.png) [@val](https://discuss.elastic.co/u/val)\
**Post date:** [October 24, 2019, 3:18pm UTC](https://discuss.elastic.co/t/compiling-ingest-plugin-fails/204867/6 "2019-10-24T15:18:26Z")

</div>

Thanks Alexander. That actually did the trick, I could install Java 12, build the plugin and install it on Elastic Cloud 👍

I still think this is not the best way and that the plugin building process deserves to be better organized.

Thanks a lot for your help, though, much appreciated!

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [October 25, 2019, 1:12pm UTC](https://discuss.elastic.co/t/compiling-ingest-plugin-fails/204867/7 "2019-10-25T13:12:27Z")

</div>

Please don't hesitate to open a github issue with the issues you had to get up and running, I think it is worthwhile to share. If you have any suggestions do better organize that process, please add them as well.

Much appreciated! Have a good weekend!

---

<div class="post-metadata">

**Author:** ![val](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/val/32/138203_2.png) [@val](https://discuss.elastic.co/u/val)\
**Post date:** [October 25, 2019, 2:10pm UTC](https://discuss.elastic.co/t/compiling-ingest-plugin-fails/204867/8 "2019-10-25T14:10:16Z")

</div>

Sure will do!

In the meantime, if anyone is interested in that ingest plugin (for generating [Uber H3](https://uber.github.io/h3/#/) hexagonal geo indexes), it has been announced here:

> [@\[ANNOUNCEMENT\] ingest-h3 plugin released](https://discuss.elastic.co/t/announcement-ingest-h3-plugin-released/205275):
>
> A new ingest processor plugin named ingest-h3 has been released. This plugin provides support for generating [Uber H3 geo indexes](https://uber.github.io/h3/#/) from a given geo location point at given resolutions. Uber H3 is an hexagonal hierarchical geospatial indexing system, which partitions the space into an hexagonal grid (as opposed to rectangular grid with conventional geohashes). It is worth noting that this plugin only allows to generate the indexes (simple keywords) within an ingest pipeline, but doesn't add any ad…

---

<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:** [November 22, 2019, 2:10pm UTC](https://discuss.elastic.co/t/compiling-ingest-plugin-fails/204867/9 "2019-11-22T14:10:16Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
