com.fasterxml.jackson.databind.JsonMappingException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • While testing the v2/_catalog endpoint against a Docker hub proxy I ran into a situation where our failure handling code logs an error but doesn't otherwise know how to deal with the particulars. In this case Docker hub simply has not made this endpoint available, contrary to their own spec. When our proxy forwards the query it gets a 404 html page back, and we log a JSON conversion error(truncated): {code} 2016-03-31 11:19:40,798-0700 WARN [qtp1605084292-1109] admin org.sonatype.nexus.repository.docker.internal.DockerProxyFacetImpl - Failed to fetch: v2/_catalog com.fasterxml.jackson.databind.JsonMappingException: Can not instantiate value of type [simple type, class org.sonatype.nexus.repository.docker.internal.V2FailureResult] from Integral number (404); no single-int-arg constructor/factory method at [Source: org.apache.http.conn.EofSensorInputStream@3a460093; line: 1, column: 1] at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:216) [com.fasterxml.jackson.core.jackson-databind:2.7.1] at com.fasterxml.jackson.databind.DeserializationContext.mappingException(DeserializationContext.java:894) [com.fasterxml.jackson.core.jackson-databind:2.7.1] at com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.createFromInt(StdValueInstantiator.java:312) [na:na] at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromNumber(BeanDeserializerBase.java:1157) [na:na] at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeOther(BeanDeserializer.java:146) [na:na] at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:135) [na:na] at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3788) [com.fasterxml.jackson.core.jackson-databind:2.7.1] at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2849) [com.fasterxml.jackson.core.jackson-databind:2.7.1] at org.sonatype.nexus.repository.docker.internal.DockerProxyFacetImpl.execute(DockerProxyFacetImpl.java:309) [na:na] at org.sonatype.nexus.repository.proxy.ProxyFacetSupport.fetch(ProxyFacetSupport.java:222) [org.sonatype.nexus.repository:3.0.0.01] at org.sonatype.nexus.repository.proxy.ProxyFacetSupport.fetch(ProxyFacetSupport.java:202) [org.sonatype.nexus.repository:3.0.0.01] at org.sonatype.nexus.repository.proxy.ProxyFacetSupport.get(ProxyFacetSupport.java:164) [org.sonatype.nexus.repository:3.0.0.01] at org.sonatype.nexus.repository.proxy.ProxyHandler.handle(ProxyHandler.java:48) [org.sonatype.nexus.repository:3.0.0.01] at org.sonatype.nexus.repository.view.Context.proceed(Context.java:79) [org.sonatype.nexus.repository:3.0.0.01] at org.sonatype.nexus.repository.storage.UnitOfWorkHandler.handle(UnitOfWorkHandler.java:39) [org.sonatype.nexus.repository:3.0.0.01] at org.sonatype.nexus.repository.view.Context.proceed(Context.java:79) [org.sonatype.nexus.repository:3.0.0.01] at org.sonatype.nexus.repository.docker.internal.V2CatalogHandler.handle(V2CatalogHandler.java:36) [com.sonatype.nexus.plugins.nexus-repository-docker:3.0.0.01] at org.sonatype.nexus.repository.view.Context.proceed(Context.java:79) [org.sonatype.nexus.repository:3.0.0.01] at org.sonatype.nexus.repository.view.Context$proceed.call(Unknown Source) [!/:na] at org.sonatype.nexus.repository.docker.internal.V2Handlers$_closure18.doCall(V2Handlers.groovy:279) [com.sonatype.nexus.plugins.nexus-repository-docker:3.0.0.01] at sun.reflect.GeneratedMethodAccessor220.invoke(Unknown Source) [na:na] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [na:1.8.0_60] at java.lang.reflect.Method.invoke(Method.java:497) [na:1.8.0_60] at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) [groovy-all:2.4.4] at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) [groovy-all:2.4.4] at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294) [groovy-all:2.4.4] at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1019) [groovy-all:2.4.4] at groovy.lang.Closure.call(Closure.java:426) [groovy-all:2.4.4] at org.codehaus.groovy.runtime.ConvertedClosure.invokeCustom(ConvertedClosure.java:53) [groovy-all:2.4.4] at org.codehaus.groovy.runtime.ConversionHandler.invoke(ConversionHandler.java:105) [groovy-all:2.4.4] at com.sun.proxy.$Proxy125.handle(Unknown Source) [org.sonatype.nexus.repository:3.0.0.01] at org.sonatype.nexus.repository.view.Context.proceed(Context.java:79) [org.sonatype.nexus.repository:3.0.0.01] at org.sonatype.nexus.repository.cache.NegativeCacheHandler.handle(NegativeCacheHandler.java:50) [org.sonatype.nexus.repository:3.0.0.01] at org.sonatype.nexus.repository.view.Context.proceed(Context.java:79) [org.sonatype.nexus.repository:3.0.0.01] at org.sonatype.nexus.repository.security.SecurityHandler.handle(SecurityHandler.java:45) [org.sonatype.nexus.repository:3.0.0.01] at org.sonatype.nexus.repository.view.Context.proceed(Context.java:79) [org.sonatype.nexus.repository:3.0.0.01] at org.sonatype.nexus.repository.view.Context$proceed.call(Unknown Source) [!/:na] at org.sonatype.nexus.repository.docker.internal.V2Handlers$_closure18.doCall(V2Handlers.groovy:279) [com.sonatype.nexus.plugins.nexus-repository-docker:3.0.0.01] at sun.reflect.GeneratedMethodAccessor220.invoke(Unknown Source) [na:na] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [na:1.8.0_60] at java.lang.reflect.Method.invoke(Method.java:497) [na:1.8.0_60] at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) [groovy-all:2.4.4] at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) [groovy-all:2.4.4] at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294) [groovy-all:2.4.4] at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1019) [groovy-all:2.4.4] at groovy.lang.Closure.call(Closure.java:426) [groovy-all:2.4.4] at org.codehaus.groovy.runtime.ConvertedClosure.invokeCustom(ConvertedClosure.java:53) [groovy-all:2.4.4] at org.codehaus.groovy.runtime.ConversionHandler.invoke(ConversionHandler.java:105) [groovy-all:2.4.4] at com.sun.proxy.$Proxy125.handle(Unknown Source) [org.sonatype.nexus.repository:3.0.0.01] at org.sonatype.nexus.repository.view.Context.proceed(Context.java:79) [org.sonatype.nexus.repository:3.0.0.01] at org.sonatype.nexus.repository.view.Context$proceed.call(Unknown Source) [!/:na] at org.sonatype.nexus.repository.docker.internal.V2Handlers$_closure1.doCall(V2Handlers.groovy:74) [com.sonatype.nexus.plugins.nexus-repository-docker:3.0.0.01] at sun.reflect.GeneratedMethodAccessor224.invoke(Unknown Source) [na:na] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [na:1.8.0_60] at java.lang.reflect.Method.invoke(Method.java:497) [na:1.8.0_60] at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) [groovy-all:2.4.4] at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) [groovy-all:2.4.4] at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294) [groovy-all:2.4.4] at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1019) [groovy-all:2.4.4] at groovy.lang.Closure.call(Closure.java:426) [groovy-all:2.4.4] at org.codehaus.groovy.runtime.ConvertedClosure.invokeCustom(ConvertedClosure.java:53) [groovy-all:2.4.4] at org.codehaus.groovy.runtime.ConversionHandler.invoke(ConversionHandler.java:105) [groovy-all:2.4.4] at com.sun.proxy.$Proxy125.handle(Unknown Source) [org.sonatype.nexus.repository:3.0.0.01] at org.sonatype.nexus.repository.view.Context.proceed(Context.java:79) [org.sonatype.nexus.repository:3.0.0.01] at org.sonatype.nexus.repository.view.Context$proceed.call(Unknown Source) [!/:na] at org.sonatype.nexus.repository.docker.internal.V2Handlers$_closure17.doCall(V2Handlers.groovy:270) [com.sonatype.nexus.plugins.nexus-repository-docker:3.0.0.01] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [na:1.8.0_60] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [na:1.8.0_60] at ... {code} Not a huge issue since we can still search for images (provided V1 is enabled), but I'm documenting it in case anyone else comes across it. Note that there's no docker client access to this endpoint so it's only an issue for advanced users who might want to programmatically interact with the repo, and it works as expected for hosted/group repositories. Reproduce with this, replacing the port with the port of your proxy of docker hub: {code} curl -v -k -u admin:admin123 https://192.168.1.42:18083/v2/_catalog {code}
    via by Kelly Robinson,
  • How to read subtype?
    via GitHub by gaydenko
    ,
  • angularjs - springboot - spring data/rest
    via Stack Overflow by ek1984
    ,
  • Deserializing nested json's with jackson
    via Stack Overflow by labbyfrost
    ,
  • Problem with type information
    via GitHub by WaDelma
    ,
  • Jackson doesn't deserialize
    via Stack Overflow by Yves Nicolas
    ,
    • com.fasterxml.jackson.databind.JsonMappingException: Can not instantiate value of type [simple type, class org.sonatype.nexus.repository.docker.internal.V2FailureResult] from Integral number (404); no single-int-arg constructor/factory method at [Source: org.apache.http.conn.EofSensorInputStream@3a460093; line: 1, column: 1] at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:216)[com.fasterxml.jackson.core.jackson-databind:2.7.1] at com.fasterxml.jackson.databind.DeserializationContext.mappingException(DeserializationContext.java:894)[com.fasterxml.jackson.core.jackson-databind:2.7.1] at com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.createFromInt(StdValueInstantiator.java:312)[na:na] at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromNumber(BeanDeserializerBase.java:1157)[na:na] at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeOther(BeanDeserializer.java:146)[na:na] at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:135)[na:na] at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3788)[com.fasterxml.jackson.core.jackson-databind:2.7.1] at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2849)[com.fasterxml.jackson.core.jackson-databind:2.7.1] at org.sonatype.nexus.repository.docker.internal.DockerProxyFacetImpl.execute(DockerProxyFacetImpl.java:309)[na:na] at org.sonatype.nexus.repository.proxy.ProxyFacetSupport.fetch(ProxyFacetSupport.java:222)[org.sonatype.nexus.repository:3.0.0.01] at org.sonatype.nexus.repository.proxy.ProxyFacetSupport.fetch(ProxyFacetSupport.java:202)[org.sonatype.nexus.repository:3.0.0.01] at org.sonatype.nexus.repository.proxy.ProxyFacetSupport.get(ProxyFacetSupport.java:164)[org.sonatype.nexus.repository:3.0.0.01] at org.sonatype.nexus.repository.proxy.ProxyHandler.handle(ProxyHandler.java:48)[org.sonatype.nexus.repository:3.0.0.01] at org.sonatype.nexus.repository.view.Context.proceed(Context.java:79)[org.sonatype.nexus.repository:3.0.0.01] at org.sonatype.nexus.repository.storage.UnitOfWorkHandler.handle(UnitOfWorkHandler.java:39)[org.sonatype.nexus.repository:3.0.0.01] at org.sonatype.nexus.repository.view.Context.proceed(Context.java:79)[org.sonatype.nexus.repository:3.0.0.01] at org.sonatype.nexus.repository.docker.internal.V2CatalogHandler.handle(V2CatalogHandler.java:36)[com.sonatype.nexus.plugins.nexus-repository-docker:3.0.0.01] at org.sonatype.nexus.repository.view.Context.proceed(Context.java:79)[org.sonatype.nexus.repository:3.0.0.01] at org.sonatype.nexus.repository.view.Context$proceed.call(Unknown Source)[!/:na] at org.sonatype.nexus.repository.docker.internal.V2Handlers$_closure18.doCall(V2Handlers.groovy:279)[com.sonatype.nexus.plugins.nexus-repository-docker:3.0.0.01] at sun.reflect.GeneratedMethodAccessor220.invoke(Unknown Source)[na:na] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_60] at java.lang.reflect.Method.invoke(Method.java:497)[na:1.8.0_60] at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)[groovy-all:2.4.4] at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)[groovy-all:2.4.4] at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)[groovy-all:2.4.4] at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1019)[groovy-all:2.4.4] at groovy.lang.Closure.call(Closure.java:426)[groovy-all:2.4.4] at org.codehaus.groovy.runtime.ConvertedClosure.invokeCustom(ConvertedClosure.java:53)[groovy-all:2.4.4] at org.codehaus.groovy.runtime.ConversionHandler.invoke(ConversionHandler.java:105)[groovy-all:2.4.4] at com.sun.proxy.$Proxy125.handle(Unknown Source)[org.sonatype.nexus.repository:3.0.0.01] at org.sonatype.nexus.repository.view.Context.proceed(Context.java:79)[org.sonatype.nexus.repository:3.0.0.01] at org.sonatype.nexus.repository.cache.NegativeCacheHandler.handle(NegativeCacheHandler.java:50)[org.sonatype.nexus.repository:3.0.0.01] at org.sonatype.nexus.repository.view.Context.proceed(Context.java:79)[org.sonatype.nexus.repository:3.0.0.01] at org.sonatype.nexus.repository.security.SecurityHandler.handle(SecurityHandler.java:45)[org.sonatype.nexus.repository:3.0.0.01] at org.sonatype.nexus.repository.view.Context.proceed(Context.java:79)[org.sonatype.nexus.repository:3.0.0.01] at org.sonatype.nexus.repository.view.Context$proceed.call(Unknown Source)[!/:na] at org.sonatype.nexus.repository.docker.internal.V2Handlers$_closure18.doCall(V2Handlers.groovy:279)[com.sonatype.nexus.plugins.nexus-repository-docker:3.0.0.01] at sun.reflect.GeneratedMethodAccessor220.invoke(Unknown Source)[na:na] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_60] at java.lang.reflect.Method.invoke(Method.java:497)[na:1.8.0_60] at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)[groovy-all:2.4.4] at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)[groovy-all:2.4.4] at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)[groovy-all:2.4.4] at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1019)[groovy-all:2.4.4] at groovy.lang.Closure.call(Closure.java:426)[groovy-all:2.4.4] at org.codehaus.groovy.runtime.ConvertedClosure.invokeCustom(ConvertedClosure.java:53)[groovy-all:2.4.4] at org.codehaus.groovy.runtime.ConversionHandler.invoke(ConversionHandler.java:105)[groovy-all:2.4.4] at com.sun.proxy.$Proxy125.handle(Unknown Source)[org.sonatype.nexus.repository:3.0.0.01] at org.sonatype.nexus.repository.view.Context.proceed(Context.java:79)[org.sonatype.nexus.repository:3.0.0.01] at org.sonatype.nexus.repository.view.Context$proceed.call(Unknown Source)[!/:na] at org.sonatype.nexus.repository.docker.internal.V2Handlers$_closure1.doCall(V2Handlers.groovy:74)[com.sonatype.nexus.plugins.nexus-repository-docker:3.0.0.01] at sun.reflect.GeneratedMethodAccessor224.invoke(Unknown Source)[na:na] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_60] at java.lang.reflect.Method.invoke(Method.java:497)[na:1.8.0_60] at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)[groovy-all:2.4.4] at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)[groovy-all:2.4.4] at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)[groovy-all:2.4.4] at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1019)[groovy-all:2.4.4] at groovy.lang.Closure.call(Closure.java:426)[groovy-all:2.4.4] at org.codehaus.groovy.runtime.ConvertedClosure.invokeCustom(ConvertedClosure.java:53)[groovy-all:2.4.4] at org.codehaus.groovy.runtime.ConversionHandler.invoke(ConversionHandler.java:105)[groovy-all:2.4.4] at com.sun.proxy.$Proxy125.handle(Unknown Source)[org.sonatype.nexus.repository:3.0.0.01] at org.sonatype.nexus.repository.view.Context.proceed(Context.java:79)[org.sonatype.nexus.repository:3.0.0.01] at org.sonatype.nexus.repository.view.Context$proceed.call(Unknown Source)[!/:na] at org.sonatype.nexus.repository.docker.internal.V2Handlers$_closure17.doCall(V2Handlers.groovy:270)[com.sonatype.nexus.plugins.nexus-repository-docker:3.0.0.01] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.8.0_60] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[na:1.8.0_60]

    Users with the same issue

    tvrmsmith
    15 times, last one,
    Axelo
    3 times, last one,
    Unknown visitor1 times, last one,
    jstrayer
    1 times, last one,
    zsamboki
    3 times, last one,
    139 more bugmates