• Dear Guest, Please do NOT forget to join our JAVA JOBS (ONLY) FACEBOOK GROUP to be aware of latest JAVA openings, and you may also post any JAVA related queries/jobs.

hibernate bigginer

hello friends .....please help me

log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main" org.hibernate.HibernateException: /hibernate.cfg.xml not found
at org.hibernate.util.ConfigHelper.getResourceAsStream(ConfigHelper.java:170)
at org.hibernate.cfg.Configuration.getConfigurationInputStream(Configuration.java:1439)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1461)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1448)
at TestClient.main(TestClient.java:12)

i am getting above problem while running my appln in Eclipse.... please help me
leave about log4j error. it is about configuring log4j tool into your application..

coming to your error the jvm unable to find your xml configuration file i.e hibernate.cfg.xml.

it is better check out your xml configuration file.

otherwise you can do like this..
inside configure() method place your xml config file even it has any name.


Configuration cfg=new Configuration();
cfg.configure("<xml name>")