Skip to content
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

EurekaClient without Jersey throws unrecognized field exception #2756

Closed
MaxHoefl opened this issue Mar 5, 2018 · 14 comments
Closed

EurekaClient without Jersey throws unrecognized field exception #2756

MaxHoefl opened this issue Mar 5, 2018 · 14 comments
Milestone

Comments

@MaxHoefl
Copy link

MaxHoefl commented Mar 5, 2018

Hi,

I have an eureka server - demo-eurekaserver - and two registering services - demo-eurekaclient and demo-feignclient all using

  • spring-boot-starter-parent: 2.0.0.RELEASE
  • spring-cloud version: Finchley.BUILD-SNAPSHOT

One of the services (demo-feignclient) uses the eureka client dependency

      <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
        </dependency>

and registers fine.

The other service demo-eurekaclient uses the EuerkaClient dependency without jersey as documented here.
I had to include the version below because it complained about missing version (despite having followed the maven setup here

     <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-eureka</artifactId>
            <version>1.4.3.RELEASE</version>
            <exclusions>
                <exclusion>
                    <groupId>com.sun.jersey</groupId>
                    <artifactId>jersey-client</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.sun.jersey</groupId>
                    <artifactId>jersey-core</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.sun.jersey.contribs</groupId>
                    <artifactId>jersey-apache-client4</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

and it throws Unrecognized field "overriddenStatus" (class com.netflix.appinfo.InstanceInfo)

    ""2018-03-05 11:22:33 [restartedMain] DEBUG o.s.web.client.RestTemplate - Created GET request for "http://localhost:8762/eureka/apps/"
    ""2018-03-05 11:22:33 [restartedMain] DEBUG o.s.web.client.RestTemplate - Setting request Accept header to [application/json, application/json, application/*+json, application/*+json]
    ""2018-03-05 11:22:33 [restartedMain] DEBUG o.s.web.client.RestTemplate - GET request for "http://localhost:8762/eureka/apps/" resulted in 200 (null)
    ""2018-03-05 11:22:33 [restartedMain] DEBUG o.s.web.client.RestTemplate - Reading [class org.springframework.cloud.netflix.eureka.http.EurekaApplications] as "application/json" using [org.springframework.http.converter.json.MappingJackson2HttpMessageConverter@548e8b]
    ""2018-03-05 11:22:33 [restartedMain] ERROR c.n.d.s.t.d.RedirectingEurekaHttpClient - Request execution error
    "org.springframework.web.client.RestClientException: Error while extracting response for type [class org.springframework.cloud.netflix.eureka.http.EurekaApplications] and content type [application/json]; nested exception is org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Unrecognized field "overriddenStatus" (class com.netflix.appinfo.InstanceInfo), not marked as ignorable; nested exception is com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "overriddenStatus" (class com.netflix.appinfo.InstanceInfo), not marked as ignorable (28 known properties: "port", "healthCheckUrl", "appGroupName", "sid", "instanceId", "countryId", "hostName", "isCoordinatingDiscoveryServer", "vipAddress", "securePort", "secureHealthCheckUrl", "overridden_status", "asgName", "app", "overriddenstatus", "leaseInfo", "dataCenterInfo", "secureVipAddress", "metadata", "status", "ipAddr", "is_dirty", "homePageUrl", "statusPageUrl", "lastUpdatedTimestamp", "lastDirtyTimestamp", "actionType", "status_without_dirty"])
     at [Source: (PushbackInputStream); line: 1, column: 1184] (through reference chain: com.netflix.discovery.converters.jackson.builder.ApplicationsJacksonBuilder["application"]->java.util.ArrayList[0]->com.netflix.discovery.shared.Application["instance"]->java.util.ArrayList[0]->com.netflix.appinfo.InstanceInfo["overriddenStatus"])
    	at org.springframework.web.client.HttpMessageConverterExtractor.extractData(HttpMessageConverterExtractor.java:115) ~[spring-web-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    	at org.springframework.web.client.RestTemplate$ResponseEntityResponseExtractor.extractData(RestTemplate.java:1008) ~[spring-web-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    	at org.springframework.web.client.RestTemplate$ResponseEntityResponseExtractor.extractData(RestTemplate.java:991) ~[spring-web-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    	at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:732) ~[spring-web-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    	at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:686) ~[spring-web-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    	at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:602) ~[spring-web-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    	at org.springframework.cloud.netflix.eureka.http.RestTemplateEurekaHttpClient.getApplicationsInternal(RestTemplateEurekaHttpClient.java:148) ~[spring-cloud-netflix-eureka-client-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
    	at org.springframework.cloud.netflix.eureka.http.RestTemplateEurekaHttpClient.getApplications(RestTemplateEurekaHttpClient.java:137) ~[spring-cloud-netflix-eureka-client-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
    	at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$6.execute(EurekaHttpClientDecorator.java:137) [eureka-client-1.8.6.jar:1.8.6]
    	at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.executeOnNewServer(RedirectingEurekaHttpClient.java:118) ~[eureka-client-1.8.6.jar:1.8.6]
    	at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.execute(RedirectingEurekaHttpClient.java:79) ~[eureka-client-1.8.6.jar:1.8.6]
    	at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getApplications(EurekaHttpClientDecorator.java:134) [eureka-client-1.8.6.jar:1.8.6]
    	at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$6.execute(EurekaHttpClientDecorator.java:137) [eureka-client-1.8.6.jar:1.8.6]
    	at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:119) [eureka-client-1.8.6.jar:1.8.6]
    	at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getApplications(EurekaHttpClientDecorator.java:134) [eureka-client-1.8.6.jar:1.8.6]
    	at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$6.execute(EurekaHttpClientDecorator.java:137) [eureka-client-1.8.6.jar:1.8.6]
    	at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77) [eureka-client-1.8.6.jar:1.8.6]
    	at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getApplications(EurekaHttpClientDecorator.java:134) [eureka-client-1.8.6.jar:1.8.6]
    	at com.netflix.discovery.DiscoveryClient.getAndStoreFullRegistry(DiscoveryClient.java:1051) [eureka-client-1.8.6.jar:1.8.6]
    	at com.netflix.discovery.DiscoveryClient.fetchRegistry(DiscoveryClient.java:965) [eureka-client-1.8.6.jar:1.8.6]
    	at com.netflix.discovery.DiscoveryClient.<init>(DiscoveryClient.java:414) [eureka-client-1.8.6.jar:1.8.6]
    	at com.netflix.discovery.DiscoveryClient.<init>(DiscoveryClient.java:269) [eureka-client-1.8.6.jar:1.8.6]
    	at org.springframework.cloud.netflix.eureka.CloudEurekaClient.<init>(CloudEurekaClient.java:63) [spring-cloud-netflix-eureka-client-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
    	at org.springframework.cloud.netflix.eureka.EurekaClientAutoConfiguration$RefreshableEurekaClientConfiguration.eurekaClient(EurekaClientAutoConfiguration.java:269) [spring-cloud-netflix-eureka-client-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
    	at org.springframework.cloud.netflix.eureka.EurekaClientAutoConfiguration$RefreshableEurekaClientConfiguration$$EnhancerBySpringCGLIB$$2540b5ba.CGLIB$eurekaClient$1(<generated>) [spring-cloud-netflix-eureka-client-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
    	at org.springframework.cloud.netflix.eureka.EurekaClientAutoConfiguration$RefreshableEurekaClientConfiguration$$EnhancerBySpringCGLIB$$2540b5ba$$FastClassBySpringCGLIB$$23d02a53.invoke(<generated>) [spring-cloud-netflix-eureka-client-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
    	at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) [spring-core-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    	at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:361) [spring-context-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    	at org.springframework.cloud.netflix.eureka.EurekaClientAutoConfiguration$RefreshableEurekaClientConfiguration$$EnhancerBySpringCGLIB$$2540b5ba.eurekaClient(<generated>) [spring-cloud-netflix-eureka-client-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_102]
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_102]
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_102]
    	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_102]
    	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) [spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:579) [spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1250) [spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1099) [spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545) [spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:502) [spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$1(AbstractBeanFactory.java:348) [spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    	at org.springframework.cloud.context.scope.GenericScope$BeanLifecycleWrapper.getBean(GenericScope.java:384) ~[spring-cloud-context-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
    	at org.springframework.cloud.context.scope.GenericScope.get(GenericScope.java:183) ~[spring-cloud-context-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
    	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:345) [spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) [spring-beans-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    	at org.springframework.aop.target.SimpleBeanTargetSource.getTarget(SimpleBeanTargetSource.java:35) ~[spring-aop-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    	at org.springframework.cloud.netflix.eureka.serviceregistry.EurekaRegistration.getTargetObject(EurekaRegistration.java:167) ~[spring-cloud-netflix-eureka-client-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
    	at org.springframework.cloud.netflix.eureka.serviceregistry.EurekaRegistration.getEurekaClient(EurekaRegistration.java:156) ~[spring-cloud-netflix-eureka-client-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
    	at org.springframework.cloud.netflix.eureka.serviceregistry.EurekaServiceRegistry.maybeInitializeClient(EurekaServiceRegistry.java:57) ~[spring-cloud-netflix-eureka-client-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
    	at org.springframework.cloud.netflix.eureka.serviceregistry.EurekaServiceRegistry.register(EurekaServiceRegistry.java:39) ~[spring-cloud-netflix-eureka-client-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
    	at org.springframework.cloud.netflix.eureka.serviceregistry.EurekaAutoServiceRegistration.start(EurekaAutoServiceRegistration.java:80) ~[spring-cloud-netflix-eureka-client-2.0.0.BUILD-SNAPSHOT.jar:2.0.0.BUILD-SNAPSHOT]
    	at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:181) ~[spring-context-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    	at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:52) ~[spring-context-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    	at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:356) ~[spring-context-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    	at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:157) ~[spring-context-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    	at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:121) ~[spring-context-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    	at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:884) ~[spring-context-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:161) ~[spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]
    	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:552) ~[spring-context-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) ~[spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]
    	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:752) ~[spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]
    	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:388) ~[spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]
    	at org.springframework.boot.SpringApplication.run(SpringApplication.java:327) ~[spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]
    	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1246) ~[spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]
    	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1234) ~[spring-boot-2.0.0.RELEASE.jar:2.0.0.RELEASE]
    	at com.example.demo.DemoApplication.main(DemoApplication.java:19) ~[classes/:na]
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_102]
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_102]
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_102]
    	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_102]
    	at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) ~[spring-boot-devtools-2.0.0.RELEASE.jar:2.0.0.RELEASE]
    Caused by: org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Unrecognized field "overriddenStatus" (class com.netflix.appinfo.InstanceInfo), not marked as ignorable; nested exception is com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "overriddenStatus" (class com.netflix.appinfo.InstanceInfo), not marked as ignorable (28 known properties: "port", "healthCheckUrl", "appGroupName", "sid", "instanceId", "countryId", "hostName", "isCoordinatingDiscoveryServer", "vipAddress", "securePort", "secureHealthCheckUrl", "overridden_status", "asgName", "app", "overriddenstatus", "leaseInfo", "dataCenterInfo", "secureVipAddress", "metadata", "status", "ipAddr", "is_dirty", "homePageUrl", "statusPageUrl", "lastUpdatedTimestamp", "lastDirtyTimestamp", "actionType", "status_without_dirty"])
     at [Source: (PushbackInputStream); line: 1, column: 1184] (through reference chain: com.netflix.discovery.converters.jackson.builder.ApplicationsJacksonBuilder["application"]->java.util.ArrayList[0]->com.netflix.discovery.shared.Application["instance"]->java.util.ArrayList[0]->com.netflix.appinfo.InstanceInfo["overriddenStatus"])
    	at org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter.readJavaType(AbstractJackson2HttpMessageConverter.java:241) ~[spring-web-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    	at org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter.read(AbstractJackson2HttpMessageConverter.java:223) ~[spring-web-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    	at org.springframework.web.client.HttpMessageConverterExtractor.extractData(HttpMessageConverterExtractor.java:100) ~[spring-web-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    	... 69 common frames omitted
    Caused by: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "overriddenStatus" (class com.netflix.appinfo.InstanceInfo), not marked as ignorable (28 known properties: "port", "healthCheckUrl", "appGroupName", "sid", "instanceId", "countryId", "hostName", "isCoordinatingDiscoveryServer", "vipAddress", "securePort", "secureHealthCheckUrl", "overridden_status", "asgName", "app", "overriddenstatus", "leaseInfo", "dataCenterInfo", "secureVipAddress", "metadata", "status", "ipAddr", "is_dirty", "homePageUrl", "statusPageUrl", "lastUpdatedTimestamp", "lastDirtyTimestamp", "actionType", "status_without_dirty"])
     at [Source: (PushbackInputStream); line: 1, column: 1184] (through reference chain: com.netflix.discovery.converters.jackson.builder.ApplicationsJacksonBuilder["application"]->java.util.ArrayList[0]->com.netflix.discovery.shared.Application["instance"]->java.util.ArrayList[0]->com.netflix.appinfo.InstanceInfo["overriddenStatus"])
    	at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:60) ~[jackson-databind-2.9.3.jar:2.9.3]
    	at com.fasterxml.jackson.databind.DeserializationContext.handleUnknownProperty(DeserializationContext.java:822) ~[jackson-databind-2.9.3.jar:2.9.3]
    	at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:1152) ~[jackson-databind-2.9.3.jar:2.9.3]
    	at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1567) ~[jackson-databind-2.9.3.jar:2.9.3]
    	at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperties(BeanDeserializerBase.java:1521) ~[jackson-databind-2.9.3.jar:2.9.3]
    	at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeUsingPropertyBased(BeanDeserializer.java:503) ~[jackson-databind-2.9.3.jar:2.9.3]
    	at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1265) ~[jackson-databind-2.9.3.jar:2.9.3]
    	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:325) ~[jackson-databind-2.9.3.jar:2.9.3]
    	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:159) ~[jackson-databind-2.9.3.jar:2.9.3]
    	at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:285) ~[jackson-databind-2.9.3.jar:2.9.3]
    	at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:244) ~[jackson-databind-2.9.3.jar:2.9.3]
    	at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:27) ~[jackson-databind-2.9.3.jar:2.9.3]
    	at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:519) ~[jackson-databind-2.9.3.jar:2.9.3]
    	at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeWithErrorWrapping(BeanDeserializer.java:527) ~[jackson-databind-2.9.3.jar:2.9.3]
    	at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeUsingPropertyBased(BeanDeserializer.java:416) ~[jackson-databind-2.9.3.jar:2.9.3]
    	at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1265) ~[jackson-databind-2.9.3.jar:2.9.3]
    	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:325) ~[jackson-databind-2.9.3.jar:2.9.3]
    	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:159) ~[jackson-databind-2.9.3.jar:2.9.3]
    	at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:285) ~[jackson-databind-2.9.3.jar:2.9.3]
    	at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:244) ~[jackson-databind-2.9.3.jar:2.9.3]
    	at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:27) ~[jackson-databind-2.9.3.jar:2.9.3]
    	at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeSetAndReturn(MethodProperty.java:149) ~[jackson-databind-2.9.3.jar:2.9.3]
    	at com.fasterxml.jackson.databind.deser.BuilderBasedDeserializer.vanillaDeserialize(BuilderBasedDeserializer.java:269) ~[jackson-databind-2.9.3.jar:2.9.3]
    	at com.fasterxml.jackson.databind.deser.BuilderBasedDeserializer.deserialize(BuilderBasedDeserializer.java:193) ~[jackson-databind-2.9.3.jar:2.9.3]
    	at com.fasterxml.jackson.databind.ObjectMapper._unwrapAndDeserialize(ObjectMapper.java:4081) ~[jackson-databind-2.9.3.jar:2.9.3]
    	at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3999) ~[jackson-databind-2.9.3.jar:2.9.3]
    	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3072) ~[jackson-databind-2.9.3.jar:2.9.3]
    	at org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter.readJavaType(AbstractJackson2HttpMessageConverter.java:235) ~[spring-web-5.0.4.RELEASE.jar:5.0.4.RELEASE]
    	... 71 common frames omitted

Thanks for the help

@ryanjbaxter
Copy link
Contributor

@MaxHoefl
Copy link
Author

MaxHoefl commented Mar 22, 2018

I switched it for the correct artifactId but still get the same error

EDIT1When I set eureka.client.fetch-registry=false the client registers fine with the eureka server. So when fetching the registry it gets the instance info of the other applications which contains overriddenStatus which is unrecognized...

EDIT2 Could it have to do with the fact that in com.netflix.appinfo.InstanceInfo the field overriddenstatus is not provided in camel case but it tries to find a field "overriddenStatus" when deserializing the instance info?

@ryanjbaxter this could be a bug?

@ryanjbaxter
Copy link
Contributor

Possibly but I dont see where in your samples you are doing anything with overridenstatus

@MaxHoefl
Copy link
Author

@ryanjbaxter I am not using that field from com.netflix.appinfo.InstanceInfo but the DiscoveryClient.getAndStoreFullRegistry() reads the instances from localhost:port/eureka/apps and for some reason it tries to find overriddenStatus instead of overriddenstatus in InstanceInfo which throws an error.

I couldn't identify yet why it does that because when I look at localhost:port/eureka/apps it does not contains overriddenStatus but only overriddenstatus

thanks

@ryanjbaxter
Copy link
Contributor

I am trying to run your demo-eurekaclient sample to reproduce the problem but cant because of this dependency

		<dependency>
			<groupId>com.example</groupId>
			<artifactId>demo-commons</artifactId>
			<version>0.0.1-SNAPSHOT</version>
		</dependency>

@MaxHoefl
Copy link
Author

MaxHoefl commented Mar 23, 2018

@ryanjbaxter sorry, you can download demo-commons here

thanks very much for your help

@ryanjbaxter
Copy link
Contributor

The app is not compiling after building that app. I suggest you simplify your demo and remove the unnecessary components that are not needed to reproduce the issue.

@spencergibb
Copy link
Member

👍 to what ryan says. I am unable to replicate the problem with a minimal sample (created from start.spring.io). Please update your sample to be minimal.

@cody1996
Copy link

cody1996 commented Apr 5, 2018

@ryanjbaxter @spencergibb
Hello. I also encountered the same problem. You may try my demo.
I built a simplest one with spring boot to reproduce the issue here.
Look forward to your help.
thanks very much!

@ryanjbaxter
Copy link
Contributor

Thanks @cody1996, I was able to reproduce it. Looks like there was a change in the underlying Eureka server code. I have opened an issue there. I will leave this open until we have a fix there and can update the version of Eureka we are using.

@MrMarkW
Copy link

MrMarkW commented May 8, 2018

I am having the issue still with 2.0.0.RC1 when excluding the JerseyClient. The Spring Eureka Server and client are using the same versions. The client can register fine, but cannot pull the registry without this error.

[2018-05-08 11:28:08:729] [DEBUG] [DiscoveryClient-CacheRefreshExecutor-0] [org.springframework.web.client.RestTemplate] GET request for "http://eureka-az2.myhost.net/eureka/apps/" resulted in 200 (null)
[2018-05-08 11:28:08:729] [DEBUG] [DiscoveryClient-CacheRefreshExecutor-0] [org.springframework.web.client.RestTemplate] Reading [class org.springframework.cloud.netflix.eureka.http.EurekaApplications] as "application/json" using [org.springframework.http.converter.json.MappingJackson2HttpMessageConverter@6c52e15]
[2018-05-08 11:28:08:733] [ERROR] [DiscoveryClient-CacheRefreshExecutor-0] [com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient] Request execution error
org.springframework.web.client.RestClientException: Error while extracting response for type [class org.springframework.cloud.netflix.eureka.http.EurekaApplications] and content type [application/json]; nested exception is org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Unrecognized field "overriddenStatus" (class com.netflix.appinfo.InstanceInfo), not marked as ignorable; nested exception is com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "overriddenStatus" (class com.netflix.appinfo.InstanceInfo), not marked as ignorable (28 known properties: "port", "healthCheckUrl", "appGroupName", "sid", "instanceId", "countryId", "hostName", "isCoordinatingDiscoveryServer", "vipAddress", "securePort", "secureHealthCheckUrl", "overridden_status", "asgName", "app", "overriddenstatus", "leaseInfo", "dataCenterInfo", "secureVipAddress", "metadata", "status", "ipAddr", "is_dirty", "homePageUrl", "statusPageUrl", "lastUpdatedTimestamp", "lastDirtyTimestamp", "actionType", "status_without_dirty"])
 at [Source: (PushbackInputStream); line: 1, column: 1366] (through reference chain: com.netflix.discovery.converters.jackson.builder.ApplicationsJacksonBuilder["application"]->java.util.ArrayList[0]->com.netflix.discovery.shared.Application["instance"]->java.util.ArrayList[0]->com.netflix.appinfo.InstanceInfo["overriddenStatus"])
	at org.springframework.web.client.HttpMessageConverterExtractor.extractData(HttpMessageConverterExtractor.java:115)
	at org.springframework.web.client.RestTemplate$ResponseEntityResponseExtractor.extractData(RestTemplate.java:1000)
	at org.springframework.web.client.RestTemplate$ResponseEntityResponseExtractor.extractData(RestTemplate.java:983)
	at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:730)
	at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:684)
	at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:600)
	at org.springframework.cloud.netflix.eureka.http.RestTemplateEurekaHttpClient.getApplicationsInternal(RestTemplateEurekaHttpClient.java:152)
	at org.springframework.cloud.netflix.eureka.http.RestTemplateEurekaHttpClient.getApplications(RestTemplateEurekaHttpClient.java:140)
	at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$6.execute(EurekaHttpClientDecorator.java:137)
	at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.executeOnNewServer(RedirectingEurekaHttpClient.java:118)
	at com.netflix.discovery.shared.transport.decorator.RedirectingEurekaHttpClient.execute(RedirectingEurekaHttpClient.java:79)
	at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getApplications(EurekaHttpClientDecorator.java:134)
	at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$6.execute(EurekaHttpClientDecorator.java:137)
	at com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient.execute(RetryableEurekaHttpClient.java:120)
	at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getApplications(EurekaHttpClientDecorator.java:134)
	at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator$6.execute(EurekaHttpClientDecorator.java:137)
	at com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient.execute(SessionedEurekaHttpClient.java:77)
	at com.netflix.discovery.shared.transport.decorator.EurekaHttpClientDecorator.getApplications(EurekaHttpClientDecorator.java:134)
	at com.netflix.discovery.DiscoveryClient.getAndStoreFullRegistry(DiscoveryClient.java:1051)
	at com.netflix.discovery.DiscoveryClient.fetchRegistry(DiscoveryClient.java:965)
	at com.netflix.discovery.DiscoveryClient.refreshRegistry(DiscoveryClient.java:1471)
	at com.netflix.discovery.DiscoveryClient$CacheRefreshThread.run(DiscoveryClient.java:1438)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Unrecognized field "overriddenStatus" (class com.netflix.appinfo.InstanceInfo), not marked as ignorable; nested exception is com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "overriddenStatus" (class com.netflix.appinfo.InstanceInfo), not marked as ignorable (28 known properties: "port", "healthCheckUrl", "appGroupName", "sid", "instanceId", "countryId", "hostName", "isCoordinatingDiscoveryServer", "vipAddress", "securePort", "secureHealthCheckUrl", "overridden_status", "asgName", "app", "overriddenstatus", "leaseInfo", "dataCenterInfo", "secureVipAddress", "metadata", "status", "ipAddr", "is_dirty", "homePageUrl", "statusPageUrl", "lastUpdatedTimestamp", "lastDirtyTimestamp", "actionType", "status_without_dirty"])
 at [Source: (PushbackInputStream); line: 1, column: 1366] (through reference chain: com.netflix.discovery.converters.jackson.builder.ApplicationsJacksonBuilder["application"]->java.util.ArrayList[0]->com.netflix.discovery.shared.Application["instance"]->java.util.ArrayList[0]->com.netflix.appinfo.InstanceInfo["overriddenStatus"])
	at org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter.readJavaType(AbstractJackson2HttpMessageConverter.java:241)
	at org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter.read(AbstractJackson2HttpMessageConverter.java:223)
	at org.springframework.web.client.HttpMessageConverterExtractor.extractData(HttpMessageConverterExtractor.java:100)
	... 26 common frames omitted
Caused by: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "overriddenStatus" (class com.netflix.appinfo.InstanceInfo), not marked as ignorable (28 known properties: "port", "healthCheckUrl", "appGroupName", "sid", "instanceId", "countryId", "hostName", "isCoordinatingDiscoveryServer", "vipAddress", "securePort", "secureHealthCheckUrl", "overridden_status", "asgName", "app", "overriddenstatus", "leaseInfo", "dataCenterInfo", "secureVipAddress", "metadata", "status", "ipAddr", "is_dirty", "homePageUrl", "statusPageUrl", "lastUpdatedTimestamp", "lastDirtyTimestamp", "actionType", "status_without_dirty"])
 at [Source: (PushbackInputStream); line: 1, column: 1366] (through reference chain: com.netflix.discovery.converters.jackson.builder.ApplicationsJacksonBuilder["application"]->java.util.ArrayList[0]->com.netflix.discovery.shared.Application["instance"]->java.util.ArrayList[0]->com.netflix.appinfo.InstanceInfo["overriddenStatus"])
	at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:61)
	at com.fasterxml.jackson.databind.DeserializationContext.handleUnknownProperty(DeserializationContext.java:822)
	at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:1152)
	at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1582)
	at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperties(BeanDeserializerBase.java:1536)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeUsingPropertyBased(BeanDeserializer.java:504)
	at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1280)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:326)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:159)
	at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:286)
	at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:245)
	at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:27)
	at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:529)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeWithErrorWrapping(BeanDeserializer.java:528)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeUsingPropertyBased(BeanDeserializer.java:417)
	at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1280)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:326)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:159)
	at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:286)
	at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:245)
	at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:27)
	at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeSetAndReturn(MethodProperty.java:149)
	at com.fasterxml.jackson.databind.deser.BuilderBasedDeserializer.vanillaDeserialize(BuilderBasedDeserializer.java:269)
	at com.fasterxml.jackson.databind.deser.BuilderBasedDeserializer.deserialize(BuilderBasedDeserializer.java:193)
	at com.fasterxml.jackson.databind.ObjectMapper._unwrapAndDeserialize(ObjectMapper.java:4081)
	at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3999)
	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3072)
	at org.springframework.http.converter.json.AbstractJackson2HttpMessageConverter.readJavaType(AbstractJackson2HttpMessageConverter.java:235)
	... 28 common frames omitted
[2018-05-08 11:28:08:733] [WARN] [DiscoveryClient-CacheRefreshExecutor-0] [com.netflix.discovery.shared.transport.decorator.RetryableEurekaHttpClient] Request execution failed with message: Error while extracting response for type [class org.springframework.cloud.netflix.eureka.http.EurekaApplications] and content type [application/json]; nested exception is org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Unrecognized field "overriddenStatus" (class com.netflix.appinfo.InstanceInfo), not marked as ignorable; nested exception is com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "overriddenStatus" (class com.netflix.appinfo.InstanceInfo), not marked as ignorable (28 known properties: "port", "healthCheckUrl", "appGroupName", "sid", "instanceId", "countryId", "hostName", "isCoordinatingDiscoveryServer", "vipAddress", "securePort", "secureHealthCheckUrl", "overridden_status", "asgName", "app", "overriddenstatus", "leaseInfo", "dataCenterInfo", "secureVipAddress", "metadata", "status", "ipAddr", "is_dirty", "homePageUrl", "statusPageUrl", "lastUpdatedTimestamp", "lastDirtyTimestamp", "actionType", "status_without_dirty"])
 at [Source: (PushbackInputStream); line: 1, column: 1366] (through reference chain: com.netflix.discovery.converters.jackson.builder.ApplicationsJacksonBuilder["application"]->java.util.ArrayList[0]->com.netflix.discovery.shared.Application["instance"]->java.util.ArrayList[0]->com.netflix.appinfo.InstanceInfo["overriddenStatus"])

@ryanjbaxter
Copy link
Contributor

@maximusfloydus this should be fixed in Finchley.RC1, what version are you using?

@MrMarkW
Copy link

MrMarkW commented May 11, 2018

Yes, I am using Finchley.RC1 -> SpringCloudNetfix 2.0.0.RC1 -> Eureka-client 1.8.8. If you are not using Jersey client, I don't believe EurekaJacksonCodec.java is ever used. If I switch back to the Jersey1 client, it works fine. Of course, I have other conflicts with the Jersey client, that is why I stopped using it.

@ryanjbaxter
Copy link
Contributor

Then please open another issue with a sample that reproduces the problem

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

5 participants