-->
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.  [ 4 posts ] 
Author Message
 Post subject: I AM GETTING THIS ERROR WHILE RUNNING THROUGH CONSOLE
PostPosted: Tue May 22, 2007 12:43 am 
Newbie

Joined: Tue May 22, 2007 12:31 am
Posts: 3
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

IF WE RUN THROUGH ECLIPSE, IT IS RUNNING.

HOW TO MAKE THIS contact.hbm.xml FILE AVAILABLE WHILE RUNNING THROUGH CONSOLE.[/quote]


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 22, 2007 6:27 am 
Senior
Senior

Joined: Thu May 17, 2007 2:31 am
Posts: 194
Location: Sri Lanka
Hi

Keep .hbm.xml files with .class files. (at same location )


Amila


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 22, 2007 9:26 am 
Expert
Expert

Joined: Fri Aug 19, 2005 2:11 pm
Posts: 628
Location: Cincinnati
umm, add the location of the hbm files to your classpath.

_________________
Chris

If you were at work doing this voluntarily, imagine what you'd want to see to answer a question.


Top
 Profile  
 
 Post subject: getting error after including .cfg.xml hbm.xml" files
PostPosted: Wed May 23, 2007 2:11 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)

[quote="kochcp"]umm, add the location of the hbm files to your classpath


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.