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]

Sonatype JIRA | Kelly Robinson | 8 months ago
  1. 0

    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}

    Sonatype JIRA | 8 months ago | Kelly Robinson
    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]
  2. 0

    Reading an object of inner class throws MarkLogicIOException

    GitHub | 2 years ago | sravanr
    com.marklogic.client.MarkLogicIOException: com.fasterxml.jackson.databind.JsonMappingException: No suitable constructor found for type [simple type, class com.marklogic.javaclient.TestPOJOsample1$Student]: can not instantiate from JSON object (need to add/enable type information?) at [Source: java.io.InputStreamReader@37e4320e; line: 1, column: 54]
  3. 0

    How to read subtype?

    GitHub | 2 years ago | gaydenko
    com.fasterxml.jackson.databind.JsonMappingException: Can not instantiate abstract type [simple type, class scala.runtime.Nothing$] (need to add/enable type information?) at [Source: {"i":42}; line: 1, column: 2]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    angularjs - springboot - spring data/rest

    Stack Overflow | 2 years ago | ek1984
    com.fasterxml.jackson.databind.JsonMappingException: (was java.lang.NullPointerException) (through reference chain: fr.stockmanagement.Customer["status"]) at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:232)
  6. 0

    Deserializing nested json's with jackson

    Stack Overflow | 4 years ago | labbyfrost
    com.fasterxml.jackson.databind.JsonMappingException: Can not instantiate value of type [simple type, class JsonPath.Cpld] from JSON String; no single-String constructor/factory method (through reference chain: JsonPath.mainbean["clientPayload"])

  1. tvrmsmith 1 times, last 4 weeks ago
  2. tyson925 48 times, last 4 weeks ago
  3. RoiOtero 18 times, last 2 months ago
  4. Andreas Häber 4 times, last 3 months ago
  5. davidvanlaatum 2 times, last 3 months ago
