This is the o/p i got <--- o/p ---> log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment). log4j:WARN Please initialize the log4j system properly. java.lang.NullPointerException at com.ibm.hibernate_article.InsertDept.main(InsertDept.java:66) Exception in thread "main" Error reading resource: Department.hbm.xml <--- o/p -->
I used department table in db2 and department bean in java.
follwing are the files i used
Suggest me some answer
[ Edited to include code tags - Paul Sturrock ] [ November 09, 2006: Message edited by: Paul Sturrock ]
Exception in thread "main" Error reading resource: Department.hbm.xml
This is just part of the exception that you might be seeing. Unless you post the entire stacktrace, i can just do some guess work. Looks like you have not placed the Department.hbm.xml in the right place and hibernate is not able to locate it.
try putting both hibernate.cfg.xml and department.hbm.xml in to classpath and run the application. please tell about the result.
Joined: Nov 08, 2006
I created one variable configxml under this c:/hibernate/Test hibernate.cfg.xml,department.hbm.xml are there.I am using WSAD .Iadded through ADD VAriable.still I am getting Error reading resource "department.xml". Directory Structure is Test: :roseindia.tutorial.hibernate : Department.java : :FirstExample.java epartment.hbm.xml :hibernate.cfg.xml : Libraraies
Suggest me some answer. thanks
[ Edited to disable smilies - Paul Sturrock ] [ November 10, 2006: Message edited by: Paul Sturrock ]
subject: In hibernate Follwowing error occured "Error reading resource: Department.hbm.xml"