Error creating bean sessionFactory

Try adding following maven dependencies (or download the JAR's if you don't use Maven):

  • Hibernate Validator
  • Javax Validation

Other dependencies might also be required (consider to use Maven if you are not yet, to avoid issues like this)


Hibernate raises an exception: throw new HibernateException( "Unable to get the default Bean Validation factory", e); if it can not access Bean Validation Framework (BeanValidationActivator).

So I guess the problem is that the Validation jars are missing.

For Maven:

    <dependency>
        <groupId>javax.validation</groupId>
        <artifactId>validation-api</artifactId>
        <version>1.0.0.GA</version>
    </dependency>
    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-validator</artifactId>
        <version>4.0.2.GA</version>
    </dependency>