Examples of JsonMappingException


Examples of com.facebook.presto.jdbc.internal.jackson.databind.JsonMappingException

            if (origMsg != null) {
                msg.append(", problem: ").append(origMsg);
            } else {
                msg.append(" (no error message provided)");
            }
            throw new JsonMappingException(msg.toString(), null, e);
        }
        if (e instanceof IOException) {
            throw (IOException) e;
        }
        if (e instanceof RuntimeException) {
            throw (RuntimeException) e;
        }
        // let's wrap the innermost problem
        Throwable t = e;
        while (t.getCause() != null) {
            t = t.getCause();
        }
        throw new JsonMappingException(t.getMessage(), null, t);
    }
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.jackson.databind.JsonMappingException

        objectNode.put("type", schemaType);
        if (objectProperties != null) {
            try {
                objectNode.put("properties", _getObjectMapper().readTree(objectProperties));
            } catch (IOException e) {
                throw new JsonMappingException("Failed to parse @JsonSerializableSchema.schemaObjectPropertiesDefinition value");
            }
        }
        if (itemDefinition != null) {
            try {
                objectNode.put("items", _getObjectMapper().readTree(itemDefinition));
            } catch (IOException e) {
                throw new JsonMappingException("Failed to parse @JsonSerializableSchema.schemaItemDefinition value");
            }
        }
        // always optional, no need to specify:
        //objectNode.put("required", false);
        return objectNode;
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.jackson.databind.JsonMappingException

        // First: figure out what is the fully generic delegate type:
        TypeFactory tf = provider.getTypeFactory();
        JavaType implType = tf.constructType(_converter.getClass());
        JavaType[] params = tf.findTypeParameters(implType, Converter.class);
        if (params == null || params.length != 2) {
            throw new JsonMappingException("Could not determine Converter parameterization for "
                    +implType);
        }
        // and then we can find serializer to delegate to, construct a new instance:
        JavaType delegateType = params[1];
        return withDelegate(_converter, delegateType,
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.jackson.databind.JsonMappingException

            //}
        } catch (Exception e) {
            String name = (i == props.length) ? "[anySetter]" : props[i].getName();
            wrapAndThrow(provider, e, bean, name);
        } catch (StackOverflowError e) {
            JsonMappingException mapE = new JsonMappingException("Infinite recursion (StackOverflowError)", e);
            String name = (i == props.length) ? "[anySetter]" : props[i].getName();
            mapE.prependPath(new JsonMappingException.Reference(bean, name));
            throw mapE;
        }
    }
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.jackson.databind.JsonMappingException

        } catch (Exception e) {
            throw wrapException(e);
        } catch (ExceptionInInitializerError e) {
            throw wrapException(e);
        }
        throw new JsonMappingException("Can not instantiate value of type "+getValueTypeDesc()
                +" from Integral number; no single-int-arg constructor/factory method");
    }
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.jackson.databind.JsonMappingException

        } catch (Exception e) {
            throw wrapException(e);
        } catch (ExceptionInInitializerError e) {
            throw wrapException(e);
        }
        throw new JsonMappingException("Can not instantiate value of type "+getValueTypeDesc()
                +" from Long integral number; no single-long-arg constructor/factory method");
    }
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.jackson.databind.JsonMappingException

        } catch (Exception e) {
            throw wrapException(e);
        } catch (ExceptionInInitializerError e) {
            throw wrapException(e);
        }
        throw new JsonMappingException("Can not instantiate value of type "+getValueTypeDesc()
                +" from Floating-point number; no one-double/Double-arg constructor/factory method");
    }
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.jackson.databind.JsonMappingException

        } catch (Exception e) {
            throw wrapException(e);
        } catch (ExceptionInInitializerError e) {
            throw wrapException(e);
        }
        throw new JsonMappingException("Can not instantiate value of type "+getValueTypeDesc()
                +" from Boolean value; no single-boolean/Boolean-arg constructor/factory method");
    }
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.jackson.databind.JsonMappingException

       
        // and finally, empty Strings might be accepted as null Object...
        if (_cfgEmptyStringsAsObjects && value.length() == 0) {
            return null;
        }
        throw new JsonMappingException("Can not instantiate value of type "+getValueTypeDesc()
                +" from String value; no single-String constructor/factory method");
    }
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.jackson.databind.JsonMappingException

            t = t.getCause();
        }
        if (t instanceof JsonMappingException) {
            return (JsonMappingException) t;
        }
        return new JsonMappingException("Instantiation of "+getValueTypeDesc()+" value failed: "+t.getMessage(), t);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.