Similar problem has been discussed in the following topics:
But I don't find there how to solve my problem.
This comment suggests that it's a bug in Eclipse IDE: [BUG] You can use BulkProcessor with high-level client in 5.6 version - #9 by juanaramis
But I compile in another IDE, also I compile from command line using maven 3.0.4.
Here is an extract from my maven compilation log:
Apache Maven 3.0.4 (r1232337; 2012-01-17 12:44:56+0400)
Maven home: F:\1_Tools\apache-maven-3.0.4
Java version: 1.8.0_77, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.8.0_77\jre
Default locale: en_US, platform encoding: Cp1251
OS name: "windows 7", version: "6.1", arch: "amd64", family: "dos"
[INFO] Error stacktraces are turned on.
[DEBUG] Reading global settings from F:\1_Tools\apache-maven-3.0.4\conf\settings.xml
[DEBUG] Reading user settings from C:\...\.m2\settings.xml
[DEBUG] Using local repository at C:\m2
[DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10 for C:\m2
...
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /F:/GIT/0_Examples/test-bulkprocessor/src/main/java/com/rappahannock/elasticsearch/ESConfiguration.java: incompatible types: org.elasticsearch.client.Client is not a functional interface
multiple non-overriding abstract methods found in interface org.elasticsearch.client.Client
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.067s
[INFO] Finished at: Wed Jul 18 17:28:21 GET 2018
[INFO] Final Memory: 26M/306M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project test-bulkprocessor: Compilation failure
[ERROR] /F:/GIT/0_Examples/test-bulkprocessor/src/main/java/com/rappahannock/elasticsearch/ESConfiguration.java: incompatible types: org.elasticsearch.client.Client is not a functional interface
[ERROR] multiple non-overriding abstract methods found in interface org.elasticsearch.client.Client
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project test-bulkprocessor: Compilation failure
/F:/GIT/0_Examples/test-bulkprocessor/src/main/java/com/rappahannock/elasticsearch/ESConfiguration.java: incompatible types: org.elasticsearch.client.Client is not a functional interface
multiple non-overriding abstract methods found in interface org.elasticsearch.client.Client
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
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:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure
/F:/GIT/0_Examples/test-bulkprocessor/src/main/java/com/rappahannock/elasticsearch/ESConfiguration.java: incompatible types: org.elasticsearch.client.Client is not a functional interface
multiple non-overriding abstract methods found in interface org.elasticsearch.client.Client
at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:858)
at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:129)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more