Hibernate.cfg.xml not found

0 respostas
W

Olá pessoal, estou iniciando os estudos com o hibernate, após seguir uma apostila parei no seguinte erro: hibernate.cfg.xml not found Procurei no fórum, mas não consegui resolver. Eu uso o Eclipse wtp, vou descrever abaixo como está a estrutura de meus diretórios pra ver se alguém consegue detectar porque que o hibernate.cfg.xml não é encontrado.
ProjetoWeb\WebContent -->jsp’s (funcionam normalmente)
ProjetoWeb\WebContent\WEB-INF\MeuArquivo.hbm.xml, hibernate.cfg.xml, web.xml

No console aparece a seguinte mensagem:
[color=red]log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.[/color]
Eu coloquei o log4j-1.2.11.jar no path do java, mas não resolveu.

Abaixo está o código do hibernate.cfg.xml

[b]<?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>
<!-- DataBase connections settings -->
<property name=“connection.driver_class”>oracle.jdbc.OracleDriver</property>
<property name=“connection.url”>jdbc:oracle:thin:@localhost:1521:dba1</property>
<property name=“connection.username”>usuario</property>
<property name=“connection.password”>123456</property>

<!-- JDBC Connection Pool (use the buit-in) -->
<property name=“connection.pool_size”>1</property>
<!-- SQL Dialect -->
<property name=“dialect”>org.hibernate.dialect.OracleDialect</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”>false</property>

<mapping resource=“classes/Categorias.hbm.xml”/>
</session-factory>
</hibernate-configuration> [/b]Agradeço a ajuda.

Criado 20 de abril de 2008
Respostas 0
Participantes 1