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.

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.

  • 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 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

  • 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                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • 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>

  • 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/

  • 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.

  • 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.

  • Getting error with Log4j

    Hi,
    Not sure if this is the right place to post this as it is a problem with log4j really and not java. Let me know if this needs moving.
    Here goes:
    I have a servlet in tomcat that uses log4j to log details, this works fine on all the systems at home and work, but I get the following error when it is run on our customers site:
    log4j: No appenders could be found for category (some.category.name).
    log4j: Please initialize the log4j system properly.
    I have looked this up on log4j's website, they give the following advice:
    Log4j does not have a default logging target. It is the user's responsibility to ensure that all categories can inherit an appender. This can be easily achieved by attaching an appender to the root category.
    This works fine off site? I have the following log4j.properties in the WEB-INF/classes dir in tomcat:
    log4j.rootCategory=DEBUG, dest1
    log4j.appender.dest1=org.apache.log4j.FileAppender
    log4j.appender.dest1.file=/rmx.log
    log4j.appender.dest1.layout=org.apache.log4j.PatternLayout
    log4j.appender.dest1.layout.ConversionPattern=%-5p %l %x: %m%nAny ideas?
    Thanks in advance.
    Phil Maskell

    I have added code similar to what you suggested,
    being deployed on Tomcat I get the following:
    java.class.path=C:\Program Files\Apache Group\Tomcat
    5.5\bin\bootstrap.jar
    Is this what I should get? This is on my working
    system.That was probably not a good test (in hindsight). Tomcat's classpath is evidently not where its servlet classloader looks for classes.
    My log4j code uses a logFactory, in a final class,
    will this have any effect on the class path?The fact that the class is final will have no effect on any classloading. I doubt whether a logfactory will either, but I don't know what that is.
    P.S I could post my Logger.java, but stupid thing is
    it works fine on all my systems, just not on the
    customers :(I put my log4j.properties in the web app's WEB-INF/classes directory, just like you did. If your customer's system is not working the same as yours then you are probably wasting your time looking at Java code. The two systems are not configured the same and you need to find the difference.

  • Keep getting error message saying ipod detected but could not be identified properly - I have tried all the steps on the support page twice and it still will not work!  I am running windows 8 (which it has worked with ok before) - struggling :(

    keep getting error message saying ipod detected but could not be identified properly - I have tried all the steps on the support page twice and it still will not work!  I am running windows 8 (which it has worked with ok before) - struggling
    I recently bought some new albums and can't play them on my ipod

    I just encountered the same problem on my 2 month old MBPro.  I found a work around by changing USB ports.  As for the actual cause or the reason why that worked, I dont know.  The USB port I was using works fine with my phone or other USB devices.

  • HP Scanjet G4050. Get "Error 1706.No valid source could be found for product ScannerCopy...."

    I just bought a new Scanjet G4050 and when I try to install the software I get an error message and the software will not install. Error message is:"Error 1706.No valid source could be found for product ScannerCopy. The Windows Installer cannot continue." During the install, I was prompted to enter a CD or other location to load ScannerCopy.
    I had an older version of this same Scanjet G4050 working on my PC about a year ago. My PC is running Vista 64.
    Any ideas how I can get the software to successfully load? Any ideas of where I can get this "ScannerCopy" that the software is asking for? 

    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/

  • 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

  • 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