Hello,

Sorry I saw that in my previous email the images were not included.
There are the errors I got :

- after installing the MCF plugin into Elasticsearch :

"stacktrace": ["org.elasticsearch.bootstrap.StartupException: 
ElasticsearchException[Could not find plugin class 
[org.apache.manifoldcf.elasticsearch.MCFAuthorizerPlugin]]; nested: 
ClassNotFoundException[org.apache.manifoldcf.elasticsearch.MCFAuthorizerPlugin];",
"at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:173) 
~[elasticsearch-7.17.24.jar:7.17.24]",
"at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:160) 
~[elasticsearch-7.17.24.jar:7.17.24]",
"at 
org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:77)
 ~[elasticsearch-7.17.24.jar:7.17.24]",
"at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:112) 
~[elasticsearch-cli-7.17.24.jar:7.17.24]",
"at org.elasticsearch.cli.Command.main(Command.java:77) 
~[elasticsearch-cli-7.17.24.jar:7.17.24]",
"at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:125) 
~[elasticsearch-7.17.24.jar:7.17.24]",
"at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:80) 
~[elasticsearch-7.17.24.jar:7.17.24]",
"Caused by: org.elasticsearch.ElasticsearchException: Could not find plugin 
class [org.apache.manifoldcf.elasticsearch.MCFAuthorizerPlugin]",
"at 
org.elasticsearch.plugins.PluginsService.loadPluginClass(PluginsService.java:779)
 ~[elasticsearch-7.17.24.jar:7.17.24]",
"at 
org.elasticsearch.plugins.PluginsService.loadBundle(PluginsService.java:738) 
~[elasticsearch-7.17.24.jar:7.17.24]",
"at 
org.elasticsearch.plugins.PluginsService.loadBundles(PluginsService.java:533) 
~[elasticsearch-7.17.24.jar:7.17.24]",
"at org.elasticsearch.plugins.PluginsService.<init>(PluginsService.java:170) 
~[elasticsearch-7.17.24.jar:7.17.24]",
"at org.elasticsearch.node.Node.<init>(Node.java:411) 
~[elasticsearch-7.17.24.jar:7.17.24]",
uncaught exception in thread [main]


About the build of the project 
https://github.com/apache/manifoldcf-integration-elasticsearch-5.5  we got this 
error with Maven and JDK 8 :

[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] 
/tmp/manifoldcf-integration-elasticsearch-5.5/src/main/java/org/apache/manifoldcf/elasticsearch/MCFAuthorizerPlugin.java:[50,23]
 error: cannot find symbol
[ERROR]  class MCFAuthorizerPlugin
/tmp/manifoldcf-integration-elasticsearch-5.5/src/main/java/org/apache/manifoldcf/elasticsearch/MCFAuthorizerPlugin.java:[50,14]
 error: onModule(RestModule) in MCFAuthorizerPlugin cannot override 
onModule(DiscoveryModule) in Plugin
[ERROR]   overridden method is final
/tmp/manifoldcf-integration-elasticsearch-5.5/src/main/java/org/apache/manifoldcf/elasticsearch/MCFAuthorizerRestSearchAction.java:[97,25]
 error: cannot find symbol
[ERROR]  variable searchRequest of type SearchRequest
/tmp/manifoldcf-integration-elasticsearch-5.5/src/main/java/org/apache/manifoldcf/elasticsearch/MCFAuthorizerRestSearchAction.java:[98,25]
 error: cannot find symbol
[ERROR]  variable searchRequest of type SearchRequest
/tmp/manifoldcf-integration-elasticsearch-5.5/src/main/java/org/apache/manifoldcf/elasticsearch/MCFAuthorizerRestSearchAction.java:[99,54]
 error: incompatible types: String cannot be converted to SearchSourceBuilder
[ERROR] 
/tmp/manifoldcf-integration-elasticsearch-5.5/src/main/java/org/apache/manifoldcf/elasticsearch/MCFAuthorizerRestSearchAction.java:[107,54]
 error: incompatible types: String cannot be converted to SearchSourceBuilder
[ERROR] 
/tmp/manifoldcf-integration-elasticsearch-5.5/src/main/java/org/apache/manifoldcf/elasticsearch/MCFAuthorizerRestSearchAction.java:[132,22]
 error: method parseSearchRequest in class RestSearchAction cannot be applied 
to given types;
[ERROR]  actual and formal argument lists differ in length
/tmp/manifoldcf-integration-elasticsearch-5.5/src/main/java/org/apache/manifoldcf/elasticsearch/MCFAuthorizerRestSearchAction.java:[246,27]
 error: cannot find symbol
[ERROR]  variable searchSourceBuilder of type SearchSourceBuilder
/tmp/manifoldcf-integration-elasticsearch-5.5/src/main/java/org/apache/manifoldcf/elasticsearch/MCFAuthorizerRestSearchAction.java:[255,31]
 error: cannot find symbol
[ERROR]  variable searchSourceBuilder of type SearchSourceBuilder
/tmp/manifoldcf-integration-elasticsearch-5.5/src/main/java/org/apache/manifoldcf/elasticsearch/MCFAuthorizerRestSearchAction.java:[344,65]
 error: incompatible types: String[] cannot be converted to List<String>
[ERROR] 
/tmp/manifoldcf-integration-elasticsearch-5.5/src/main/java/org/apache/manifoldcf/elasticsearch/MCFAuthorizerRestSearchAction.java:[356,166]
 error: method field in class SuggestionBuilder<T> cannot be applied to given 
types;
[ERROR]
    T extends SuggestionBuilder<T> declared in class SuggestionBuilder
