Uploaded image for project: 'Apache Curator'
  1. Apache Curator
  2. CURATOR-63

ServiceCacheImpl doesn't check if service name is null

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.2.0-incubating
    • Fix Version/s: 2.3.0
    • Component/s: Recipes
    • Labels:
      None

      Description

      If not giving a service name with ServiceCacheBuilder.name() the ServiceCache throws a weird Exception later on, because it wants to fetch data from the service group node instead of the service instance node:

      Exception in thread "main" 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:178)
      at org.apache.curator.x.discovery.details.ServiceCacheImpl.start(ServiceCacheImpl.java:81)

        Attachments

        1. CURATOR-63.patch
          0.9 kB
          Nandor Kracser

          Activity

            People

            • Assignee:
              randgalt Jordan Zimmerman
              Reporter:
              bonifaido Nandor Kracser
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: