Examples of HibernateException


Examples of org.hibernate.HibernateException

      Number id = (Number) idFromDB;
      //idFromDB is the one used and the BD contains the next available value to use
      return id;
    }
    else {
      throw new HibernateException( "Cannot increment a non numeric field" );
    }
  }
View Full Code Here

Examples of org.hibernate.HibernateException

      return null;
    }
    else {
      // in the relational mode, collection owner means cartesian product
      // does not make sense in OGM
      throw new HibernateException( "More than one row with the given identifier was found: " + id
          + ", for class: " + getEntityPersisters()[0].getEntityName() );
    }
  }
View Full Code Here

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

Examples of org.hibernate.HibernateException

      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

Examples of org.hibernate.HibernateException

  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

Examples of org.hibernate.HibernateException

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

Examples of org.hibernate.HibernateException

  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

Examples of org.hibernate.HibernateException

            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

Examples of org.hibernate.HibernateException

        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

Examples of org.hibernate.HibernateException

        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
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.