Guice @Inject problems when upgrading plugin to 6.1.0

Hi,
I am working on upgrading the learning to rank plugin from 5.6.x to 6.1.0. I was able to get the code compiling again, running the unit tests works as well. Next step is booting elasticsearch, installing the plugin and run the integration tests. The problem is starting elasticsearch after installing the plugin. I get a few of these kind of exceptions:

Could not find a suitable constructor in com.o19s.es.ltr.feature.store.index.Caches. Classes must have either one (and only one) constructor annotated with @Inject or a zero-argument constructor that is not private.

The weird part is that I did not touch this class Caches. I read about making sure to use the right versions of elasticsearch and lucene. I am using 6.1.0 for elasticsearch and 7.1.0 for Lucene. Does anyone have suggestions how to progress?

If you want to try it out, my branch can be found here: https://github.com/jettro/elasticsearch-learning-to-rank/tree/1_0-es6.1

thanks

That plugin is not maintained by Elastic. You should ask the plugin author.But in general, glancing at the code, it does not look like Caches it bound in guice, so you won't be able to get a reference to it via injection.

Thanks for looking, I understand it is not an elastic problem. But as I only have the problem when trying to upgrade to elastic 6 I was hoping someone would have had the same problem and could give me a pointer to a resolution.

One of the original authors of the plugin noticed I had removed the createComponents methods from the plugin. I commented it as the signature changed, I forgot to look if there is an alternative. I needed the components to be constructed with Guice interfering. Re-enabling the method fixes my problem.

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