I beg your pardon for my english.
All is in operation normally and functions the way that I also expected it. I.e.: @NotNull and @Email annotations works good.
hibernate.cfg.xml is default for my project. I haven't added any specific information about Hibernate Validator.
Code:
<hibernate-configuration>
<session-factory>
<!-- Database connection settings -->
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="connection.url">jdbc:mysql://localhost:3306/hibernate_test</property>
<property name="connection.username">root</property>
<property name="connection.password">***</property>
<!-- JDBC connection pool (use the built-in) -->
<property name="connection.pool_size">1</property>
<!-- SQL dialect -->
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<!-- Enable Hibernate's automatic session context management -->
<property name="current_session_context_class">thread</property>
<!-- Disable the second-level cache -->
<property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
<!-- Echo all executed SQL to stdout -->
<property name="show_sql">true</property>
<!-- Drop and re-create the database schema on startup -->
<property name="hbm2ddl.auto">update</property>
<property name="id.new_generator_mappings">true</property>
<mapping class="ru.bytex.domain.Player"/>
</session-factory>
</hibernate-configuration>
But when I start project, I see in log:
Code:
[INFO] 05 jul 2011 17:59:56,018 http-thread-pool-8080(2) [org.hibernate.cfg.Configuration]
Hibernate Validator not found: ignoring
It seems, that hibernate isn't able to find Hibernate Validator, but I've added dependecy and Hibernate Validator works good indeed.
Perhaps that all needs to be... Or I forgot something to configure?