curator-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rahul Shrivastava <rshrivast...@salesforce.com>
Subject java.io.EOFException: No content to map to Object due to end of input
Date Sat, 18 Mar 2017 00:10:11 GMT
Hi All,

I am running into this exception with the below code. Any pointers ? I do
not have any null values for path or service name .

2017-03-17 17:05:23,478 ERROR [main]
org.apache.phoenix.loadbalancer.service.LoadBalancer(40): Exception while
creating a zookeeper service discoverer
java.io.EOFException: No content to map to Object due to end of input
at
org.codehaus.jackson.map.ObjectMapper._initForReading(ObjectMapper.java:2766)
at
org.codehaus.jackson.map.ObjectMapper._readMapAndClose(ObjectMapper.java:2709)
at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1964)
at
org.apache.curator.x.discovery.details.JsonInstanceSerializer.deserialize(JsonInstanceSerializer.java:50)
at
org.apache.curator.x.discovery.details.ServiceCacheImpl.addInstance(ServiceCacheImpl.java:193)
at
org.apache.curator.x.discovery.details.ServiceCacheImpl.start(ServiceCacheImpl.java:96)
at
org.apache.curator.x.discovery.details.ServiceProviderImpl.start(ServiceProviderImpl.java:67)
at
org.apache.phoenix.loadbalancer.zookeeper.ZookeeperServiceDiscoverer.<init>(ZookeeperServiceDiscoverer.java:74)
at
org.apache.phoenix.loadbalancer.service.LoadBalancer.<init>(LoadBalancer.java:38)
at
org.apache.phoenix.loadbalancer.service.LoadBalancer.<clinit>(LoadBalancer.java:32)
at
org.apache.phoenix.end2end.LoadBalancerEnd2End.setup(LoadBalancerEnd2End.java:93)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)



*Code:*

this.basePath = basePath;
this.serviceName = serviceName;
client = CuratorFrameworkFactory.newClient(zookeeperConnectString, retryPolicy);
client.start();
JsonInstanceSerializer<Instance> serializer = new
JsonInstanceSerializer<>(Instance.class);
serviceDiscovery =
ServiceDiscoveryBuilder.builder(Instance.class).client(client)
        .basePath(this.basePath).serializer(serializer).build();
serviceDiscovery.start();
provider = serviceDiscovery.serviceProviderBuilder().serviceName(this.serviceName)
        .providerStrategy(new RoundRobinStrategy<Instance>()).build();
provider.start();
closeAbles.add(provider);
closeAbles.add(serviceDiscovery);
closeAbles.add(client);


My pom has following dependencies

curator version is 2.11.1

<dependency>
  <groupId>org.apache.curator</groupId>
  <artifactId>curator-framework</artifactId>
</dependency>
<dependency>
  <groupId>org.apache.curator</groupId>
  <artifactId>curator-x-discovery</artifactId>
</dependency>
<dependency>
    <groupId>org.apache.curator</groupId>
    <artifactId>curator-test</artifactId>
</dependency>
<dependency>
  <groupId>org.apache.curator</groupId>
  <artifactId>curator-client</artifactId>
</dependency>

Mime
View raw message