Solved

No appendors found for category

Posted on 2010-09-15
4
380 Views
Last Modified: 2012-05-10
I am receiving the following error(s) when running a command for updates and I am not sure of the problem.


log4j:ERROR No appenders could be found for category (com.example.application.db.DatabaseAccess).
log4j:ERROR Please initialize the log4j system properly.

Below is my log4j properties file.


# Set root category priority to DEBUG with both the Console and
RollingFile
# appenders defined below
log4j.rootCategory=DEBUG, RollingFile

# RollingFile is set to be a RollingFileAppender
log4j.appender.RollingFile=org.apache.log4j.RollingFileAppender
log4j.appender.RollingFile.File=${ICX_HOME}/log/agent.log
log4j.appender.RollingFile.MaxFileSize=1MB
log4j.appender.RollingFile.MaxBackupIndex=10

# RollingFile uses PatternLayout
log4j.appender.RollingFile.layout=org.apache.log4j.PatternLayout
# Print the date in ISO 8601 format
log4j.appender.RollingFile.layout.ConversionPattern=%d (%x)[%t] %-5p
%c{1} - %m%n

# Print only messages of priority XXX or above in the package
com.example.application
log4j.category.com.example.application=INFO
log4j.category.com.example.application.agent=INFO
log4j.category.com.example.application.agent.task.TaskBase=DEBUG
log4j.category.com.example.application.agent.protocol.snmp.ContextMan
ager=WARN

# ThreadDumpRollingFile is set to be a RollingFileAppender
log4j.appender.ThreadDumpRollingFile=org.apache.log4j.RollingFileAppende
r
log4j.appender.ThreadDumpRollingFile.File=${ICX_HOME}/log/threaddump.log
log4j.appender.ThreadDumpRollingFile.MaxFileSize=10MB
log4j.appender.ThreadDumpRollingFile.MaxBackupIndex=10

# ThreadDumpRollingFile uses PatternLayout
log4j.appender.ThreadDumpRollingFile.layout=org.apache.log4j.PatternLayo
ut
# Print the date in ISO 8601 format
log4j.appender.ThreadDumpRollingFile.layout.ConversionPattern=%d
(%x)[%t] %-5p %c{1} - %m%n

log4j.category.com.example.common.thread=DEBUG, ThreadDumpRollingFile

Any insight as to what could be causing this would be much appreciated.
0
Comment
Question by:Milenkan
4 Comments
 
LVL 92

Accepted Solution

by:
objects earned 500 total points
ID: 33687349
sounds like its not finding your log4j.properties file
make sure it is in a directory that is in your classpath
0
 
LVL 16

Expert Comment

by:Valeri
ID: 33690815
You really have not defined this category. Since category is already deprecated I recommend you to change Category with logger, so replace line
log4j.rootCategory=DEBUG, RollingFile
with
log4j.rootLogger=DEBUG, RollingFile
Then replace this lines:
log4j.category.com.example.application=INFO
log4j.category.com.example.application.agent=INFO
log4j.category.com.example.application.agent.task.TaskBase=DEBUG
log4j.category.com.example.application.agent.protocol.snmp.ContextMan
ager=WARN
with this lines:
log4j.logger.com.example.application=INFO
log4j.logger.com.example.application.agent=INFO
log4j.logger.com.example.application.agent.task.TaskBase=DEBUG
log4j.logger.com.example.application.agent.protocol.snmp.ContextMan
ager=WARN
In this case you will have rootLoger and the loggers not presented will have defaul level taken from the rootLogger. Hope it will help you!
0
 
LVL 27

Expert Comment

by:mrcoffee365
ID: 37419055
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
groupSum5 challenge 5 85
ArrayIndexOutOfBoundException 9 82
Cipher Configuration on Apache HTTPD 4 62
custom annotations 9 39
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question