Examples of MappingException


Examples of com.apitrary.orm.core.exception.MappingException

      ObjectMapper objectMapper = new ObjectMapper();
      try {
        apiState = objectMapper.readValue(result, APIState.class);
      } catch (Exception e) {
        throw new MappingException(e);
      }
    } else {
      throw new CommunicationErrorException(HttpStatus.getStatus(response.getStatusCode()));
    }
    return apiState;
View Full Code Here

Examples of com.github.jmkgreen.morphia.mapping.MappingException

    @Override
    protected void check(MappedClass mc, MappedField mf, Set<ConstraintViolation> ve) {
        if (mf.hasAnnotation(Reference.class)) {
            Class realType = (mf.isSingleValue()) ? mf.getType() : mf.getSubClass();

            if (realType == null) throw new MappingException("Type is null for this MappedField: " + mf);

            if ((!realType.isInterface() && mc.getMapper().getMappedClass(realType).getIdField() == null))
                ve.add(new ConstraintViolation(Level.FATAL, mc, mf, this.getClass(), mf.getFullName() + " is annotated as a @"
                        + Reference.class.getSimpleName() + " but the " + mf.getType().getName()
                        + " class is missing the @" + Id.class.getSimpleName() + " annotation"));
View Full Code Here

Examples of com.jayway.jsonpath.spi.mapper.MappingException

                return factory.createInstance().getMapper(targetType).convert(source);
            }
            String s = configuration.jsonProvider().toJson(source);
            return (T) JSONValue.parse(s, targetType);
        } catch (Exception e) {
            throw new MappingException(e);
        }

    }
View Full Code Here

Examples of com.sun.star.uno.MappingException

            case 0:
                return operation.equals("getInstance") ? "TestResult" : null;
            case 1:
                // TODO  What is this test, with an obviously obsoleted
                // MappingException, good for?
                throw new MappingException();
            case 2:
                throw new com.sun.star.uno.RuntimeException();
            case 3:
                throw new com.sun.star.uno.Exception();
            case 4:
View Full Code Here

Examples of fr.norsys.mapper.console.exception.MappingException

      Unmarshaller unmar = new Unmarshaller(mapping);
      if (input != null) {
        obj = unmar.unmarshal(new InputSource(input));
      }
    } catch (Throwable th) {
      throw new MappingException("Unmarshall exception occured: "+th);
    }
    return obj;
  }
View Full Code Here

Examples of ma.glasnost.orika.MappingException

        final Class<?> dc = destination.getOwner().rawType();
       
        final Class<?> destinationElementClass = d.elementType().getRawType();
       
        if (destinationElementClass == null) {
            throw new MappingException("cannot determine runtime type of destination collection " + dc.getName() + "." + d.name());
        }
       
        // Start check if source property ! = null
        out.append(s.ifNotNull() + " {\n");
       
View Full Code Here

Examples of org.apache.archiva.redback.common.ldap.MappingException

            logger.debug( "addLdapMapping ldapGroup: {}, roles: {}, added: {}", ldapGroup, roles, added );
            redbackRuntimeConfigurationAdmin.updateRedbackRuntimeConfiguration( redbackRuntimeConfiguration );
        }
        catch ( RepositoryAdminException e )
        {
            throw new MappingException( e.getMessage(), e );
        }

    }
View Full Code Here

Examples of org.apache.uima.alchemy.mapper.exception.MappingException

      fs.setFeatureValueFromString(type.getFeatureByBaseName("text"),
              ((CategorizationResults) results).getCategory());
      cas.addFsToIndexes(fs);
    } catch (Exception e) {
      e.printStackTrace();
      throw new MappingException(e);
    }

  }
View Full Code Here

Examples of org.dozer.MappingException

  public boolean mapField(Object sourceObj, Object destObj, Object sourceFieldValue, ClassMap classMap, FieldMap fieldMapping) {
    boolean result = false;

    if (!(sourceObj instanceof SimpleObj)) {
      throw new MappingException("Unsupported source object type.  Should be of type: SimpleObj");
    }

    if (!(destObj instanceof SimpleObjPrime)) {
      throw new MappingException("Unsupported dest object type.  Should be of type: SimpleObjPrime");
    }

    if (fieldMapping.getSrcFieldName().equals("field1")) {
      ((SimpleObjPrime) destObj).setField1(FIELD_VALUE);
      result = true;
View Full Code Here

Examples of org.dozer.MappingException

      return dest;
    } else if (source instanceof CustomDoubleObject) {
      double sourceObj = ((CustomDoubleObjectIF) source).getTheDouble();
      return new Double(sourceObj);
    } else {
      throw new MappingException("Converter TestCustomConverter used incorrectly. Arguments passed in were:" + destination
          + " and " + source);
    }
  }
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.