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

I am extending the shield-custom-realm-example project (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

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

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.

Thank you Tim. This helps.

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