Pessoal,
Estou com o seguinte erro
log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.
Could not parse mapping document from resource ClienteDAO.hbm.xml
Segue o arquivo hibernate.Conexao.cfg.xml
<?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.microsoft.jdbc.sqlserver.SQLServerDriver</property>
<property name=“hibernate.connection.password”>7991</property>
<property name=“hibernate.connection.url”>jdbc:sqlserver://wmoc;instanceName=SQLEXPRESS;port=1433;DatabaseName=DBLocadora2</property>
<property name=“hibernate.connection.username”>sa</property>
<property name=“hibernate.dialect”>org.hibernate.dialect.SQLServerDialect</property>
<mapping resource="ClienteDAO.hbm.xml"/>
<mapping resource="DependenteDAO.hbm.xml"/>
<mapping resource="EnderecoDAO.hbm.xml"/>
<mapping resource="FilmeDAO.hbm.xml"/>
<mapping resource="FitaDAO.hbm.xml"/>
<mapping resource="FornecedorDAO.hbm.xml"/>
<mapping resource="FuncionarioDAO.hbm.xml"/>
<mapping class="entidade.Cliente"/>
</session-factory>
</hibernate-configuration>
Arquivo ClienteDAO.hbm.xml
<?xml version=“1.0” encoding=“UTF-8”?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
“http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd”>
<hibernate-mapping>
<class name=“entidade.Cliente” table=“CLIENTE”>
<id name=“lngCodigo” column=“LNGCODIGO” type=“int”>
<generator class=“increment”></generator>
</id>
<!-- Propriedades e campos -->
<property name=“strNome”></property>
<property name=“strTelefone”></property>
<property name=“strCPF”></property>
<property name=“lngEndereco”></property>
</class>
</hibernate-mapping>
Classe ClienteDAO
package entidadeDAO;
import org.hibernate.HibernateException;
import org.hibernate.Session;
import entidade.Cliente;
public class ClienteDAO {
public static void inserirCliente(Cliente cliente){
Session session = null;
try{
session = HibernateUtil.getSession();
session.beginTransaction();
session.save(cliente);
session.getTransaction().commit();
session.close();
}catch(HibernateException e1){
System.out.println(e1.getMessage());
} finally{
if (session != null){
session.getTransaction().rollback();
}
}
}
}
Alguém sabe o motivo do erro?