# Shield Custom Realm for 2.4.4 - unable to compile after moving from 2.4.3

**URL:** <https://discuss.elastic.co/t/shield-custom-realm-for-2-4-4-unable-to-compile-after-moving-from-2-4-3/71740>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [January 16, 2017, 1:16pm UTC](https://discuss.elastic.co/t/shield-custom-realm-for-2-4-4-unable-to-compile-after-moving-from-2-4-3/71740 "2017-01-16T13:16:12Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yasho](https://avatars.discourse-cdn.com/v4/letter/y/c2a13f/32.png) [@Yasho](https://discuss.elastic.co/u/Yasho)\
**Post date:** [January 16, 2017, 1:16pm UTC](https://discuss.elastic.co/t/shield-custom-realm-for-2-4-4-unable-to-compile-after-moving-from-2-4-3/71740/1 "2017-01-16T13:16:12Z")

</div>

Hi,

I was using and modifying custom realm using 2.4.3 version of ES. However lately ES is now upgraded to 2.4.4, I just updated the POM.XML to 2.4.4 and after which i am getting series of compilation errors, Please help me identify the solution, below is the compilation error:

[INFO] -------------------------------------------------------------  
[ERROR] COMPILATION ERROR :  
[INFO] -------------------------------------------------------------  
[ERROR] E:\kudopo\customrealm\shield-custom-realm-example-2.4\src\main\java\org\elasticsearch\example\CustomRealmExamplePlugin.java:[24,37] error: cannot find symbol  
[ERROR] symbol: class AuthenticationModule  
location: package org.elasticsearch.shield.authc  
E:\kudopo\customrealm\shield-custom-realm-example-2.4\src\main\java\org\elasticsearch\example\CustomRealmExamplePlugin.java:[54,25] error: cannot find symbol  
[ERROR] symbol: class AuthenticationModule  
location: class CustomRealmExamplePlugin  
E:\kudopo\customrealm\shield-custom-realm-example-2.4\src\main\java\org\elasticsearch\example\realm\CustomCachingRealmFactory.java:[23,31] error: cannot find symbol  
[ERROR] symbol: class ShieldSettingsFilter  
location: package org.elasticsearch.shield  
E:\kudopo\customrealm\shield-custom-realm-example-2.4\src\main\java\org\elasticsearch\example\realm\CustomCachingRealmFactory.java:[24,37] error: cannot find symbol  
[ERROR] symbol: class Realm  
location: package org.elasticsearch.shield.authc  
E:\kudopo\customrealm\shield-custom-realm-example-2.4\src\main\java\org\elasticsearch\example\realm\CustomCachingRealmFactory.java:[25,37] error: cannot find symbol  
[ERROR] symbol: class RealmConfig  
location: package org.elasticsearch.shield.authc  
[ERROR] E:\kudopo\customrealm\shield-custom-realm-example-2.4\src\main\java\org\elasticsearch\example\realm\CustomAuthenticationFailureHandler.java:[94,4] error: method does not override or implement a method from a supertype  
[ERROR] E:\kudopo\customrealm\shield-custom-realm-example-2.4\src\main\java\org\elasticsearch\example\realm\CustomAuthenticationFailureHandler.java:[96,44] error: cannot find symbol[details=Summary]This text will be hidden[/details]  
[ERROR] symbol: variable super  
[ERROR] location: class CustomAuthenticationFailureHandler  
[ERROR] E:\kudopo\customrealm\shield-custom-realm-example-2.4\src\main\java\org\elasticsearch\example\realm\CustomRealmFactory.java:[50,4] error: method does not override or implement a method from a supertype  
[ERROR] E:\kudopo\customrealm\shield-custom-realm-example-2.4\src\main\java\org\elasticsearch\example\realm\CustomRealmFactory.java:[63,4] error: method does not override or implement a method from a supertype  
[ERROR] -\> [Help 1]  
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.3:compile (default-compile) on project shield-custom-realm-example: Compilation failure  
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)  
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)  
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)  
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)  
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)  
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)  
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)  
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)  
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)  
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)  
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)  
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)  
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)  
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)  
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)  
at java.lang.reflect.Method.invoke(Unknown Source)  
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)  
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)  
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)  
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)  
Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure  
at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:911)  
at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:129)  
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)  
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)  
... 20 more  
[ERROR]  
[ERROR]  
[ERROR] For more information about the errors and possible solutions, please read the following articles:  
[ERROR] [Help 1] [http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException](http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException)

---

