tomcat, axis, eclipse and log4




i installed tomcat, axis, eclipse like to be viewed under http://www.experts-exchange.com/Web/Q_21187468.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?
LVL 5
drnickAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

TimYatesCommented:
somewhere in the classpath (ie:  webapps/axis/WEB-INF/classes) :-)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
drnickAuthor Commented:
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>

:-)
0
TimYatesCommented:
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

?
0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

TimYatesCommented:
>  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 :-)
0
drnickAuthor Commented:
;-)
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.
0
TimYatesCommented:
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.
0
drnickAuthor Commented:
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?
0
TimYatesCommented:
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

:-(
0
drnickAuthor Commented:
:-( still not working,
where could i check the classpath?
can i set it somehow?
0
TimYatesCommented:
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
0
TimYatesCommented:
you will have to restart tomcat as well, each time you move it :-(
0
drnickAuthor Commented:
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
0
TimYatesCommented:
> 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
0
drnickAuthor Commented:
have done this already everytime :-)
0
drnickAuthor Commented:
(to the previous post :-)
0
drnickAuthor Commented:
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>

:-)
0
drnickAuthor Commented:
gonna give you the points anyway,
and if an less hardcore method comes to your mind,
just post it :-)
0
TimYatesCommented:
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
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.