Skip to content

Missing required property for info requests #346

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
domantasVizinis opened this issue Jul 12, 2022 · 4 comments
Closed

Missing required property for info requests #346

domantasVizinis opened this issue Jul 12, 2022 · 4 comments

Comments

@domantasVizinis
Copy link

Java API client version

8.3.2

Java version

18

Elasticsearch Version

8.3.2

Problem description

Client info calls throws errors.

ElasticsearchClient.info()
Missing required property 'ElasticsearchVersionInfo.buildFlavor' (JSON path: version)
ElasticsearchClient.nodes().info()
Missing required property 'NodeInfoPath.repo' (JSON path: nodes['M-dm_DjWSY6HL6dLYrRovw'].settings.path)

@ylasri
Copy link

ylasri commented Jul 27, 2022

We have the same issue here when calling method ElasticsearchClient.info()

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2022-07-27 09:28:04.172 ERROR 1 --- [           main] o.s.boot.SpringApplication               : Application run failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bootstrapService' defined in URL [jar:file:/s-one-mediation-engine.jar!/BOOT-INF/classes!/co/synapticiel/sone/services/implementations/BootstrapService.class]: Invocation of init method failed; nested exception is co.elastic.clients.json.JsonpMappingException: Error deserializing co.elastic.clients.elasticsearch.core.InfoResponse: co.elastic.clients.util.MissingRequiredPropertyException: Missing required property 'ElasticsearchVersionInfo.buildFlavor' (JSON path: version) (line no=14, column no=4, offset=-1)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1786)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:602)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:524)
        at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:944)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:144)
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:769)
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:761)
        at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:426)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:326)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1313)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1302)
        at co.synapticiel.sone.SoneApplication.main(SoneApplication.java:11)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:564)
        at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:107)
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:58)
        at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88)
Caused by: co.elastic.clients.json.JsonpMappingException: Error deserializing co.elastic.clients.elasticsearch.core.InfoResponse: co.elastic.clients.util.MissingRequiredPropertyException: Missing required property 'ElasticsearchVersionInfo.buildFlavor' (JSON path: version) (line no=14, column no=4, offset=-1)
        at co.elastic.clients.json.JsonpMappingException.from0(JsonpMappingException.java:134)
        at co.elastic.clients.json.JsonpMappingException.from(JsonpMappingException.java:121)
        at co.elastic.clients.json.ObjectDeserializer.deserialize(ObjectDeserializer.java:206)
        at co.elastic.clients.json.ObjectDeserializer.deserialize(ObjectDeserializer.java:136)
        at co.elastic.clients.json.JsonpDeserializer.deserialize(JsonpDeserializer.java:75)
        at co.elastic.clients.json.ObjectBuilderDeserializer.deserialize(ObjectBuilderDeserializer.java:79)
        at co.elastic.clients.json.DelegatingDeserializer$SameType.deserialize(DelegatingDeserializer.java:43)
        at co.elastic.clients.transport.rest_client.RestClientTransport.decodeResponse(RestClientTransport.java:328)
        at co.elastic.clients.transport.rest_client.RestClientTransport.getHighLevelResponse(RestClientTransport.java:294)
        at co.elastic.clients.transport.rest_client.RestClientTransport.performRequest(RestClientTransport.java:147)
        at co.elastic.clients.elasticsearch.ElasticsearchClient.info(ElasticsearchClient.java:985)
        at co.synapticiel.sone.services.implementations.LicenseServiceImpl.canNodeBeProcessed(LicenseServiceImpl.java:111)
        at co.synapticiel.sone.services.implementations.LicenseServiceImpl$$FastClassBySpringCGLIB$$3f0c632d.invoke(<generated>)
        at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:779)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750)
        at org.springframework.cache.interceptor.CacheInterceptor.lambda$invoke$0(CacheInterceptor.java:54)
        at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:351)
        at org.springframework.cache.interceptor.CacheInterceptor.invoke(CacheInterceptor.java:64)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750)
        at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:692)
        at co.synapticiel.sone.services.implementations.LicenseServiceImpl$$EnhancerBySpringCGLIB$$bdb0d6d.canNodeBeProcessed(<generated>)
        at co.synapticiel.sone.services.implementations.NodeServiceImpl.processNodes(NodeServiceImpl.java:131)
        at co.synapticiel.sone.services.implementations.BootstrapService.afterPropertiesSet(BootstrapService.java:85)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1845)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1782)
        ... 25 common frames omitted
Caused by: co.elastic.clients.util.MissingRequiredPropertyException: Missing required property 'ElasticsearchVersionInfo.buildFlavor'
        at co.elastic.clients.util.ApiTypeHelper.requireNonNull(ApiTypeHelper.java:76)
        at co.elastic.clients.elasticsearch._types.ElasticsearchVersionInfo.<init>(ElasticsearchVersionInfo.java:75)
        at co.elastic.clients.elasticsearch._types.ElasticsearchVersionInfo.<init>(ElasticsearchVersionInfo.java:51)
        at co.elastic.clients.elasticsearch._types.ElasticsearchVersionInfo$Builder.build(ElasticsearchVersionInfo.java:307)
        at co.elastic.clients.elasticsearch._types.ElasticsearchVersionInfo$Builder.build(ElasticsearchVersionInfo.java:200)
        at co.elastic.clients.json.ObjectBuilderDeserializer.deserialize(ObjectBuilderDeserializer.java:80)
        at co.elastic.clients.json.DelegatingDeserializer$SameType.deserialize(DelegatingDeserializer.java:43)
        at co.elastic.clients.json.ObjectDeserializer$FieldObjectDeserializer.deserialize(ObjectDeserializer.java:71)
        at co.elastic.clients.json.ObjectDeserializer.deserialize(ObjectDeserializer.java:180)
        ... 50 common frames omitted

@ylasri
Copy link

ylasri commented Jul 27, 2022

@swallez Nous avons besoin de ton aide par ici

@ylasri
Copy link

ylasri commented Jul 27, 2022

Thanks @dadoonet for the work around
#335

I can see that the issue has been fixed and will be available in next release
elastic/elasticsearch#88318

@sethmlarson
Copy link
Contributor

Release is available now as 8.3.3, recommendation is to upgrade Elasticsearch. Going to close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants