Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

log4j error

 
Anil Kumardvg
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi friends i am trying to run the program given in roseindia.net
I am getting error, I have gone through with some mailing list for same error but i am not able to solve it, can any one help me.

log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.
Inserting Record
Done
Hibernate: insert into CONTACT(FIRSTNAME,LASTNAME,EMAIL,ID) values(?,?,?,?)
 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually there is no error there. The message you see about log4j is only a Warn message. Simply because you do not have a log4j.xml file. No biggie, the program still works.

If you want to learn more about log4j, please use the log4j forum we have, or Apache's website for the log4j project.

Mark
 
Anil Kumardvg
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you Spritzler

Inserting Record
Done
Hibernate: insert into CONTACT(FIRSTNAME,LASTNAME,EMAIL,ID) values(?,?,?,?)

when i run the program its showing like this, but records are not inserting to the database and where do i find that log4j.xml and what is the use of that.
 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, do you commit the transaction to make the records stick. What is the code that you are using, maybe posting it might help. Because by what is printed out in the console that you posted says to me that it inserted the record.

log4j is Apaches Logging API, http://www.jajakarta.org/log4j/jakarta-log4j-1.1.3/docs/documentation.html is where you will find its documentation.

Good Luck

Mark
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!