Solved

No appendors found for category

Posted on 2010-09-15
4
386 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
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…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

691 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