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
|