Erro com Hibernate

Pessoal…

Estou fazendo uma aplicação com Hibernate, mas ele nao encontra o hibernate.cfg.xml.

Sendo que esta na raiz do WEB-INF.

O que poderia ser?

log4j:WARN No appenders could be found for logger (br.com.cp.util.hibernate.HibernateBaseDAO). log4j:WARN Please initialize the log4j system properly. org.hibernate.HibernateException: /WEB-INF/hibernate.cfg.xml not found at org.hibernate.cfg.Configuration.getConfigurationInputStream(Configuration.java:1087) at org.hibernate.cfg.Configuration.configure(Configuration.java:1111) at br.com.cp.util.HibernateUtil.<clinit>(HibernateUtil.java:29) at br.com.cp.util.hibernate.HibernateBaseDAO.insertTransaction(HibernateBaseDAO.java:279) at br.com.cp.cadastros.business.service.impl.AmbienteAulaServiceImpl.insertAmbienteAula(AmbienteAulaServiceImpl.java:57) at br.com.cp.teste.AmbienteAulaTeste.main(AmbienteAulaTeste.java:22) Exception in thread "main" java.lang.ExceptionInInitializerError at br.com.cp.util.HibernateUtil.<clinit>(HibernateUtil.java:33) at br.com.cp.util.hibernate.HibernateBaseDAO.insertTransaction(HibernateBaseDAO.java:279) at br.com.cp.cadastros.business.service.impl.AmbienteAulaServiceImpl.insertAmbienteAula(AmbienteAulaServiceImpl.java:57) at br.com.cp.teste.AmbienteAulaTeste.main(AmbienteAulaTeste.java:22) Caused by: org.hibernate.HibernateException: /WEB-INF/hibernate.cfg.xml not found at org.hibernate.cfg.Configuration.getConfigurationInputStream(Configuration.java:1087) at org.hibernate.cfg.Configuration.configure(Configuration.java:1111) at br.com.cp.util.HibernateUtil.<clinit>(HibernateUtil.java:29)

Abs´s

:lol: :lol: :lol: :lol: :lol: :lol: :lol:

org.hibernate.HibernateException: /WEB-INF/hibernate.cfg.xml not found

Você precisa criar um arquivo hibernate.cfg.xml e colocar dentro do seu context, na pasta /WEB-INF.