Examples of MappingException


Examples of org.mongodb.morphia.mapping.MappingException

                return constructor.newInstance();
            }
            try {
                return objenesis.newInstance(clazz);
            } catch (Exception e) {
                throw new MappingException("Failed to instantiate " + clazz.getName(), e);
            }
        } catch (Exception e) {
            throw new RuntimeException("Failed to instantiate " + clazz.getName(), e);
        }
    }
View Full Code Here

Examples of org.springframework.data.mapping.model.MappingException

          TypeInformation<S> typeInformation) {
        return new BasicPersistentEntity<Object, SamplePersistentProperty>((TypeInformation<Object>) typeInformation) {
          @Override
          public void verify() {
            if (Unsupported.class.isAssignableFrom(getType())) {
              throw new MappingException("Unsupported type!");
            }
          }
        };
      }
    };
View Full Code Here

Examples of org.springframework.data.mapping.model.MappingException

    if (!shouldCreatePersistentEntityFor(type)) {
      return null;
    }

    if (strict) {
      throw new MappingException("Unknown persistent entity " + type);
    }

    return addPersistentEntity(type);
  }
View Full Code Here

Examples of org.springframework.data.mapping.model.MappingException

      String segment = iterator.next();
      P persistentProperty = current.getPersistentProperty(segment);

      if (persistentProperty == null) {
        throw new MappingException(String.format("No property %s found on %s!", segment, current.getName()));
      }

      result.add(persistentProperty);

      if (iterator.hasNext()) {
View Full Code Here

Examples of org.springframework.data.mapping.model.MappingException

      }

      return entity;

    } catch (IntrospectionException e) {
      throw new MappingException(e.getMessage(), e);
    } finally {
      write.unlock();
    }
  }
View Full Code Here

Examples of org.springframework.data.mapping.model.MappingException

    if (entity.hasVersionProperty()) {
      return new PropertyIsNullOrZeroNumberIsNewStrategy(entity.getVersionProperty());
    } else if (entity.hasIdProperty()) {
      return new PropertyIsNullIsNewStrategy(entity.getIdProperty());
    } else {
      throw new MappingException(String.format("Cannot determine IsNewStrategy for type %s!", type));
    }
  }
View Full Code Here

Examples of play.modules.elasticsearch.mapping.MappingException

  public CollectionFieldMapper(MapperFactory factory, Field field, String prefix) {
    super(field, prefix);

    if (!Collection.class.isAssignableFrom(field.getType())) {
      throw new MappingException("field must be of Collection type");
    }

    ElasticSearchEmbedded embed = field.getAnnotation(ElasticSearchEmbedded.class);
    nestedMode = (embed != null);
View Full Code Here

Examples of voldemort.xml.MappingException

            Document doc = builder.build(new StringReader(serializerInfoXml));
            Element root = doc.getRootElement();
            Element serializerElement = root.getChild(elementName);
            return StoreDefinitionsMapper.readSerializer(serializerElement);
        } catch(JDOMException e) {
            throw new MappingException(e);
        } catch(IOException e) {
            throw new MappingException(e);
        }
    }
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.