• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

To solve error() of Log4J

 
sr shashidhar
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends, in the following code getting

Error: "The method error(Exception) is undefined for the type Logger"

added log4j-1.2.15.jar to "WEB-INF/lib" directory. how to solve this problem?




Thanks
Shashidhar
 
Saif Asif
Ranch Hand
Posts: 440
Eclipse IDE Hibernate Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you add the jar file on your classpath ?
 
Paul Clapham
Sheriff
Posts: 21152
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Don't do that. You need to use the Logger class from log4j, not that Logger class.
 
sr shashidhar
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Clapham wrote:

Don't do that. You need to use the Logger class from log4j, not that Logger class.



Ok, Its worked after using

import org.apache.log4j.Logger;

Thanks
Shashidhar
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic