java - Please initialize the log4j system properly. While running web service -



java - Please initialize the log4j system properly. While running web service -

maybe looks silly inquire confused. referred configuring log4j property doesn't seem help.

i have written simple web service helloworld. , while running getting error :

log4j:warn no appenders found logger (org.apache.axis.transport.http.axisservlet). log4j:warn please initialize log4j scheme properly.

i not sure why happening.

i generating web-service using eclipse , deployed in tomcat 6.0. check on axis developer's guide , according them

log4j.configuration=log4j.properties utilize scheme property specify name of log4j configuration file. if not specified, default configuration file log4j.properties. log4j.properties file provided in axis.jar.

i didn't find log4j.properties in axis.jar.

any help on this?

those messages tricky, plenty people created create clearer: https://issues.apache.org/bugzilla/show_bug.cgi?id=25747

what's tricky them warnings written if log4j can't find log4j.properties (or log4j.xml) file, if file fine , dandy content not finish configuration point of view.

the next paragraph taken here: http://svn.apache.org/repos/asf/logging/log4j/tags/v1_2_9/docs/troubleshoot.html

logging output written target using appender. if no appenders attached category nor of ancestors, next message when trying log:

log4j: no appenders found category (some.category.name). log4j: please initialize log4j scheme properly.

log4j not have default logging target. user's responsibility ensure categories can inherit appender. can achieved attaching appender root category.

you can find info on how configure root logger (log4j.rootlogger) in log4j documentation, adding simple @ origin of file:

log4j.rootlogger=debug, stdout log4j.appender.stdout=org.apache.log4j.consoleappender log4j.appender.stdout.layout=org.apache.log4j.patternlayout log4j.appender.stdout.layout.conversionpattern= ...

this should clear warn messages on startup (make sure don't have appender named stdout; carefull of level give root logger, debug verbose , every library in app start writing stuff console).

as log4j.properties/log4j.xml, suggest place file in /web-inf/classes of import have exposed different tweaks (activating/deactivating logs, changing log levels etc). can have within jar in classpath (as specified in comment), enclosed in archive (hopefully in right place within archive) , won't easy handle if in /web-inf/classes.

java web-services log4j axis

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -