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

DiscoveryService fatal error on deserializing an empty byte[] as JSON

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 5.0.0
    • 5.1.0
    • Recipes
    • None

    Description

      Below you can see the error in 5.0.0 tests, but I have seen this error on a client application. The error seems a blocker for the upgrade to 5.0.0

      ERROR org.apache.curator.framework.listen.MappingListenerManager  Listener (org.apache.curator.framework.recipes.cache.CuratorCacheListenerBuilderImpl$2@329dbdbf) threw an exception [Curator-SafeNotifyService-0]
      java.lang.RuntimeException: java.lang.RuntimeException: com.fasterxml.jackson.databind.exc.MismatchedInputException: No content to map due to end-of-input
       at [Source: (byte[])""; line: 1, column: 0]
      	at org.apache.curator.framework.recipes.cache.PathChildrenCacheListenerWrapper.sendEvent(PathChildrenCacheListenerWrapper.java:75)
      	at org.apache.curator.framework.recipes.cache.PathChildrenCacheListenerWrapper.event(PathChildrenCacheListenerWrapper.java:42)
      	at org.apache.curator.framework.recipes.cache.CuratorCacheListenerBuilderImpl$2.lambda$event$0(CuratorCacheListenerBuilderImpl.java:149)
      	at java.base/java.util.ArrayList.forEach(ArrayList.java:1510)
      	at org.apache.curator.framework.recipes.cache.CuratorCacheListenerBuilderImpl$2.event(CuratorCacheListenerBuilderImpl.java:149)
      	at org.apache.curator.framework.recipes.cache.CuratorCacheImpl.lambda$putStorage$7(CuratorCacheImpl.java:279)
      	at org.apache.curator.framework.listen.MappingListenerManager.lambda$forEach$0(MappingListenerManager.java:92)
      	at org.apache.curator.framework.listen.MappingListenerManager.forEach(MappingListenerManager.java:89)
      	at org.apache.curator.framework.listen.StandardListenerManager.forEach(StandardListenerManager.java:89)
      	at org.apache.curator.framework.recipes.cache.CuratorCacheImpl.lambda$callListeners$10(CuratorCacheImpl.java:293)
      	at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1800)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
      	at java.base/java.lang.Thread.run(Thread.java:832)
      Caused by: java.lang.RuntimeException: com.fasterxml.jackson.databind.exc.MismatchedInputException: No content to map due to end-of-input
       at [Source: (byte[])""; line: 1, column: 0]
      	at org.apache.curator.x.discovery.details.ServiceCacheImpl.addInstance(ServiceCacheImpl.java:209)
      	at org.apache.curator.x.discovery.details.ServiceCacheImpl.childEvent(ServiceCacheImpl.java:175)
      	at org.apache.curator.framework.recipes.cache.PathChildrenCacheListenerWrapper.sendEvent(PathChildrenCacheListenerWrapper.java:71)
      	... 13 more
      Caused by: com.fasterxml.jackson.databind.exc.MismatchedInputException: No content to map due to end-of-input
       at [Source: (byte[])""; line: 1, column: 0]
      	at com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:59)
      	at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:4344)
      	at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4189)
      	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3300)
      	at org.apache.curator.x.discovery.details.JsonInstanceSerializer.deserialize(JsonInstanceSerializer.java:86)
      	at org.apache.curator.x.discovery.details.ServiceCacheImpl.addInstance(ServiceCacheImpl.java:204)
      	... 15 more
      

      Attachments

        Activity

          People

            eolivelli Enrico Olivelli
            eolivelli Enrico Olivelli
            Votes:
            3 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 2h 50m
                2h 50m