Link to home
Start Free TrialLog in
Avatar of drnick
drnick

asked on

tomcat, axis, eclipse and log4




i installed tomcat, axis, eclipse like to be viewed under https://www.experts-exchange.com/questions/21187468/AXIS-and-Tomcat.html

now i want to get rid of

  log4j:WARN No appenders could be found for logger (org.apache.axis.i18n.ProjectResourceBundle).
  log4j:WARN Please initialize the log4j system properly.

in eclipse.

directories look like:

C:\Programme\Internet\Tomcat\webapps
C:\Programme\Internet\Tomcat\webapps\axis

any good ideas what to do?

where should i put log4j.properties?
ASKER CERTIFIED SOLUTION
Avatar of TimYates
TimYates
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of drnick
drnick

ASKER

nope, this time it's not working :-)

log4j.properties contains:

# Set root category priority to INFO and its only appender to CONSOLE.
log4j.rootCategory=INFO, CONSOLE
#log4j.rootCategory=INFO, CONSOLE, LOGFILE

# Set the enterprise logger category to FATAL and its only appender to CONSOLE.
log4j.logger.org.apache.axis.enterprise=FATAL, CONSOLE

# CONSOLE is set to be a ConsoleAppender using a PatternLayout.
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.Threshold=INFO
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=- %m%n

# LOGFILE is set to be a File appender using a PatternLayout.
log4j.appender.LOGFILE=org.apache.log4j.FileAppender
log4j.appender.LOGFILE.File=axis.log
log4j.appender.LOGFILE.Append=true
log4j.appender.LOGFILE.Threshold=INFO
log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
log4j.appender.LOGFILE.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n

moved it to where you said,
but eclipse deploying in the style of the last example says:

log4j:WARN No appenders could be found for logger (org.apache.axis.i18n.ProjectResourceBundle).
log4j:WARN Please initialize the log4j system properly.
Processing file deploy.wsdd
<Admin>Done processing</Admin>

which i would like to be solely:

Processing file deploy.wsdd
<Admin>Done processing</Admin>

:-)
What happens if you change:

# Set the enterprise logger category to FATAL and its only appender to CONSOLE.
log4j.logger.org.apache.axis.enterprise=FATAL, CONSOLE

to

# Set the enterprise logger category to FATAL and its only appender to CONSOLE.
log4j.logger.org.apache.axis.enterprise=FATAL, CONSOLE
log4j.logger.org.apache.axis.i18n=FATAL, CONSOLE

?
>  nope, this time it's not working :-)

hehehe...dang!  Still, as meatloaf said, "2 out of 3 aint bad" ;-)  

hehehehe

Hope that last line sorts it :-)
Avatar of drnick

ASKER

;-)
i got C:\Programme\Internet\Tomcat\webapps\axis\WEB-INF\classes\log4j.properties
now changed, so it looks like

# Set root category priority to INFO and its only appender to CONSOLE.
log4j.rootCategory=INFO, CONSOLE
#log4j.rootCategory=INFO, CONSOLE, LOGFILE

# Set the enterprise logger category to FATAL and its only appender to CONSOLE.
log4j.logger.org.apache.axis.enterprise=FATAL, CONSOLE
log4j.logger.org.apache.axis.i18n=FATAL, CONSOLE

# CONSOLE is set to be a ConsoleAppender using a PatternLayout.
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.Threshold=INFO
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=- %m%n

# LOGFILE is set to be a File appender using a PatternLayout.
log4j.appender.LOGFILE=org.apache.log4j.FileAppender
log4j.appender.LOGFILE.File=axis.log
log4j.appender.LOGFILE.Append=true
log4j.appender.LOGFILE.Threshold=INFO
log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
log4j.appender.LOGFILE.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n


i restarted tomcat just to be sure,
then again did the
org.apache.axis.client.AxisClient.class-deployment procedure from the example.

it still says:

log4j:WARN No appenders could be found for logger (org.apache.axis.i18n.ProjectResourceBundle).
log4j:WARN Please initialize the log4j system properly.
Processing file deploy.wsdd
<Admin>Done processing</Admin>

hihi, i'm going for that last warning, you know,
want my installation instructions (now 24 steps) to be perfect
for my fellows.
Hmmmm...it should just work with log4j being in the classes directory (ignoring my previous comment) ;-)

I am stumped as to why this isn't working :-(

Bah!  Beaten at the last hurdle ;-)

At least this is only a warning, so the "24 step plan" should work (just get a warning when it starts up) :-(

Bah!

Tim.
Avatar of drnick

ASKER

i found a resource that seems to deal with the same problem,
http://java2.5341.com/msg/32914.html,
however, i don't quite catch the point of it,
maybe because i'm installing and cursing and installing and whining for
10 hours now.
maybe you were right with your classpath-theory,
and i just don't see.
could you elaborate in short how i can check if classpath is
correct?
Hehehe, yeah...that says the same thing "put it in the classpath" ;-)

Hmmm...have you tried

webapps/axis/WEB-INF/lib

?

(though it *should* work in

webapps/axis/WEB-INF/classes

:-(
Avatar of drnick

ASKER

:-( still not working,
where could i check the classpath?
can i set it somehow?
No, tomcat handles it...

You could try copying it to

tomcat/shared/classes

or tomcat/shared/lib

or tomcat/common/classes

MAKE SURE THAT A FILE OF THE SAME NAME DOESN'T ALREADY EXIST IN THOSE DIRECTORIES

Otherwise, you might get 2 warnings instead of 1 ;-)

Tim
you will have to restart tomcat as well, each time you move it :-(
Avatar of drnick

ASKER

you know, if something like this totally refuses to work,
i feat that this maybe indicates an other, more important error
so i want to fix this for heavens sake
> i feat that this maybe indicates an other, more important error

Nah, this just means log4j isn't finding it's properties file ;-)

So you can't control the logging...

It isn't normally a biggie :-)

Keep the faith ;-)

Tim
Avatar of drnick

ASKER

have done this already everytime :-)
Avatar of drnick

ASKER

(to the previous post :-)
Avatar of drnick

ASKER

harhar, got it hardcore solved:

i unpacked the log4j-1.2.8.jar completely,
put the log4j.properties inside and built a new
log4j-1.2.8.jar.

now it just says:

Processing file deploy.wsdd
<Admin>Done processing</Admin>

:-)
Avatar of drnick

ASKER

gonna give you the points anyway,
and if an less hardcore method comes to your mind,
just post it :-)
Thanks!  Hee hee, what a hardcore bit of hackery :-D

Glad it's working....I'll bookmark this question, and come back to it with the answer if ever I find it...

Good luck with teaching everyone else :-D

Tim