Solved

No appendors found for category

Posted on 2010-09-15
4
378 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 26

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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
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…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

744 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now