Package org.hibernate.metamodel.source

Examples of org.hibernate.metamodel.source.MappingNotFoundException


    LOG.tracef( "reading mappings from resource : %s", name );

    final Origin origin = new Origin( SourceType.RESOURCE, name );
    InputStream resourceInputStream = classLoaderService().locateResourceStream( name );
    if ( resourceInputStream == null ) {
      throw new MappingNotFoundException( origin );
    }
    add( resourceInputStream, origin, true );

    return this;
  }
View Full Code Here


    final Origin origin = new Origin( SourceType.FILE, name );
    try {
      add( new FileInputStream( file ), origin, true );
    }
    catch ( FileNotFoundException e ) {
      throw new MappingNotFoundException( e, origin );
    }
    return this;
  }
View Full Code Here

    final Origin origin = new Origin( SourceType.URL, urlExternalForm );
    try {
      add( url.openStream(), origin, true );
    }
    catch ( IOException e ) {
      throw new MappingNotFoundException( "Unable to open url stream [" + urlExternalForm + "]", e, origin );
    }
    return this;
  }
View Full Code Here

        catch ( Exception ignore ) {
        }
      }
    }
    catch ( IOException e ) {
      throw new MappingNotFoundException( e, origin );
    }
    return this;
  }
View Full Code Here

    LOG.tracef( "reading mappings from resource : %s", name );

    final Origin origin = new Origin( SourceType.RESOURCE, name );
    InputStream resourceInputStream = classLoaderService().locateResourceStream( name );
    if ( resourceInputStream == null ) {
      throw new MappingNotFoundException( origin );
    }
    add( resourceInputStream, origin, true );

    return this;
  }
View Full Code Here

    final Origin origin = new Origin( SourceType.FILE, name );
    try {
      add( new FileInputStream( file ), origin, true );
    }
    catch ( FileNotFoundException e ) {
      throw new MappingNotFoundException( e, origin );
    }
    return this;
  }
View Full Code Here

    final Origin origin = new Origin( SourceType.URL, urlExternalForm );
    try {
      add( url.openStream(), origin, true );
    }
    catch ( IOException e ) {
      throw new MappingNotFoundException( "Unable to open url stream [" + urlExternalForm + "]", e, origin );
    }
    return this;
  }
View Full Code Here

        catch ( Exception ignore ) {
        }
      }
    }
    catch ( IOException e ) {
      throw new MappingNotFoundException( e, origin );
    }
    return this;
  }
View Full Code Here

    LOG.tracef( "reading mappings from resource : %s", name );

    final Origin origin = new Origin( SourceType.RESOURCE, name );
    InputStream resourceInputStream = classLoaderService().locateResourceStream( name );
    if ( resourceInputStream == null ) {
      throw new MappingNotFoundException( origin );
    }
    add( resourceInputStream, origin, true );

    return this;
  }
View Full Code Here

    final Origin origin = new Origin( SourceType.FILE, name );
    try {
      add( new FileInputStream( file ), origin, true );
    }
    catch ( FileNotFoundException e ) {
      throw new MappingNotFoundException( e, origin );
    }
    return this;
  }
View Full Code Here

TOP

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

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.