jboss-3.2.1_tomcat-4.1.24: problem with log4j

2003-10-13 Thread Andreas Rodtwitt
Hi!

I am trying to move the jboss-3.2.1_tomcat-4.1.24 container from one server 
to another. On the old server everythinhg is working perfect, but on the new 
one gets this error message:

12:59:19,703 ERROR [EmbeddedCatalinaService41] Starting failed
org.apache.commons.logging.LogConfigurationException: 
org.apache.commons.logging.LogConfigurationException: No suitable Log 
constructor [Ljava.lang.Class;@f1f051 for 
org.apache.commons.logging.impl.Log4JLogger

.

Caused by: org.apache.commons.logging.LogConfigurationException: No suitable 
Log constructor [Ljava.lang.Class;@f1f051 for 
org.apache.commons.logging.impl.Log4JLogger
   at 
org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:432)
   at 
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:525)
   ... 73 more
Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Logger


I've seen this problem has been discussed for tomcat-4.1.24 already, but 
that did me no good... Any ideas? I've tried adding log4j.jar to the 
classpath, that did no good.

Any help is appreciated!

-Andreas Rodtwitt

_
Hotmail snakker ditt språk! 
http://www.hotmail.msn.com/cgi-bin/sbox?rru=dasp/lang.asp - Få Hotmail på 
norsk i dag

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Custom Appender Close() method

2003-10-13 Thread Ken Hoying
I have a custom appender that allows for the buffering
of messages.  However, the messages left in the buffer
when the application finishes are not gettign logged. 
It appears that the close() method is not getting
called.

Any ideas or help would be greatly appreciated.

Thanks,
Ken

__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Nested Diagnostic Context

2003-10-13 Thread Adam Vainder
Glad I could help =)

Adam Vainder
Systems Analyst
Lexi-Comp, Inc