<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:** [January 17, 2017, 4:37am UTC](https://discuss.elastic.co/t/shield-custom-realm-for-2-4-4-unable-to-compile-after-moving-from-2-4-3/71740/2 "2017-01-17T04:37:29Z")

</div>

It looks like there is a problem with the 2.4.4 shield jar in our maven repository.

We are working to fix that - thanks for letting us know.

---

<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:** [January 18, 2017, 4:28am UTC](https://discuss.elastic.co/t/shield-custom-realm-for-2-4-4-unable-to-compile-after-moving-from-2-4-3/71740/3 "2017-01-18T04:28:54Z")

</div>

The maven repository problem has been resolved.

You may need to clear the old jar from any repositories that have a copy of it.

On your local machine that's as simple as deleting the folder `.m2/repository/org/elasticsearch/plugin/shield/2.4.4/` from your home directory (something like `C:\Documents and Settings\{your-windows-login}\.m2\repository\` ... on windows).

If you are using a local repository manager (like Nexus or Artifactory) you will need to force a re-download there as well.

---

<div class="post-metadata">

**Author:** ![Yasho](https://avatars.discourse-cdn.com/v4/letter/y/c2a13f/32.png) [@Yasho](https://discuss.elastic.co/u/Yasho)\
**Post date:** [January 23, 2017, 7:36am UTC](https://discuss.elastic.co/t/shield-custom-realm-for-2-4-4-unable-to-compile-after-moving-from-2-4-3/71740/4 "2017-01-23T07:36:36Z")

</div>

@TimV  
Thanks for the reply and fixing the Build issues. I have completed the build and run the test however when i am installing the plugin in the ES i am getting this error.

![](https://us1.discourse-cdn.com/elastic/original/2X/f/f5e9b8d0eff8be78d938080df13d0d1bcd6e66d4.png)

; line: 102, column: 18]  
at com.fasterxml.jackson.dataformat.yaml.snakeyaml.error.MarkedYAMLException.from(MarkedYAMLException.java:27)  
at com.fasterxml.jackson.dataformat.yaml.YAMLParser.nextToken(YAMLParser.java:343)  
at org.elasticsearch.common.xcontent.json.JsonXContentParser.nextToken(JsonXContentParser.java:53)  
at org.elasticsearch.common.settings.loader.XContentSettingsLoader.serializeObject(XContentSettingsLoader.java:99)  
at org.elasticsearch.common.settings.loader.XContentSettingsLoader.serializeObject(XContentSettingsLoader.java:101)  
at org.elasticsearch.common.settings.loader.XContentSettingsLoader.serializeObject(XContentSettingsLoader.java:101)  
at org.elasticsearch.common.settings.loader.XContentSettingsLoader.serializeObject(XContentSettingsLoader.java:101)  
at org.elasticsearch.common.settings.loader.XContentSettingsLoader.serializeObject(XContentSettingsLoader.java:101)  
at org.elasticsearch.common.settings.loader.XContentSettingsLoader.load(XContentSettingsLoader.java:67)  
at org.elasticsearch.common.settings.loader.XContentSettingsLoader.load(XContentSettingsLoader.java:45)  
at org.elasticsearch.common.settings.loader.YamlSettingsLoader.load(YamlSettingsLoader.java:46)  
at org.elasticsearch.common.settings.Settings$Builder.loadFromStream(Settings.java:1080)  
... 3 more  
Caused by: mapping values are not allowed here  
in 'reader', line 102, column 18:  
users:  
^

```
    at org.yaml.snakeyaml.scanner.ScannerImpl.fetchValue(ScannerImpl.java:871)
    at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTokens(ScannerImpl.java:360)
    at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:226)
    at org.yaml.snakeyaml.parser.ParserImpl$ParseBlockMappingKey.produce(ParserImpl.java:558)
    at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:158)
    at org.yaml.snakeyaml.parser.ParserImpl.getEvent(ParserImpl.java:168)
    at com.fasterxml.jackson.dataformat.yaml.YAMLParser.nextToken(YAMLParser.java:340)
    ... 13 more

```

Can you help me identify the issue

---

<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:** [January 24, 2017, 5:14am UTC](https://discuss.elastic.co/t/shield-custom-realm-for-2-4-4-unable-to-compile-after-moving-from-2-4-3/71740/5 "2017-01-24T05:14:21Z")

</div>

It looks like you have inconsistent spacing in your YAML file.  
There appears to be an extra space in front of `users:`

In the future please post configuration files as code (i.e. preformatted text, using the `</>` button) rather than a screenshot.

---

<div class="post-metadata">

**Author:** ![Yasho](https://avatars.discourse-cdn.com/v4/letter/y/c2a13f/32.png) [@Yasho](https://discuss.elastic.co/u/Yasho)\
**Post date:** [January 24, 2017, 11:20am UTC](https://discuss.elastic.co/t/shield-custom-realm-for-2-4-4-unable-to-compile-after-moving-from-2-4-3/71740/6 "2017-01-24T11:20:21Z")

</div>

@TimV  
Thanks Tim, yes users: was the culprit. It works now.

---

<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:** [February 21, 2017, 11:20am UTC](https://discuss.elastic.co/t/shield-custom-realm-for-2-4-4-unable-to-compile-after-moving-from-2-4-3/71740/7 "2017-02-21T11:20:54Z")

</div>

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