Package org.hibernate.metamodel.source

Examples of org.hibernate.metamodel.source.MappingException


            LOG.tracef( "found mapping document : %s", zipEntry.getName() );
            try {
              add( jarFile.getInputStream( zipEntry ), origin, true );
            }
            catch ( Exception e ) {
              throw new MappingException( "could not read mapping documents", e, origin );
            }
          }
        }
      }
      finally {
View Full Code Here


        catch ( Exception ignore ) {
        }
      }
    }
    catch ( XMLStreamException e ) {
      throw new MappingException( "Unable to create stax reader", e, origin );
    }
  }
View Full Code Here

            LOG.tracef( "found mapping document : %s", zipEntry.getName() );
            try {
              add( jarFile.getInputStream( zipEntry ), origin, true );
            }
            catch ( Exception e ) {
              throw new MappingException( "could not read mapping documents", e, origin );
            }
          }
        }
      }
      finally {
View Full Code Here

        }
        catch (ClassLoadingException e) {
          throw e;
        }
        catch (Exception e) {
          throw new MappingException(
              "could not instantiate custom database object class [" + className + "]",
              origin()
          );
        }
      }
View Full Code Here

              paramElement.getName(),
              metadata.getTypeResolver().heuristicType( paramElement.getType() )
          );
        }
        else {
          throw new MappingException( "Unrecognized nested filter content", origin() );
        }
      }
      if ( condition == null ) {
        condition = filterDefinition.getCondition();
      }
View Full Code Here

      String profileName = fetchProfile.getName();
      Set<FetchProfile.Fetch> fetches = new HashSet<FetchProfile.Fetch>();
      for ( JaxbFetchProfileElement.JaxbFetch fetch : fetchProfile.getFetch() ) {
        String entityName = fetch.getEntity() == null ? containingEntityName : fetch.getEntity();
        if ( entityName == null ) {
          throw new MappingException(
              "could not determine entity for fetch-profile fetch [" + profileName + "]:[" +
                  fetch.getAssociation() + "]",
              origin()
          );
        }
View Full Code Here

      }
      else if ( JaxbSqlQueryElement.class.isInstance( queryOrSqlQuery ) ) {
//        bindNamedSQLQuery( element, null, mappings );
      }
      else {
        throw new MappingException(
            "unknown type of query: " +
                queryOrSqlQuery.getClass().getName(), origin()
        );
      }
    }
View Full Code Here

        else if ( attribute.isVersioned() ) {
          if ( versionAttribute == null ) {
            versionAttribute = attribute;
          }
          else {
            throw new MappingException( "Multiple version attributes", localBindingContext.getOrigin() );
          }
        }
        else {
          simpleAttributeMap.put( attributeName, attribute );
        }
View Full Code Here

    }
  }

  private void checkQueryName(String name) {
    if ( namedQueryMap.containsKey( name ) || namedNativeQueryMap.containsKey( name ) ) {
      throw new MappingException( "Duplicated query mapping " + name, null );
    }
  }
View Full Code Here

  private void put(JaxbSqlResultSetMapping mapping) {
    if ( mapping != null ) {
      Object old = sqlResultSetMappingMap.put( mapping.getName(), mapping );
      if ( old != null ) {
        throw new MappingException( "Duplicated SQL result set mapping " +  mapping.getName(), null );
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.hibernate.metamodel.source.MappingException

Copyright © 2018 www.massapicom. 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.