-Original Message-
From: Sandeep [EMAIL PROTECTED]
To: 'Log4J Users List' [EMAIL PROTECTED]
Date: Sun, 12 Oct 2003 08:38:10 +0300
Subject: RE: Nested Diagnostic Context

 
 Thanks So much for u r ans  yes u r correct i want to use one
 logger for
 whole 1 webapp
 
 
 Best Regards 
 Sandeep kumar 
 
 
 Note
 ***
 *
 
 This email including any attachments is intended solely for the use of
 named
 recipient only.If you are not that person, you are not authorized to
 read,copy,forward,disclose,take any action on information.Any other use
 of
 this email and attachments is prohibited.The views expressed in this
 email
 are not necessarily those of BMA.If you received this email by mistake,
 please destroy all copies and contact  to the sender by email.your
 cooperation is appreciated.
 
 ***
 *
 *
 
 
 
 -Original Message-
 From: Adam Vainder [mailto:[EMAIL PROTECTED]
 Sent: Friday, October 10, 2003 7:12 AM
 To: Log4J Users List
 Subject: RE: Nested Diagnostic Context
 
 
 should have said If you're just intending to have one general logger 
 for the entire webapp, you COULD do getRootLogger. Naming the logger 
 through getLogger(name) is not typically a bad thing.
 
 -Original Message-
 From: Adam Vainder [EMAIL PROTECTED]
 To: Log4J Users List [EMAIL PROTECTED]
 Date: Fri, 10 Oct 2003 00:08:29 -0400
 Subject: RE: Nested Diagnostic Context
 
  Yeah that's true. It all depends on what you want to do. You can 
  definitely declare a logger by name. And, as you said, in some cases
 it
  will be the best thing to do.
  
  If you're just intending to have one general logger for the entire 
  webapp, you would do getRootLogger. 
  
  If you're looking to seperate the modules/jsps for any reason then
 you 
  would want to use getLogger(name).
  
  I usually work on small webapps, so I tend to use getRootLogger. On
 the
  particular app I pulled that demo code from, I had used a couple 
  different loggers.
  
  Sorry if I made things confusing =)
  
  -Original Message-
  From: Yu Xiang Xi  (Maveo) [EMAIL PROTECTED]
  To: 'Log4J Users List' [EMAIL PROTECTED]
  Date: Fri, 10 Oct 2003 10:03:30 +0800
  Subject: RE: Nested Diagnostic Context
  
   Wow, if you do declare a logger by getRootLogger, you will lose the
   ability
   to config different loggers for different module in the
 application.
   
   Best Regards
   Xi Yuxiang
   System Architect
   Maveo Systems Limited
  
 -
   This e-mail, including any attachments, is a confidential business
   communication, and may contain information that is confidential,
   proprietary
   and/or privileged.  This e-mail is intended only for the
  individual(s)
   to
   whom it is addressed, and may not be saved, copied, printed,
  disclosed
   or
   used by anyone else.  If you are not the(an) intended recipient,
  please
   immediately delete this e-mail from your computer system and notify
  the
   sender.  Thank you.

   
   -Original Message-
   From: Adam Vainder [mailto:[EMAIL PROTECTED] 
   Sent: 2003Äê10ÔÂ9ÈÕ 22:41
   To: Log4J Users List
   Subject: Re: Nested Diagnostic Context
   
   Whoops, the Logger declaration section was a copy+paste. You can do
  it 
   either way, I usually prefer the getRootLogger. 
   
   -Original Message-
   From: Adam Vainder [EMAIL PROTECTED]
   To: Log4J Users List [EMAIL PROTECTED]
   Date: Thu, 09 Oct 2003 10:38:25 -0400
   Subject: Re: Nested Diagnostic Context
   
Hey,

Brief example.

jsp : 

%@ page language=java contentType=text/html %
%@ page import=org.apache.log4j.* %

%--
   
  --%
%-- Page initialization 
  
--%
%--
   
  --%
%!//make logger private static 
//private static Logger log = Logger.getRootLogger();
private static Logger log = Logger.getLogger(com.foo);
%

%
String userHost=request.getRemoteHost();
String userIp=request.getRemoteAddr();
NDC.clear();
NDC.push(userHost);
NDC.push(userIp);
%

html
head
titleLOG EXAMPLE/title

/head
body
%
log.info(THIS IS A TEST);
%
!--whatever else you want to do--
/body
%
  NDC.remove(); //clear things up if not forwarding to
 another
page, 
otherwise omit this until the last page(s) the person can reach, 
including error pages, etc.
%
/html


Properties file :


Re: jboss-3.2.1_tomcat-4.1.24: problem with log4j

2003-10-13 Thread Jacob Kjome
Add log4.jar to common/lib of the Tomcat part of the bundle.  Not sure why 
it would work on one server, but not on another, though.

Jake

At 01:44 PM 10/13/2003 +0200, you wrote:

Hi!

I am trying to move the jboss-3.2.1_tomcat-4.1.24 container from one 
server to another. On the old server everythinhg is working perfect, but 
on the new one gets this error message:

12:59:19,703 ERROR [EmbeddedCatalinaService41] Starting failed
org.apache.commons.logging.LogConfigurationException: 
org.apache.commons.logging.LogConfigurationException: No suitable Log 
constructor [Ljava.lang.Class;@f1f051 for 
org.apache.commons.logging.impl.Log4JLogger

.

Caused by: org.apache.commons.logging.LogConfigurationException: No 
suitable Log constructor [Ljava.lang.Class;@f1f051 for 
org.apache.commons.logging.impl.Log4JLogger
   at 
org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:432)
   at 
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:525)
   ... 73 more
Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Logger


I've seen this problem has been discussed for tomcat-4.1.24 already, but 
that did me no good... Any ideas? I've tried adding log4j.jar to the 
classpath, that did no good.

Any help is appreciated!

-Andreas Rodtwitt

_
Hotmail snakker ditt språk! 
http://www.hotmail.msn.com/cgi-bin/sbox?rru=dasp/lang.asp - Få Hotmail på 
norsk i dag

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Custom Appender Close() method

2003-10-13 Thread Ken Hoying
I reviewed the API documentation and it appears that
the secret here is to call the LogManager.shutdown()
static method.  

Thanks,
Ken

--- Thomas Muller [EMAIL PROTECTED] wrote:
 Ken,
 
 I'm not sure if you can rely on the close method of
 all appenders are being
 closed upon shutdown. You can try to add a
 shutdown-hook that manually
 conducts this for your partiular appender (see
 java.lang.Runtime.addShutdownHook), but read the
 documentation carefully.
 
 --
 
 Thomas
 
 
 |  -Original Message-
 |  From: Ken Hoying [mailto:[EMAIL PROTECTED]
 |  Sent: 13 October 2003 15:40
 |  To: [EMAIL PROTECTED]
 |  Subject: Custom Appender Close() method
 |
 |
 |  I have a custom appender that allows for the
 buffering
 |  of messages.  However, the messages left in the
 buffer
 |  when the application finishes are not gettign
 logged.
 |  It appears that the close() method is not getting
 |  called.
 |
 |  Any ideas or help would be greatly appreciated.
 |
 |  Thanks,
 |  Ken
 |
 |  __
 |  Do you Yahoo!?
 |  The New Yahoo! Shopping - with improved product
 search
 |  http://shopping.yahoo.com
 |
 | 

-
 |  To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 |  For additional commands, e-mail:
 [EMAIL PROTECTED]
 |
 |
 
 
 

*
 Copyright ERA Technology Ltd. 2003. (www.era.co.uk).
 All rights reserved. 
 The information supplied in this Commercial
 Communication should be treated
 in confidence.
 No liability whatsoever is accepted for any loss or
 damage 
 suffered as a result of accessing this message or
 any attachments.
 


 This email has been scanned for all viruses by the
 MessageLabs Email
 Security System. For more information on a proactive
 email security
 service working around the clock, around the globe,
 visit
 http://www.messagelabs.com


 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 


__
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Problem with multiple appenders.

2003-10-13 Thread Sudarshan Krishnaprasad
Hi,
The log4j.properties file is as shown below. I have 2 appenders set and 
wish to log the different levels to different places.

log4j.properties

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d [%t] %-5p %c %x - %m%n
log4j.appender.R=org.apache.log4j.jdbc.JDBCAppender
log4j.appender.R.URL=jdbc:mysql://localhost/test
log4j.appender.R.user=test
log4j.appender.R.password=test
log4j.appender.R.sql=INSERT INTO logTable 
(timestamp,priority,filename,msg) VALUES ('%d', '%p', '%c', '%m')

log4j.rootLogger=ALL, stdout
log4j.logger.database=ERROR, R
The problem I am having is that all the messages are getting logged at 
the console but none of them are getting logged to the database.
If I change the file a little bit and set the root logger to log at 
both the places like:

log4j.rootLogger=ALL, stdout, R

Now all the messages are logged in both the places. Could anyone please 
tell me if the above methods for having multiple loggers is correct.

Regards,
Sudarshan.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]