Examples of HibernateException


Examples of org.hibernate.HibernateException

    String enumClassName = parameters.getProperty( ENUM );
    try {
      enumClass = ReflectHelper.classForName( enumClassName, this.getClass() ).asSubclass( Enum.class );
    }
    catch (ClassNotFoundException exception) {
      throw new HibernateException( "Enum class not found", exception );
    }
    // is might be good to call it here, to see a possible error immediately
    // initEnumValue();
   
    //nullify unnullified properties yuck!
View Full Code Here

Examples of org.hibernate.HibernateException

      try {
        Method method = enumClass.getDeclaredMethod( "values" );
        enumValues = (Object[]) method.invoke( null );
      }
      catch (Exception e) {
        throw new HibernateException( "Error while accessing enum.values(): " + enumClass, e );
      }
    }
  }
View Full Code Here

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

Examples of org.hibernate.HibernateException

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

Examples of org.hibernate.HibernateException

        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

Examples of org.hibernate.HibernateException

      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

Examples of org.hibernate.HibernateException

        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

Examples of org.hibernate.HibernateException

      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

Examples of org.hibernate.HibernateException

      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

Examples of org.hibernate.HibernateException

          return candidateProperty;
        }
      }
    }

    throw new HibernateException( "Couldn't determine main side role for collection " + collectionPersister.getRole() );
  }
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.