[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

tomcat, axis, eclipse and log4

Posted on 2004-10-29
18
Medium Priority
?
3,891 Views
Last Modified: 2012-05-05



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?
0
Comment
Question by:drnick
[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
  • 9
  • 9
18 Comments
 
LVL 35

Accepted Solution

by:
TimYates earned 1600 total points
ID: 12444673
somewhere in the classpath (ie:  webapps/axis/WEB-INF/classes) :-)
0
 
LVL 5

Author Comment

by:drnick
ID: 12444791
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
 
LVL 35

Expert Comment

by:TimYates
ID: 12444937
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 35

Expert Comment

by:TimYates
ID: 12444941
>  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
 
LVL 5

Author Comment

by:drnick
ID: 12445022
;-)
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
 
LVL 35

Expert Comment

by:TimYates
ID: 12445171
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
 
LVL 5

Author Comment

by:drnick
ID: 12445182
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
 
LVL 35

Expert Comment

by:TimYates
ID: 12445248
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
 
LVL 5

Author Comment

by:drnick
ID: 12445294
:-( still not working,
where could i check the classpath?
can i set it somehow?
0
 
LVL 35

Expert Comment

by:TimYates
ID: 12445325
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
 
LVL 35

Expert Comment

by:TimYates
ID: 12445335
you will have to restart tomcat as well, each time you move it :-(
0
 
LVL 5

Author Comment

by:drnick
ID: 12445338
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
 
LVL 35

Expert Comment

by:TimYates
ID: 12445348
> 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
 
LVL 5

Author Comment

by:drnick
ID: 12445360
have done this already everytime :-)
0
 
LVL 5

Author Comment

by:drnick
ID: 12445367
(to the previous post :-)
0
 
LVL 5

Author Comment

by:drnick
ID: 12445426
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
 
LVL 5

Author Comment

by:drnick
ID: 12445436
gonna give you the points anyway,
and if an less hardcore method comes to your mind,
just post it :-)
0
 
LVL 35

Expert Comment

by:TimYates
ID: 12445507
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

Featured Post

Simplify Your Workload with One Tool

How do you combat today’s intelligent hacker while managing multiple domains and platforms? By simplifying your workload with one tool. With Lunarpages hosting through Plesk Onyx, you can:

Automate SSL generation and installation with two clicks
Experience total server control

Question has a verified solution.

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

Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

650 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