aspose file tools*
The moose likes Other Open Source Projects and the fly likes To solve error() of Log4J Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "To solve error() of Log4J" Watch "To solve error() of Log4J" New topic
Author

To solve error() of Log4J

sr shashidhar
Greenhorn

Joined: Jan 17, 2013
Posts: 27
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

Joined: Aug 11, 2011
Posts: 440

Did you add the jar file on your classpath ?


Muhammad Saif Asif Mirza
OCJA(5/6) OCJP(6) OCJWCD(6)
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18860
    
    8



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

Joined: Jan 17, 2013
Posts: 27
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: To solve error() of Log4J