/tmp/manifoldcf-integration-elasticsearch-5.5/src/main/java/org/apache/manifoldcf/elasticsearch/MCFAuthorizerRestSearchAction.java:[356,226]
 error: incompatible types: String cannot be converted to SuggestMode
[INFO] 12 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  11.863 s
[INFO] Finished at: 2024-10-25T09:17:20Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) 
on project elasticsearch-5.5-plugin-mcf: Compilation failure: Compilation 
failure:
[ERROR] 
/tmp/manifoldcf-integration-elasticsearch-5.5/src/main/java/org/apache/manifoldcf/elasticsearch/MCFAuthorizerPlugin.java:[50,23]
 error: cannot find symbol
[ERROR]  class MCFAuthorizerPlugin
[ERROR] 
/tmp/manifoldcf-integration-elasticsearch-5.5/src/main/java/org/apache/manifoldcf/elasticsearch/MCFAuthorizerPlugin.java:[50,14]
 error: onModule(RestModule) in MCFAuthorizerPlugin cannot override 
onModule(DiscoveryModule) in Plugin
[ERROR]   overridden method is final
[ERROR] 
/tmp/manifoldcf-integration-elasticsearch-5.5/src/main/java/org/apache/manifoldcf/elasticsearch/MCFAuthorizerRestSearchAction.java:[97,25]
 error: cannot find symbol
[ERROR]  variable searchRequest of type SearchRequest
[ERROR] 
/tmp/manifoldcf-integration-elasticsearch-5.5/src/main/java/org/apache/manifoldcf/elasticsearch/MCFAuthorizerRestSearchAction.java:[98,25]
 error: cannot find symbol
[ERROR]  variable searchRequest of type SearchRequest
[ERROR] 
/tmp/manifoldcf-integration-elasticsearch-5.5/src/main/java/org/apache/manifoldcf/elasticsearch/MCFAuthorizerRestSearchAction.java:[99,54]
 error: incompatible types: String cannot be converted to SearchSourceBuilder
[ERROR] 
/tmp/manifoldcf-integration-elasticsearch-5.5/src/main/java/org/apache/manifoldcf/elasticsearch/MCFAuthorizerRestSearchAction.java:[107,54]
 error: incompatible types: String cannot be converted to SearchSourceBuilder
[ERROR] 
/tmp/manifoldcf-integration-elasticsearch-5.5/src/main/java/org/apache/manifoldcf/elasticsearch/MCFAuthorizerRestSearchAction.java:[132,22]
 error: method parseSearchRequest in class RestSearchAction cannot be applied 
to given types;
[ERROR]  actual and formal argument lists differ in length
[ERROR] 
/tmp/manifoldcf-integration-elasticsearch-5.5/src/main/java/org/apache/manifoldcf/elasticsearch/MCFAuthorizerRestSearchAction.java:[246,27]
 error: cannot find symbol
[ERROR]  variable searchSourceBuilder of type SearchSourceBuilder
[ERROR] 
/tmp/manifoldcf-integration-elasticsearch-5.5/src/main/java/org/apache/manifoldcf/elasticsearch/MCFAuthorizerRestSearchAction.java:[255,31]
 error: cannot find symbol
[ERROR]  variable searchSourceBuilder of type SearchSourceBuilder
[ERROR] 
/tmp/manifoldcf-integration-elasticsearch-5.5/src/main/java/org/apache/manifoldcf/elasticsearch/MCFAuthorizerRestSearchAction.java:[344,65]
 error: incompatible types: String[] cannot be converted to List<String>
[ERROR] 
/tmp/manifoldcf-integration-elasticsearch-5.5/src/main/java/org/apache/manifoldcf/elasticsearch/MCFAuthorizerRestSearchAction.java:[356,166]
 error: method field in class SuggestionBuilder<T> cannot be applied to given 
types;
[ERROR]
[ERROR]     T extends SuggestionBuilder<T> declared in class SuggestionBuilder
[ERROR] 
/tmp/manifoldcf-integration-elasticsearch-5.5/src/main/java/org/apache/manifoldcf/elasticsearch/MCFAuthorizerRestSearchAction.java:[356,226]
 error: incompatible types: String cannot be converted to SuggestMode
[ERROR] -> [Help 1]


Best regards,

Olivier


Le 23 oct. 2024 à 20:50, Olivier Tavard <[email protected]> a écrit 
:

Hello,

We have some questions regarding the MCF ElasticSearch plugin.
We are currently working into the integration of OpenSearch with MCF. So far, 
we managed to launch a job and to send documents to OpenSearch (v 2.15)  
through the ElasticSearch output connector.
But now we would like to manage security too and so by using the MCF 
integration plugin.
We tested the jar included in MCF distribution into 
plugins/elasticsearch/elasticsearch-plugin-mcf-2.1.jar. We tested it first with 
OpenSearch and then into ES (v 7.17.24)  but we got the same error :
java.lang.ClassNotFoundException : 
org.apache.manifoldcf.elasticsearch.MCFAuthorizerPlugin

<error_es_mcf.jpg>

In order to build the plugin we added the jar and the 
plugin-descriptor.properties into a zip file and we installed it into ES and 
restarted it.
Did we miss some steps to load it successfully ?

We also tried to build the code of the project : 
https://github.com/apache/manifoldcf-integration-elasticsearch-5.5 but we got a 
build failure with this error :

<error_build_plugin.jpeg>

We had to change the source and tag versions of Maven compiler to 1.8 because 
it was 1.6 into the code.
Did we use the right project or is there a more recent one ? The last commit 
was 6 years ago.

Thank you,

Olivier

Reply via email to