-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: After including hbm.xml,cfg.xml files then also i got error
PostPosted: Wed May 23, 2007 2:16 am 
Newbie

Joined: Tue May 22, 2007 12:31 am
Posts: 3
1)When i run First time , this error has occured,
then i included "hibernate.cfg.xml" file

log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.
/hibernate.cfg.xml not found
Exception in thread "main" java.lang.NullPointerException
at roseindia.tutorial.hibernate.FirstExample.main(Unknown Source)

2)when i tried like this, then i included "contact.hbm.xml" file

log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.
Resource: contact.hbm.xml not found
Exception in thread "main" java.lang.NullPointerException
at roseindia.tutorial.hibernate.FirstExample.main(Unknown Source)


3)when i tried, i got the error

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" java.lang.NullPointerException
at roseindia.tutorial.hibernate.FirstExample.main(Unknown Source)

All these times the set Classpath is

java -classpath "/anjiE003/16thMay/hibernate/part1/lib/hibernate3.jar":"/anjiE003/16thMay/hibernate/part1/lib/log4j-1.2.9.jar":"/anjiE003/16thMay/hibernate/part1/lib/antlr-2.7.4.jar":"/anjiE003/16thMay/hibernate/part1/lib/jta.jar":"/anjiE003/16thMay/hibernate/part1/lib/commons-logging-1.0.4.jar":"/anjiE003/16thMay/hibernate/part1/lib/hsqldb.jar":"/anjiE003/16thMay/hibernate/part1/lib/cglib-full-2.0.2.jar":"/anjiE003/16thMay/hibernate/part1/lib/commons-collections-2.1.1.jar":"/anjiE003/16thMay/hibernate/part1/lib/dom4j-1.5.2.jar":"/anjiE003/16thMay/hibernate/part1/lib/jdbc2_0-stdext.jar":"/anjiE003/16thMay/hibernate/part1/lib/mysql-connector-java-3.0.16-ga-bin.jar":"/anjiE003/sampleapplications/hibernate/src/first.jar":. roseindia.tutorial.hibernate.FirstExample

can u tell me why this error is coming and solution for that

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" java.lang.NullPointerException
at roseindia.tutorial.hibernate.FirstExample.main(Unknown Source)


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 23, 2007 4:53 am 
Newbie

Joined: Wed May 23, 2007 3:54 am
Posts: 2
Hello,

What do you mean by:

Quote:
then i included "hibernate.cfg.xml" file


Also, you should properly configure log4j in order to get proper logging.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.