Package org.hibernate

Examples of org.hibernate.HibernateException


      return (QueryCacheFactory) serviceRegistry.getService( ClassLoaderService.class )
          .classForName( queryCacheFactoryClassName )
          .newInstance();
    }
    catch (Exception e) {
      throw new HibernateException( "could not instantiate QueryCacheFactory: " + queryCacheFactoryClassName, e );
    }
  }
View Full Code Here


            .classForName( regionFactoryClassName )
            .newInstance();
      }
    }
    catch ( Exception e ) {
      throw new HibernateException( "could not instantiate RegionFactory [" + regionFactoryClassName + "]", e );
    }
  }
View Full Code Here

        return (RegionFactory) org.hibernate.internal.util.ReflectHelper.classForName( regionFactoryClassName )
            .newInstance();
      }
    }
    catch ( Exception e ) {
      throw new HibernateException( "could not instantiate RegionFactory [" + regionFactoryClassName + "]", e );
    }
  }
View Full Code Here

      return (QueryTranslatorFactory) serviceRegistry.getService( ClassLoaderService.class )
          .classForName( className )
          .newInstance();
    }
    catch ( Exception e ) {
      throw new HibernateException( "could not instantiate QueryTranslatorFactory: " + className, e );
    }
  }
View Full Code Here

        sqlGenerator.whereClause( whereClause );
        userWhereClause = sqlGenerator.getSQL().substring( 7 )// strip the " where "
        idSelectParameterSpecifications = sqlGenerator.getCollectedParameters();
      }
      catch ( RecognitionException e ) {
        throw new HibernateException( "Unable to generate id select for DML operation", e );
      }
      if ( whereJoinFragment.length() > 0 ) {
        whereJoinFragment += " and ";
      }
    }
View Full Code Here

      Node sequence = getSequence( idSourceKey );

      if ( sequence == null ) {
        // sequence nodes are expected to have been created up-front
        if ( idSourceKey.getMetadata().getType() == IdSourceType.SEQUENCE ) {
          throw new HibernateException( "Sequence missing: " + idSourceKey.getMetadata().getName() );
        }
        // table sequence nodes (think of them as rows in a generator table) are created upon first usage
        else {
          addTableSequence( idSourceKey.getMetadata(), (String) idSourceKey.getColumnValues()[0], initialValue );
          sequence = getSequence( idSourceKey );
View Full Code Here

      case Types.CHAR:
      case Types.LONGVARCHAR:
      case Types.VARCHAR:
        return false;
      default:
        throw new HibernateException( "Unable to persist an Enum in a column of SQL Type: " + paramType );
    }
  }
View Full Code Here

          return candidateProperty;
        }
      }
    }

    throw new HibernateException( "Couldn't determine main side role for collection " + collectionPersister.getRole() );
  }
View Full Code Here

      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

      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

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.