Erro log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment)[RESOLVI]

Olá Pessoal!

Estou com um problema na compilção de um arquivo que não consigo resolver, no console do eclipse ele descreve o seguinte:

log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.

COMO RESOLVER?

vc tem que configurar o log4j

como configurar? não sei

http://hotwork.sourceforge.net/hotwork/manual/log4j/log4j-user-guide.html

Este erro estava acontecendo porque na classe HibernateUtil.java estava descrito da seguinte forma:

public class HibernateUtil {
	private static final SessionFactory sessionFactory;
	
	static{
		configuration.setProperty("hibernate.dialect","org.hibernate.dialect.MySQLDialect");
		configuration.setProperty("hibernate.connection.driver class","com.mysql.jdbc.Driver");
		configuration.setProperty("hibernate.connection.url","jdbc:mysql://localhost/jsf");
		configuration.setProperty("hibernate.connection.username","");
		configuration.setProperty("hibernate.connection.password","");
		configuration.setProperty("hibernate.c3p0.min_size","1");
		configuration.setProperty("hibernate.c3p0.max_size","5");
		configuration.setProperty("hibernate.c3p0.timeout","300");
		configuration.setProperty("hibernate.c3p0.max_statements","50");
		configuration.setProperty("hibernate.c3p0.idle_test_peiod","300");
		configuration.setProperty("hibernate.current_session_context_class","thread");
		configuration.setProperty("hibernate.show_sql","true");
		configuration.setProperty("hibernate.format_sql","true");
		configuration.addResource("model/bean/Fornecedor.hbm.xml");
		configuration.addResource("model/bean/Produto.hbm.xml");
		configuration.addResource("model/bean/Unidade.hbm.xml");
	               sessionFactory = configuration.buildSessionFactory();
	}

	public static SessionFactory getSessionfactory() {
		return sessionFactory;
	}
	
}

criei um arquivo dentro do pacote util chamado hibernate.cfg.xml “este arquivo não existia anteriormente” descrito abaixo:

<?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="dialect">org.hibernate.dialect.MySQLDialect</property>
		<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
		<property name="connection.url">jdbc:mysql://localhost/jsf</property>
		<property name="connection.username"></property>
		<property name="connection.password"></property>
		<property name="c3p0.min_size">1</property>
		<property name="c3p0.max_size">5</property>
		<property name="c3p0.timeout">300</property>
		<property name="c3p0.max_statements">50</property>
		<property name="c3p0.idle_test_period">300</property>
		<property name="current_session_context_class">thread</property>  
        <!-- Mostra o SQL-->
        <property name="show_sql">true</property>		
        <property name="format_sql">true</property>
		<mapping resource="model/bean/Unidade.hbm.xml"></mapping>
		<mapping resource="model/bean/Fornecedor.hbm.xml"></mapping>
		<mapping resource="model/bean/Produto.hbm.xml"></mapping>
		<!-- 
		<mapping class="model.bean.Produto"></mapping>
		<mapping class="model.bean.Fornecedor"></mapping>
		 -->
	</session-factory>
</hibernate-configuration>

com esta configuração alterei a classe HibernateUtil.java como está descrito abaixo:

import org.hibernate.SessionFactory;
import org.hibernate.cfg.AnnotationConfiguration;
import org.hibernate.cfg.Configuration;

public class HibernateUtil {
	private static final SessionFactory sessionFactory;
	
	static{
		AnnotationConfiguration configuration = new AnnotationConfiguration().configure("util/hibernate.cfg.xml");
/*		configuration.setProperty("hibernate.dialect","org.hibernate.dialect.MySQLDialect");
		configuration.setProperty("hibernate.connection.driver class","com.mysql.jdbc.Driver");
		configuration.setProperty("hibernate.connection.url","jdbc:mysql://localhost/jsf");
		configuration.setProperty("hibernate.connection.username","");
		configuration.setProperty("hibernate.connection.password","");
		configuration.setProperty("hibernate.c3p0.min_size","1");
		configuration.setProperty("hibernate.c3p0.max_size","5");
		configuration.setProperty("hibernate.c3p0.timeout","300");
		configuration.setProperty("hibernate.c3p0.max_statements","50");
		configuration.setProperty("hibernate.c3p0.idle_test_peiod","300");
		configuration.setProperty("hibernate.current_session_context_class","thread");
		configuration.setProperty("hibernate.show_sql","true");
		configuration.setProperty("hibernate.format_sql","true");
		configuration.addResource("model/bean/Fornecedor.hbm.xml");
		configuration.addResource("model/bean/Produto.hbm.xml");
		configuration.addResource("model/bean/Unidade.hbm.xml");
	*/	sessionFactory = configuration.buildSessionFactory();
	}

	public static SessionFactory getSessionfactory() {
		return sessionFactory;
	}
	
}

Funcionou normalmente!