I create my HibernateUtil as follows:
public class HibernateUtil { private static final SessionFactory sessionFactory; static { try {
Therefore, when I try to execute the HQL command in the HQL editor in Eclipse (using Hibernate Tools), the following error appears:
Why is this happening? This will not change the setting of AnnotationConfiguration with ConfigureAnnotation?
UPDATE
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> <hibernate-configuration> <session-factory> <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property> <property name="hibernate.connection.password"><password></property> <property name="hibernate.connection.url">jdbc:mysql://<hostname>:3306/<schema></property> <property name="hibernate.connection.username">root</property> <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property> <property name="hibernate.format_sql">true</property> <property name="hibernate.show_sql">true</property> <property name="hibernate.c3p0.acquire_increment">2</property> <property name="hibernate.c3p0.max_size">20</property> <property name="hibernate.c3p0.min_size">5</property> <property name="hibernate.c3p0.timeout">180</property> <property name="hibernate.c3p0.idle_test_period">100</property> <mapping class="com.suaparte.pojo.Area" /> </session-factory> </hibernate-configuration>
Thanks in advance.
eclipse hibernate hibernate-tools
Valter silva
source share