12 more registered users
83 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. 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()
  2. Jackson
    ObjectMapper.readValue
    1. com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:216)[com.fasterxml.jackson.core.jackson-databind:2.7.1]
    2. com.fasterxml.jackson.databind.DeserializationContext.mappingException(DeserializationContext.java:894)[com.fasterxml.jackson.core.jackson-databind:2.7.1]
    3. com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.createFromInt(StdValueInstantiator.java:312)[na:na]
    4. com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromNumber(BeanDeserializerBase.java:1157)[na:na]
    5. com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeOther(BeanDeserializer.java:146)[na:na]
    6. com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:135)[na:na]
    7. com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3788)[com.fasterxml.jackson.core.jackson-databind:2.7.1]
    8. com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2849)[com.fasterxml.jackson.core.jackson-databind:2.7.1]
    8 frames
  3. org.sonatype.nexus
    V2Handlers$_closure18.doCall
    1. org.sonatype.nexus.repository.docker.internal.DockerProxyFacetImpl.execute(DockerProxyFacetImpl.java:309)[na:na]
    2. org.sonatype.nexus.repository.proxy.ProxyFacetSupport.fetch(ProxyFacetSupport.java:222)[org.sonatype.nexus.repository:3.0.0.01]
    3. org.sonatype.nexus.repository.proxy.ProxyFacetSupport.fetch(ProxyFacetSupport.java:202)[org.sonatype.nexus.repository:3.0.0.01]
    4. org.sonatype.nexus.repository.proxy.ProxyFacetSupport.get(ProxyFacetSupport.java:164)[org.sonatype.nexus.repository:3.0.0.01]
    5. org.sonatype.nexus.repository.proxy.ProxyHandler.handle(ProxyHandler.java:48)[org.sonatype.nexus.repository:3.0.0.01]
    6. org.sonatype.nexus.repository.view.Context.proceed(Context.java:79)[org.sonatype.nexus.repository:3.0.0.01]
    7. org.sonatype.nexus.repository.storage.UnitOfWorkHandler.handle(UnitOfWorkHandler.java:39)[org.sonatype.nexus.repository:3.0.0.01]
    8. org.sonatype.nexus.repository.view.Context.proceed(Context.java:79)[org.sonatype.nexus.repository:3.0.0.01]
    9. org.sonatype.nexus.repository.docker.internal.V2CatalogHandler.handle(V2CatalogHandler.java:36)[com.sonatype.nexus.plugins.nexus-repository-docker:3.0.0.01]
    10. org.sonatype.nexus.repository.view.Context.proceed(Context.java:79)[org.sonatype.nexus.repository:3.0.0.01]
    11. org.sonatype.nexus.repository.view.Context$proceed.call(Unknown Source)[!/:na]
    12. org.sonatype.nexus.repository.docker.internal.V2Handlers$_closure18.doCall(V2Handlers.groovy:279)[com.sonatype.nexus.plugins.nexus-repository-docker:3.0.0.01]
    12 frames
  4. Java RT
    Method.invoke
    1. sun.reflect.GeneratedMethodAccessor220.invoke(Unknown Source)[na:na]
    2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_60]
    3. java.lang.reflect.Method.invoke(Method.java:497)[na:1.8.0_60]
    3 frames
  5. Groovy
    ConversionHandler.invoke
    1. org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)[groovy-all:2.4.4]
    2. groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)[groovy-all:2.4.4]
    3. org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)[groovy-all:2.4.4]
    4. groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1019)[groovy-all:2.4.4]
    5. groovy.lang.Closure.call(Closure.java:426)[groovy-all:2.4.4]
    6. org.codehaus.groovy.runtime.ConvertedClosure.invokeCustom(ConvertedClosure.java:53)[groovy-all:2.4.4]
    7. org.codehaus.groovy.runtime.ConversionHandler.invoke(ConversionHandler.java:105)[groovy-all:2.4.4]
    7 frames
  6. com.sun.proxy
    $Proxy125.handle
    1. com.sun.proxy.$Proxy125.handle(Unknown Source)[org.sonatype.nexus.repository:3.0.0.01]
    1 frame
  7. org.sonatype.nexus
    V2Handlers$_closure18.doCall
    1. org.sonatype.nexus.repository.view.Context.proceed(Context.java:79)[org.sonatype.nexus.repository:3.0.0.01]
    2. org.sonatype.nexus.repository.cache.NegativeCacheHandler.handle(NegativeCacheHandler.java:50)[org.sonatype.nexus.repository:3.0.0.01]
    3. org.sonatype.nexus.repository.view.Context.proceed(Context.java:79)[org.sonatype.nexus.repository:3.0.0.01]
    4. org.sonatype.nexus.repository.security.SecurityHandler.handle(SecurityHandler.java:45)[org.sonatype.nexus.repository:3.0.0.01]
    5. org.sonatype.nexus.repository.view.Context.proceed(Context.java:79)[org.sonatype.nexus.repository:3.0.0.01]
    6. org.sonatype.nexus.repository.view.Context$proceed.call(Unknown Source)[!/:na]
    7. org.sonatype.nexus.repository.docker.internal.V2Handlers$_closure18.doCall(V2Handlers.groovy:279)[com.sonatype.nexus.plugins.nexus-repository-docker:3.0.0.01]
    7 frames
  8. Java RT
    Method.invoke
    1. sun.reflect.GeneratedMethodAccessor220.invoke(Unknown Source)[na:na]
    2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_60]
    3. java.lang.reflect.Method.invoke(Method.java:497)[na:1.8.0_60]
    3 frames
  9. Groovy
    ConversionHandler.invoke
    1. org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)[groovy-all:2.4.4]
    2. groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)[groovy-all:2.4.4]
    3. org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)[groovy-all:2.4.4]
    4. groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1019)[groovy-all:2.4.4]
    5. groovy.lang.Closure.call(Closure.java:426)[groovy-all:2.4.4]
    6. org.codehaus.groovy.runtime.ConvertedClosure.invokeCustom(ConvertedClosure.java:53)[groovy-all:2.4.4]
    7. org.codehaus.groovy.runtime.ConversionHandler.invoke(ConversionHandler.java:105)[groovy-all:2.4.4]
    7 frames
  10. com.sun.proxy
    $Proxy125.handle
    1. com.sun.proxy.$Proxy125.handle(Unknown Source)[org.sonatype.nexus.repository:3.0.0.01]
    1 frame
  11. org.sonatype.nexus
    V2Handlers$_closure1.doCall
    1. org.sonatype.nexus.repository.view.Context.proceed(Context.java:79)[org.sonatype.nexus.repository:3.0.0.01]
    2. org.sonatype.nexus.repository.view.Context$proceed.call(Unknown Source)[!/:na]
    3. org.sonatype.nexus.repository.docker.internal.V2Handlers$_closure1.doCall(V2Handlers.groovy:74)[com.sonatype.nexus.plugins.nexus-repository-docker:3.0.0.01]
    3 frames
  12. Java RT
    Method.invoke
    1. sun.reflect.GeneratedMethodAccessor224.invoke(Unknown Source)[na:na]
    2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_60]
    3. java.lang.reflect.Method.invoke(Method.java:497)[na:1.8.0_60]
    3 frames
  13. Groovy
    ConversionHandler.invoke
    1. org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)[groovy-all:2.4.4]
    2. groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)[groovy-all:2.4.4]
    3. org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:294)[groovy-all:2.4.4]
    4. groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1019)[groovy-all:2.4.4]
    5. groovy.lang.Closure.call(Closure.java:426)[groovy-all:2.4.4]
    6. org.codehaus.groovy.runtime.ConvertedClosure.invokeCustom(ConvertedClosure.java:53)[groovy-all:2.4.4]
    7. org.codehaus.groovy.runtime.ConversionHandler.invoke(ConversionHandler.java:105)[groovy-all:2.4.4]
    7 frames
  14. com.sun.proxy
    $Proxy125.handle
    1. com.sun.proxy.$Proxy125.handle(Unknown Source)[org.sonatype.nexus.repository:3.0.0.01]
    1 frame
  15. org.sonatype.nexus
    V2Handlers$_closure17.doCall
    1. org.sonatype.nexus.repository.view.Context.proceed(Context.java:79)[org.sonatype.nexus.repository:3.0.0.01]
    2. org.sonatype.nexus.repository.view.Context$proceed.call(Unknown Source)[!/:na]
    3. org.sonatype.nexus.repository.docker.internal.V2Handlers$_closure17.doCall(V2Handlers.groovy:270)[com.sonatype.nexus.plugins.nexus-repository-docker:3.0.0.01]
    3 frames
  16. Java RT
    NativeMethodAccessorImpl.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.8.0_60]
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[na:1.8.0_60]
    2 frames