# org.gradle.api.internal.tasks.compile.CompilationFailedException: Compilation failed with exit code 1; see the compiler error output for details

**URL:** <https://discuss.elastic.co/t/org-gradle-api-internal-tasks-compile-compilationfailedexception-compilation-failed-with-exit-code-1-see-the-compiler-error-output-for-details/106749>\
**Category:** Elasticsearch\
**Created:** [November 7, 2017, 7:46pm UTC](https://discuss.elastic.co/t/org-gradle-api-internal-tasks-compile-compilationfailedexception-compilation-failed-with-exit-code-1-see-the-compiler-error-output-for-details/106749 "2017-11-07T19:46:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jvemugunta](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jvemugunta/32/23908_2.png) [@jvemugunta](https://discuss.elastic.co/u/jvemugunta)\
**Post date:** [November 7, 2017, 7:46pm UTC](https://discuss.elastic.co/t/org-gradle-api-internal-tasks-compile-compilationfailedexception-compilation-failed-with-exit-code-1-see-the-compiler-error-output-for-details/106749/1 "2017-11-07T19:46:22Z")

</div>

I am extending the shield-custom-realm-example project ([https://github.com/elastic/shield-custom-realm-example](https://github.com/elastic/shield-custom-realm-example)) to support SSO for Siteminder integration. The Siteminder SSO component sends JWT as authorization header to elastic search. As I am writing a simple JWT class, I am running into issues. I need some help on the error

```auto
public class PublicKeyResolver extends SigningKeyResolverAdapter {

    public Key resolveSigningKey(JwsHeader header, Claims claims) {
        try {
            return JWTPublicKey.loadPublicKey(header.getKeyId());
        } catch (Exception e) {
           // e.printStackTrace();
        }
        return null;
    }

}

```

when I run gradle build, I get the below warning followed by error as

**org.gradle.api.internal.tasks.compile.CompilationFailedException: Compilation failed with exit code 1; see the compiler error output for details**

PublicKeyResolver.java:30: warning: [rawtypes] found raw type: JwsHeader  
public Key resolveSigningKey(JwsHeader header, Claims claims) {  
^  
missing type arguments for generic class JwsHeader  
where T is a type-variable:  
T extends JwsHeader declared in interface JwsHeader

---

<div class="post-metadata">

**Author:** ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)\
**Post date:** [November 10, 2017, 7:19am UTC](https://discuss.elastic.co/t/org-gradle-api-internal-tasks-compile-compilationfailedexception-compilation-failed-with-exit-code-1-see-the-compiler-error-output-for-details/106749/2 "2017-11-10T07:19:59Z")

</div>

The sample realm is built on top of Elasticsearch's existing gradle build infrastructure.

You can switch to your own build setup (maven, ant, whatever) if you prefer, there's nothing particularly special about the build requirements for the sample realm.

Our build infrastructure treats all compiler warnings as errors. So if your code generates a warning, the build fails.  
If you want to keep using our build tools, then you'll need to fix that warning.

---

<div class="post-metadata">

**Author:** ![jvemugunta](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jvemugunta/32/23908_2.png) [@jvemugunta](https://discuss.elastic.co/u/jvemugunta)\
**Post date:** [November 11, 2017, 2:20pm UTC](https://discuss.elastic.co/t/org-gradle-api-internal-tasks-compile-compilationfailedexception-compilation-failed-with-exit-code-1-see-the-compiler-error-output-for-details/106749/3 "2017-11-11T14:20:39Z")

</div>

Thank you Tim. This helps.

---

<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:** [December 9, 2017, 2:20pm UTC](https://discuss.elastic.co/t/org-gradle-api-internal-tasks-compile-compilationfailedexception-compilation-failed-with-exit-code-1-see-the-compiler-error-output-for-details/106749/4 "2017-12-09T14:20:40Z")

</div>

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