Log4j Problem: No appenders could be found for logger

I am migrating an existing app to log4j. I am using log4j 1.2.9. I have added the jar file to the classpath ahead of the weblogic classpath. I am using the log4j.xml file in the WEB-INF\classes directory. I get the following:
log4j:WARN No appenders could be found for logger (com.kstorm.logging.compdir).
log4j:WARN Please initialize the log4j system properly.\\
From reading I get the impression it is a path/classpath problem. I then added the log4j.xml to the path and still got the error.
Can anyone give me a hand with this?

Hello,
It looks like log4j has not found your log4j config file.
Make sure your config file is present and visible to your application. Is your config file wrapped up in a war file?
You may also see this error (rarely) if log4j is reading/picking up a differernt config file from the one you are expecting it to find (the one with your appender in it) in this unlikely case try searching for other possible log4j config files.
Cheers
Hussein Badakhchani
www.orbism.com

Similar Messages

  • Log4j: WARN No appenders could be found for logger

    Hi,
    I defined a log4j.properties file in my class directory:
    log4j.defaultInitOverride=false
    log4j.rootLogger=DEBUG, R, S
    log4j.appender.R=org.apache.log4j.RollingFileAppender
    log4j.appender.R.File=R.log
    log4j.appender.R.MaxFileSize=100KB
    log4j.appender.R.MaxBackupIndex=0
    log4j.appender.R.layout=org.apache.log4j.PatternLayout
    log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
    log4j.appender.S=org.apache.log4j.RollingFileAppender
    log4j.appender.S.File=S.log
    log4j.appender.S.MaxFileSize=100KB
    log4j.appender.S.MaxBackupIndex=0
    log4j.appender.S.layout=org.apache.log4j.PatternLayout
    log4j.appender.S.layout.ConversionPattern=%p %t %c - %m%n
    Then I used the Logger in loginAction.java:
    private Logger logger = Logger.getLogger("R");
    logger.setAdditivity(false);
    logger.info("LoginAction");
    and in OracleDAOFactory.java:
    private Logger logger = Logger.getLogger("S");
    logger.setAdditivity(false);
    logger.info("Connected to DB from customer DAO");
    what I want to achieve is to record the information for loginAction in R.log and record the information for OracleDAOFactory in S.log. But do NOT add loginAction's information into OracleDAOFactory, and vice versa.
    The above codes work properly if I remove the line "logger.setAdditivity(false);". However the result is both log files have the contents. But if I add the line "logger.setAdditivity(false);", I get the following error message:
    log4j:WARN No appenders could be found for logger (S).
    log4j:WARN Please initialize the log4j system properly.
    What is wrong with my above coding?
    Thanks for your help!

    I don't know if this applies to your situation, but I just resolved this problem in my own environment. It turns out, I was attempting to log something in an area of my code before the logger had been configured by calling the configure method of the PropertyConfigurator class and passing in the file name of the properties file as the argument. It's important to set up log4j before attempting to log to the output file, and I called a debug method before it was set up.

  • Getting error as :  log4j : WARN No appenders could be found for logger

    Hi all,
    I am using IBM - Rational Application Developer (RAD) for the development of my project service task.
    I am trying to use log4j to log various events like errors and warnings and so on ....
    But I am getting following errors in console window of RAD :
    {color:#ff0000}
    [8/5/08 10:12:18:001 IST] 00000038 SystemErr R log4j:WARN No appenders could be found for logger (VINValidationService).
    [8/5/08 10:12:18:001 IST] 00000038 SystemErr R log4j:WARN Please initialize the log4j system properly.{color}
    If you have any clue regarding how to get out of this then it would be of great help to me .... please reply soon ....!
    (Please note that I have tried all the ways of setting CLASSPATHS and BUILDPATHS in the RAD) .
    --- Thanking you in advance ...
    Akshay_L.

    You could read these to get some hints [http://www.google.co.uk/search?q=%22Please+initialize+the+log4j+system+properly.%22]
    The first reply to the first hit on google says "log4j.properties needs to be on the classpath where log4j can find it.".
    You can set the system property if you wish but the classpath approach is the easiest in my opinion.

  • Log4j:WARN No appenders could be found for logger (Log4jExample).

    Hi,
    I am getting this error when I try to use log4j to generate logs.The program works fine if I keep log4j.properties file and my logging program in the same directory.
    If it is different directory,how to make it work ? like below.
    Any help in this regard is appreciated.
    Thanks
    Chat
    C:\mjava\test > dir
    Log4jExample.java
    C:\mjava\test >java Log4jExample.java
    log4j:WARN No appenders could be found for logger (Log4jExample).
    log4j:WARN Please initialize the log4j system properly.
    import org.apache.log4j.*;
    public class Log4jExample
        private static final Logger log =
            Logger.getLogger(Log4jExample.class);
        public static void main(String[] args)
            try
                log.debug("This is a debug message.");
                int i = Integer.parseInt("Hello world");
            catch (java.lang.Exception ex)
                log.error("Caught an exception", ex);
    C:\mjava>dir
    log4j.properties

    I'd recommend you use the classpath. But don't put log4j.properties in the parent directory of where your java class is, or the classpath will end up being incorrect. Try putting it in a separate directory tree, or as a child directory of where your class lives.
    Then add the classpath option to the runtime.
    java -classpath .;otherDirectory Log4jExample
    (where "otherDirectory" is the directory that contains log4j.properties)

  • Log4j: Logging Errors(No appenders could be found for logger)

    hi,
    i used logging in my java application. i placed log4j.jar and log4j.xml file paths
    given in classpath.
    i am getting 2 warning Messages. Those are as follows
    Log4j:WARN. No appenders could be found for logger (Myclass.class)
    Log4j:WARN. Use Log4j System Properly.
    Here is what i done
    log4j.xml is external configuration file. I specified Appender and layout
    information in this.
    Here is log4j.xml content...
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
    <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
    <appender name="appender" class="org.apache.log4j.FileAppender">
    <param name="File" value="C:\LOG\log.txt"/>
    <param name="Append" value="false"/>
    <layout class="org.apache.log4j.SimpleLayout"/>
    </appender>
    <root>
    <priority value ="INFO"/>
    <appender-ref ref="appender"/>
    </root>
    </log4j:configuration>
    I specified appender and layout in log4j.xml file and placed log4j.xml file in
    classpath.
    How can i solve this problem?. Please help me.

    Ok. I'm no log4j expert, but if you try to get a logger called Myclass.class and have not defined one in your xml file, there's a problem? Look at my xml file below, especially the category tag. Instead of putting "All" for the name, you would put "Myclass.class".
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
    <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
    <appender name="file" class="org.apache.log4j.FileAppender">
    <param name="File" value="log/log.txt"/>
    <param name="Append" value="true"/>
    <layout class="org.apache.log4j.PatternLayout">
    <param name="ConversionPattern" value="%d %-5p [%t] %C{2} (%l) - %m\n"/>
    </layout>
    </appender>
    <appender name="console" class="org.apache.log4j.ConsoleAppender">
    <param name="Target" value="System.Out"/>
    <layout class="org.apache.log4j.PatternLayout">
    <param name="ConversionPattern" value="%d %-5p %C{1}.%M - %m\n"/>
    </layout>
    </appender>
    <!-- The All category -->
    <category name="All" additivity="false">
    <priority value="debug"/>
    <appender-ref ref="file"/>
    <appender-ref ref="console"/>
    </category>
    <!-- The one and only root category -->
    <root>
    <priority value="warn"/>
    <appender-ref ref="console"/>
    </root>
    </log4j:configuration>

  • Log4j:ERROR No appenders could be found for category

    Log not og

    In your top level class did you include a configurator?
    This is the minimum requirement:
    import org.apache.log4j.BasicConfigurator;
    BasicConfigurator.configure();Calling a configurator only needs to be done in the initialization of the application (not of each class), prior to the first call to log a message.
    I am responding to this because this thread about log4j got me thinging about a logging API and then to compare log4j to the Logger classes in 1.4. I started to use log4j and recalled that an error I saw was similar to your initial post.

  • Log4j:WARN No appenders could be found

    We are using weblogic 10.0.1 and JDK 1.6.
    We are using Log4j for logging, if I pass -Dlog4j.configuration=log4jconfig.xml in the startup script as a command line parameter weblogic console is displaying following warning messages. However, system properly initializes Log4j properly.
    Looks like beehive loggers are not initialized properly. In our log4jconfig.xml we have added appender for org.apache.
    log4j:WARN No appenders could be found for logger (org.apache.beehive.netui.pageflow.internal.AdapterManager).
    log4j:WARN Please initialize the log4j system properly.
    Please advise

    I've the same problem on weblogic 10.0.
    When the application code calls commons LogFactory for the first time, I see the following error messages.
    log4j:WARN No appenders could be found for logger (com.xxx.TestClass).
    log4j:WARN Please initialize the log4j system properly.
    Can someone explain why the same config file/setup works with Weblogic 8.1 but not with Weblogic 10.
    Thanks
    Kambiz
    Here is my folder structure
    -webroot
    +
    +-WEB-INF
    +classes
    | |--log4j.properties
    +lib
    +commons-logging.jar
    +log4j-1.2.15.jar                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Og4j:ERROR No appenders could be found for category

    Whats this mean and how do I recitfy the problem?

    You could read these to get some hints [http://www.google.co.uk/search?q=%22Please+initialize+the+log4j+system+properly.%22]
    The first reply to the first hit on google says "log4j.properties needs to be on the classpath where log4j can find it.".
    You can set the system property if you wish but the classpath approach is the easiest in my opinion.

  • No valid sequence could be found for the set of patches

    I get the following error message when installing Acrobat 8.0 Standard:
    "Windows Installer" No valid sequence could be found for the set of patches."
    The CD installed with no problems on another PC. Both PC are running XP Pro SP2. The virus scanner was disabled before installation. I also had uninstalled a older version of Acrobat and Reader before installation. Even attempted to install by launching the setup.exe file.
    Thanks.
    George

    This appears to be caused when nls codepages are missing from Windows..
    I use nLite to clear items out of my installations, and because these entries are missing, it fails to install. Apparently Microsoft Office has the same issue..
    I don't have a solution yet, but I am searching. This should help Adobe answer the question, though..

  • Project Server 2010 - Unable to open project, no valid Project Detail Page could be found for the project error

    I have a workflow being deployed for the first time on a farm. When I create a project with an EPT connected to the workflow it runs and can enter the required field in a PDP.  Then I Submit the workflow to go to the next stage and I get the "Unable
    to open project, no valid Project Detail Page could be found for the project" error.  After that the project is stuck on the same error.  All of the 18 stages have PDP and Schedules assigned to them.
    Any ideas on why the workflow cannot see the PDPs?  Is there a farm permissions that I am missing?  Thanks!

    Hi David,
    It starts to be a bit technical for me, but here is what I found on the web (seems to be an authentication issue with Sharepoint 2010):
    http://social.technet.microsoft.com/Forums/en-US/120ab535-63d2-4205-a51f-1987e9c0cf79/sharepoint-fba-the-content-type-texthtml-charsetutf8-of-the-response-message-does-not-match-the
    http://social.msdn.microsoft.com/Forums/silverlight/en-US/5cc70ff6-50d9-4cd3-b092-12007f4e495b/response-message-contenttypebindingtype-mismatch
    http://stackoverflow.com/questions/5263150/the-content-type-text-html-charset-utf-8-of-the-response-message-does-not-match
    Hope it will help you going forward in resolving your issue.
    Guillaume Rouyre - MBA, MCP, MCTS

  • Cannot update.  Get error message 1648, "no valid sequence could be found for the set of patches."

    Cannot update.  Get error message 1648, "no valid sequence could be found for the set of patches."

    Uninstall the corrupt Reader version using http://labs.adobe.com/downloads/acrobatcleaner.html then download and install the latest Reader from http://get.adobe.com/reader/enterprise/

  • JSF1091: No mime type could be found for file xyz.png.

    Hi all,
    I get error logs in weblogic server like :
    <ExternalContextImpl> <getMimeType> JSF1091: No mime type could be found for file xyz.png. To resolve this, add a mime-type mapping to the applications web.xml.
    I get this for all the image files ... I found something :
    http://www.java2s.com/Code/JavaAPI/javax.servlet.http/webxmlmimemapping.htm
    <mime-mapping>
            <extension>java</extension>
            <mime-type>text/plain</mime-type>
    </mime-mapping>
    What should I add (mime-type) for png files ?
    Thanks..

    You use 'image/png' for this. Refer to MIME Types - Complete List » HTML Elements| Learn HTML | Tags | Tutorials | HTML Cheat Sheet for more info.
    Timo

  • JSF1091: No mime type could be found for file image_name.png

    Hi Experts,
    JDEV 11.1.2
    why this message shown in the log......? also how can i add a mime-type mapping ?
    <ExternalContextImpl> <getMimeType> JSF1091: No mime type could be found for file image_name.png. To resolve this, add a mime-type mapping to the applications web.xml.
    PMS

    Edit your app's web.xml and add it?
    Google can find you examples like [url http://www.java2s.com/Code/JavaAPI/javax.servlet.http/webxmlmimemapping.htm]this

  • Error 1706 No valid source could be found for adobe reader x

    Error 1706 No valid source could be found for productAdobe reader X (10.1.4) Install cannot continue.
    On programs that need adobe reader, the page will not come up.
    I tried to restoring my system to a point before when adobe was working, and tried to reinstall adobe reader.
    the download stops at 80% and reports: cannot find file  AdbeRdr1010_en_us(1).msi

    Remove your current installed Reader using http://labs.adobe.com/downloads/acrobatcleaner.html
    then download and run the full installer from http://get.adobe.com/reader/enterprise/

  • Error:Administration header could not found for support message

    Hi All,
    we are creating the support message in CRMD_ORDER transaction. we are getting an error, "Administration header could not found for support message" while saving. And also it is coming out of the transaction.
    The transaction type is SLFN.
    Please advise.
    Regards
    kumar

    Did you find the solution to this error? I am also getting this error and need to solve the same. Can you please help?

Maybe you are looking for

  • Can I use files from a portable hard drive

    I have a project I need to edit All the files are HD and supplied on a portable USB3 hard drive. I can import them into final cut pro, but when I go and try to share the project or send it to compressor the options are all grey out? Do I need to save

  • Using time capsule to extend a network with security

    I have a time capsule and my roommate and I use the same wireless network. I want to add my time capsule to the network we both share but want to be sure only I will be able to access data on my time capsule i.e. external hard drive, back ups etc.  I

  • Production Order: warning when Basic finish date is before scheduled finish

    Hello experts, We will set in config OPU3 (scheduling parameters for prod order) Adjust dates = 2 Do not adjust basic dates, ... Essentially this will allow the shop floor controller to change scheduled date ie. production dates without affecting bas

  • Data modeler

    Hi, I am not pretty sure whether it is the right place to post this question. I am working as Sr. Oracle DBA and thinking of learning and switching my profession to Data modeler. But I wanted to know like as per hierarchy wise is data modeler positio

  • Slide show in imovie

    I am trying to make an imovie from pictures that I have in iphoto.  The pictures that I am using are about 25 years old-not the best quality but still good.  When I look at the movie in preview it all all looks good.  Once I burn the dvd the quality