Package org.hibernate

Examples of org.hibernate.AnnotationException


      }
      inheritanceAnnotation = JandexHelper.getSingleAnnotation(
          info, JPADotNames.INHERITANCE
      );
      if ( inheritanceAnnotation != null ) {
        throw new AnnotationException(
            String.format(
                "The inheritance type for %s must be specified on the root entity %s",
                hierarchyListString( classes ),
                rootClassInfo.name().toString()
            )
View Full Code Here


  private static AccessType throwIdNotFoundAnnotationException(List<ClassInfo> classes) {
    StringBuilder builder = new StringBuilder();
    builder.append( "Unable to determine identifier attribute for class hierarchy consisting of the classe(s) " );
    builder.append( hierarchyListString( classes ) );
    throw new AnnotationException( builder.toString() );
  }
View Full Code Here

              "with @Embeddable. Are all annotated classes added to the configuration?",
          getConfiguredClass().getSimpleName(),
          attributeName,
          type.getSimpleName()
      );
      throw new AnnotationException( msg );
    }

    localBindingContext.resolveAllTypes( type.getName() );
    EmbeddableHierarchy hierarchy = EmbeddableHierarchy.createEmbeddableHierarchy(
        localBindingContext.<Object>locateClassByName( embeddableClassInfo.toString() ),
View Full Code Here

    }
    else if ( discoveredAttributeTypes.size() == 1 ) {
      return discoveredAttributeTypes.keySet().iterator().next();
    }
    else {
      throw new AnnotationException( "More than one association type configured for property  " + getName() + " of class " + getName() );
    }
  }
View Full Code Here

      for ( String className : classNames ) {
        try {
          metadataSourceQueue.add( reflectionManager.classForName( className, this.getClass() ) );
        }
        catch ( ClassNotFoundException e ) {
          throw new AnnotationException( "Unable to load class defined in XML: " + className, e );
        }
      }
    }
  }
View Full Code Here

      String dependentTable = sp.getValue().getTable().getQuotedName();
      if ( dependentTable.compareTo( startTable ) == 0 ) {
        StringBuilder sb = new StringBuilder(
            "Foreign key circularity dependency involving the following tables: "
        );
        throw new AnnotationException( sb.toString() );
      }
      buildRecursiveOrderedFkSecondPasses( orderedFkSecondPasses, isADependencyOf, startTable, dependentTable );
      if ( !orderedFkSecondPasses.contains( sp ) ) {
        orderedFkSecondPasses.add( 0, sp );
      }
View Full Code Here

      for ( Column column : unboundNoLogical ) {
        sb.append( column.getName() ).append( ", " );
      }
      sb.setLength( sb.length() - 2 );
      sb.append( " not found" );
      throw new AnnotationException( sb.toString() );
    }
  }
View Full Code Here

        log.info( "Hibernate Validator not found: ignoring" );
      }
      isValidatorNotPresentLogged = true;
    }
    catch ( NoSuchMethodException e ) {
      throw new AnnotationException( e );
    }
    if ( applyMethod != null ) {
      for ( PersistentClass persistentClazz : classes.values() ) {
        //integrate the validate framework
        String className = persistentClazz.getClassName();
View Full Code Here

      Object validateEventListener;
      try {
        validateEventListener = validateEventListenerClass.newInstance();
      }
      catch ( Exception e ) {
        throw new AnnotationException( "Unable to load Validator event listener", e );
      }
      {
        boolean present = false;
        PreInsertEventListener[] listeners = getEventListeners().getPreInsertEventListeners();
        if ( listeners != null ) {
View Full Code Here

  private static Object instantiateEventListener(Class<?> clazz) {
    Object searchEventListener;
    try {
      searchEventListener = clazz.newInstance();
    } catch (Exception e) {
      throw new AnnotationException(
          "Unable to load Search event listener", e);
    }
    return searchEventListener;
  }
View Full Code Here

TOP

Related Classes of org.hibernate.AnnotationException

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.