Package org.hibernate

Examples of org.hibernate.HibernateException


        eagerPropertyFetch,
        session
      );

    if ( persister.hasRowId() ) {
      throw new HibernateException( "Hibernate OGM does nto support row id");
    }
    final Object rowId = null;

    final AssociationType[] ownerAssociationTypes = getOwnerAssociationTypes();
    if ( ownerAssociationTypes != null && ownerAssociationTypes[i] != null ) {
View Full Code Here


      cacheManager.stop();
    }
  }

  private HibernateException raiseConfigurationError(Exception e, String cfgName) {
    return new HibernateException(
        "Could not start Infinispan CacheManager using as configuration file: " + cfgName, e
    );
  }
View Full Code Here

  public BigDecimal fromStringValue(String string) throws HibernateException {
    try {
      return new BigDecimal( string );
    }
    catch ( NumberFormatException e ) {
      throw new HibernateException( "Unable to rebuild BigDecimal from String", e );
    }
  }
View Full Code Here

    }
    else if ( Boolean.toString( false ).equals( value ) ) {
      return Boolean.FALSE;
    }
    else {
      throw new HibernateException( "Unable to rebuild Boolean from String" );
    }
  }
View Full Code Here

  public URL fromStringValue(String string) throws HibernateException {
    try {
      return new URL( string );
    }
    catch ( MalformedURLException e ) {
      throw new HibernateException( "Unable to rebuild URL from String", e );
    }
  }
View Full Code Here

            table.getName(),
            ( table.getSchema() == null ) ? defaultSchema : table.getSchema(),
            ( table.getCatalog() == null ) ? defaultCatalog : table.getCatalog(),
                table.isQuoted());
        if ( tableInfo == null ) {
          throw new HibernateException( "Missing table: " + table.getName() );
        }
        else {
          table.validateColumns( dialect, mapping, tableInfo );
        }

      }
    }

    iter = iterateGenerators( dialect );
    while ( iter.hasNext() ) {
      PersistentIdentifierGenerator generator = (PersistentIdentifierGenerator) iter.next();
      Object key = generator.generatorKey();
      if ( !databaseMetadata.isSequence( key ) && !databaseMetadata.isTable( key ) ) {
        throw new HibernateException( "Missing sequence or table: " + key );
      }
    }
  }
View Full Code Here

        LOG.configuringFromUrl(url);
    try {
      return doConfigure( url.openStream(), url.toString() );
    }
    catch (IOException ioe) {
      throw new HibernateException( "could not configure from URL: " + url, ioe );
    }
  }
View Full Code Here

        LOG.configuringFromFile(configFile.getName());
    try {
      return doConfigure( new FileInputStream( configFile ), configFile.toString() );
    }
    catch (FileNotFoundException fnfe) {
      throw new HibernateException( "could not find file: " + configFile, fnfe );
    }
  }
View Full Code Here

        throw new MappingException( "invalid configuration", (Throwable) errors.get( 0 ) );
      }
      doConfigure( document );
    }
    catch (DocumentException e) {
      throw new HibernateException( "Could not parse configuration: " + resourceName, e );
    }
    finally {
      try {
        stream.close();
      }
View Full Code Here

      }
      Loader loader = getLoader( sess, searchFactoryImplementor );
      return new IteratorImpl( infos, loader );
    }
    catch ( IOException e ) {
      throw new HibernateException( "Unable to query Lucene index", e );
    }
    finally {
      try {
        closeSearcher( searcher, searchFactoryImplementor.getReaderProvider() );
      }
View Full Code Here

TOP

Related Classes of org.hibernate.HibernateException

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.