You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Pierre Goupil <go...@gmail.com> on 2006/11/22 21:45:42 UTC

Re: Tomcat et log4j

Hi !

1) English

2) French


1) I've just tried this. Tomcat's doc tells to put the file into the
classpath and I can't figure how to set this classpath. I've tried to give
an Eclipse Preferences / Build path / Classpath variable as well as using
the -cp option at server launch, but the machine doesn't seem to take it
into account. Or, at least, it doesn't change anything...


2) Je viens d'essayer. La doc de Tomcat dit de mettre ce fichier dans le
classpath mais je n'arrive pas à le positionner. J'ai essayé avec les
Preferences d'Eclipse / Builpath / Classpath variable et aussi en utilisant
la commande -cp au lancement du serveur, mais Tomcat ne semble pas en tenir
compte. En tous cas, ça ne change rien...


Pierre



Le 22/11/06, OBESSALEM@cps.pf <OB...@cps.pf> a écrit :
>
>
> Salut Pierre,
>
> J'ai déjà eu aussi un problème de compatibilité entre Commons-logging et
> Log4j. Je ne sais pas si c'est celui que tu rencontres mais sait-on
> jamais!!!!
>
> En fait mon fichier de configuration commons-logging.properties était
> incorrect car dans les version plus récente de commons-logging, la classe
> Log4jFactory n'existe plus;  je remplace alors cette ligne:
>
> org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.Log4jFactory
> par:
> org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
>
> En espérant que ça aide
> @+
> Olviier
>
>
>
>
> *"Pierre Goupil" <go...@gmail.com>*
>
> 22/11/2006 05:51
>
>         Pour :        java@u-strasbg.fr
>         cc :
>         Objet :        Tomcat et log4j
>
>
>
>
> Bonjour la liste !
>
> J'avais un Tomcat 5.5 et un Eclipse 3.2 qui marchaient très bien, puis...
> le dur a crashé... Résultat des courses : aucune perte de données, mais
> impossible de démarrer Tomcat. La vue "serveur" d'Eclipse me renvoie la
> trace suivante :
>
> ********************************
> Exception in thread "main" java.lang.ExceptionInInitializerError
> Caused by: com.sun.org.apache.commons.logging.LogConfigurationException:
> com.sun.org.apache.commons.logging.LogConfigurationException :
> java.lang.NullPointerException (Caused by java.lang.NullPointerException)
> (Caused by com.sun.org.apache.commons.logging.LogConfigurationException:
> java.lang.NullPointerException (Caused by java.lang.NullPointerException))
>    at com.sun.org.apache.commons.logging.impl.LogFactoryImpl.newInstance(
> LogFactoryImpl.java:543)
>    at com.sun.org.apache.commons.logging.impl.LogFactoryImpl.getInstance(
> LogFactoryImpl.java:235)
>    at com.sun.org.apache.commons.logging.impl.LogFactoryImpl.getInstance (
> LogFactoryImpl.java:209)
>    at com.sun.org.apache.commons.logging.LogFactory.getLog(LogFactory.java
> :351)
>    at org.apache.catalina.startup.Bootstrap.<clinit>(Bootstrap.java:73)
> Caused by: com.sun.org.apache.commons.logging.LogConfigurationException :
> java.lang.NullPointerException (Caused by java.lang.NullPointerException)
>    at
> com.sun.org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(
> LogFactoryImpl.java:397)
>    at com.sun.org.apache.commons.logging.impl.LogFactoryImpl.newInstance (
> LogFactoryImpl.java:529)
>    ... 4 more
> Caused by: java.lang.NullPointerException
>    at
> com.sun.org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(
> LogFactoryImpl.java:374)
>    ... 5 more
> ********************************
>
> Bon, en fait, je suis tombé dans l'enfer de la cohabitation entre
> commons-loggging et log4j ! Perso, le système de log de ma servlet (log4j)
> ne veut plus marcher pas mais de toutes façons vu qu'elle ne se lance pas,
> je m'en fiche ! Par contre, la question de savoir comment relancer le
> système de log de Tomcat (log4j + commons-logging !) est un archi-classique
> : des dizaines de gens en parlent. Mais impossible de trouver une solution.
> Ho bien sûr des tutos j'en ai trouvé des tas, mais bon...
>
> Il est évident que j'ai ré-installé tout mon poste de développement.
>
> Quant à lancer Tomcat via un autre plugin, j'ai essayé avec Sysdeo :
> Tomcat se lance, il charge la servlet, mais il ne la démarre pas et reste
> silencieux. Ni log de ma servlet, ni exception, ni résultat.
>
> Si quelqu'un avait la réponse à cette question cent fois posée, ça me
> dépannerait bien !
>
> Merci !
>
>
> Pierre
>
>
> --
> "L'une des raisons pour lesquelles la vie est complexe
> C'est qu'elle a une partie réelle et une partie imaginaire."
>



-- 
"L'une des raisons pour lesquelles la vie est complexe
C'est qu'elle a une partie réelle et une partie imaginaire."

Re: Tomcat et log4j

Posted by David Smith <dn...@cornell.edu>.
Well... tomcat in general only supports a subset of java ee.  Other 
features might be added if you add the requisite jars.

Specific to your request, both tomcat 5.5 and java ee 5 support servlet 
spec 2.4.  Jsp support splits between tomcat 5.5 and java ee 5 in that 
tomcat 5.5 supports jsp 2.0 while java ee supports jsp 2.1.

I found info for java ee spec support here:
http://www.theserverside.com/news/thread.tss?thread_id=35838

Tomcat's spec support can be found on it's web page:
http://tomcat.apache.org/tomcat-5.5-doc/index.html

--David


Pierre Goupil wrote:
> Hi again !
>
> Just tell me one thing : does Tomcat 5.5 support Java EE 5 ?
>
> Regards,
>
> Pierre
>
>


-- 
David Smith
Network Operations Supervisor
Department of Entomology
Cornell University
2132 Comstock Hall
Ithaca, NY 14853
Phone: (607) 255-9571
Fax: (607) 255-0940


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat et log4j

Posted by Pierre Goupil <go...@gmail.com>.
Hi again !

Just tell me one thing : does Tomcat 5.5 support Java EE 5 ?

Regards,

Pierre


-- 
"L'une des raisons pour lesquelles la vie est complexe
C'est qu'elle a une partie réelle et une partie imaginaire."

Re: Tomcat et log4j

Posted by Pierre Goupil <go...@gmail.com>.
Hi

Yes, of course. But it still doesn't work, sorry...

Regards,


Pierre




2006/11/23, Gaurav Kushwaha <ga...@gmail.com>:
>
> I am not sure if putting log4j.properties in WEB-INF will work. It has to
> be
> in the classpath. So he will need to put it in WEB-INF/classes.
>
> On 11/23/06, Andrew Stepanenko <an...@gmail.com> wrote:
> >
> > I'm not sure about this line:
> > > log4j.rootLogger=WARN,monAppender
> >
> > In my log4j.properties it is:
> > log4j.rootCategory=info, stdout, file
> >
> > Also I don't use commons-logging.properties in my setup. In 5.0.28 and
> > 5.5.17 it worked well. Try putting log4j.properties also in
> > YOUR_WEBAPP\WEB-INF directory.
> > As you want to specify WARN for root category, probably you won't see
> > much log msgs. I mean that you won't see info() and debug().
> >
> > Andrew.
> >
> >
> > On 11/22/06, Pierre Goupil <go...@gmail.com> wrote:
> > > No, no way... I've put this in commons-logging.properties :
> > >
> > >
> >
> org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
> > >
> > >
> >
> org.apache.commons.logging.simplelog.log.org.apache.commons.digester.Digester=debug
> > >
> > >
> >
> org.apache.commons.logging.simplelog.log.org.apache.commons.digester.Digester.sax=info
> > >
> > >
> > >
> > >
> > > and this in log4j.properties :
> > >
> > > #définition du niveau et des Appender du rootLogger
> > > log4j.rootLogger=WARN,monAppender
> > >
> > > #configuration de "monAppender"
> > > #nous allons envoyer les messages dans la console de Tomcat
> > > log4j.appender.monAppender=org.apache.log4j.ConsoleAppender
> > >
> > > #définition du Layout pour "monAppender"
> > > log4j.appender.monAppender.layout=org.apache.log4j.PatternLayout
> > >
> > > #définition du pattern d'affichage pour "monAppender"
> > > #voici un exemple de sortie que l'on va obtenir : 2005-06-18 14:53:37
> > DEBUG
> > > [Main] Hello World
> > > log4j.appender.monAppender.layout.ConversionPattern=%d{MM-dd HH:mm:ss}
> > %-5p
> > > [%c{1}] %m%n
> > >
> > >
> > > Is this correct ?
> > >
> > > Regards,
> > >
> > >
> > > Pierre
> > >
> > >
> > >
> > >
> >
>
> Gaurav Singh Kushwaha
> http://www.chakpak.com
>
>
> Ph: +91-9880101496
> Bangalore, India.
>
>


-- 
"L'une des raisons pour lesquelles la vie est complexe
C'est qu'elle a une partie réelle et une partie imaginaire."

Re: Tomcat et log4j

Posted by Gaurav Kushwaha <ga...@gmail.com>.
I am not sure if putting log4j.properties in WEB-INF will work. It has to be
in the classpath. So he will need to put it in WEB-INF/classes.

On 11/23/06, Andrew Stepanenko <an...@gmail.com> wrote:
>
> I'm not sure about this line:
> > log4j.rootLogger=WARN,monAppender
>
> In my log4j.properties it is:
> log4j.rootCategory=info, stdout, file
>
> Also I don't use commons-logging.properties in my setup. In 5.0.28 and
> 5.5.17 it worked well. Try putting log4j.properties also in
> YOUR_WEBAPP\WEB-INF directory.
> As you want to specify WARN for root category, probably you won't see
> much log msgs. I mean that you won't see info() and debug().
>
> Andrew.
>
>
> On 11/22/06, Pierre Goupil <go...@gmail.com> wrote:
> > No, no way... I've put this in commons-logging.properties :
> >
> >
> org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
> >
> >
> org.apache.commons.logging.simplelog.log.org.apache.commons.digester.Digester=debug
> >
> >
> org.apache.commons.logging.simplelog.log.org.apache.commons.digester.Digester.sax=info
> >
> >
> >
> >
> > and this in log4j.properties :
> >
> > #définition du niveau et des Appender du rootLogger
> > log4j.rootLogger=WARN,monAppender
> >
> > #configuration de "monAppender"
> > #nous allons envoyer les messages dans la console de Tomcat
> > log4j.appender.monAppender=org.apache.log4j.ConsoleAppender
> >
> > #définition du Layout pour "monAppender"
> > log4j.appender.monAppender.layout=org.apache.log4j.PatternLayout
> >
> > #définition du pattern d'affichage pour "monAppender"
> > #voici un exemple de sortie que l'on va obtenir : 2005-06-18 14:53:37
> DEBUG
> > [Main] Hello World
> > log4j.appender.monAppender.layout.ConversionPattern=%d{MM-dd HH:mm:ss}
> %-5p
> > [%c{1}] %m%n
> >
> >
> > Is this correct ?
> >
> > Regards,
> >
> >
> > Pierre
> >
> >
> >
> >
>

Gaurav Singh Kushwaha
http://www.chakpak.com


Ph: +91-9880101496
Bangalore, India.

Re: Tomcat et log4j

Posted by Andrew Stepanenko <an...@gmail.com>.
I'm not sure about this line:
> log4j.rootLogger=WARN,monAppender

In my log4j.properties it is:
log4j.rootCategory=info, stdout, file

Also I don't use commons-logging.properties in my setup. In 5.0.28 and
5.5.17 it worked well. Try putting log4j.properties also in
YOUR_WEBAPP\WEB-INF directory.
As you want to specify WARN for root category, probably you won't see
much log msgs. I mean that you won't see info() and debug().

Andrew.


On 11/22/06, Pierre Goupil <go...@gmail.com> wrote:
> No, no way... I've put this in commons-logging.properties :
>
>  org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
>
> org.apache.commons.logging.simplelog.log.org.apache.commons.digester.Digester=debug
>
> org.apache.commons.logging.simplelog.log.org.apache.commons.digester.Digester.sax=info
>
>
>
>
> and this in log4j.properties :
>
> #définition du niveau et des Appender du rootLogger
> log4j.rootLogger=WARN,monAppender
>
> #configuration de "monAppender"
> #nous allons envoyer les messages dans la console de Tomcat
> log4j.appender.monAppender=org.apache.log4j.ConsoleAppender
>
> #définition du Layout pour "monAppender"
> log4j.appender.monAppender.layout=org.apache.log4j.PatternLayout
>
> #définition du pattern d'affichage pour "monAppender"
> #voici un exemple de sortie que l'on va obtenir : 2005-06-18 14:53:37 DEBUG
> [Main] Hello World
> log4j.appender.monAppender.layout.ConversionPattern=%d{MM-dd HH:mm:ss} %-5p
> [%c{1}] %m%n
>
>
> Is this correct ?
>
> Regards,
>
>
> Pierre
>
>
>
>
> 2006/11/22, Andrew Stepanenko <an...@gmail.com>:
> >
> > try putting log4j.properties in $CATALINA_HOME/common/classes
> >
> > Regards,
> > Andrew Stepanenko
> > http://unf.tane.edu.ua
> >
> > On 11/22/06, Pierre Goupil <go...@gmail.com> wrote:
> > > Hi !
> > >
> > > 1) English
> > >
> > > 2) French
> > >
> > >
> > > 1) I've just tried this. Tomcat's doc tells to put the file into the
> > > classpath and I can't figure how to set this classpath. I've tried to
> > give
> > > an Eclipse Preferences / Build path / Classpath variable as well as
> > using
> > > the -cp option at server launch, but the machine doesn't seem to take it
> > > into account. Or, at least, it doesn't change anything...
> > >
> > >
> > > 2) Je viens d'essayer. La doc de Tomcat dit de mettre ce fichier dans le
> > > classpath mais je n'arrive pas à le positionner. J'ai essayé avec les
> > > Preferences d'Eclipse / Builpath / Classpath variable et aussi en
> > utilisant
> > > la commande -cp au lancement du serveur, mais Tomcat ne semble pas en
> > tenir
> > > compte. En tous cas, ça ne change rien...
> > >
> > >
> > > Pierre
> > >
> > >
> > >
> > > Le 22/11/06, OBESSALEM@cps.pf <OB...@cps.pf> a écrit :
> > > >
> > > >
> > > > Salut Pierre,
> > > >
> > > > J'ai déjà eu aussi un problème de compatibilité entre Commons-logging
> > et
> > > > Log4j. Je ne sais pas si c'est celui que tu rencontres mais sait-on
> > > > jamais!!!!
> > > >
> > > > En fait mon fichier de configuration commons-logging.properties était
> > > > incorrect car dans les version plus récente de commons-logging, la
> > classe
> > > > Log4jFactory n'existe plus;  je remplace alors cette ligne:
> > > >
> > > >
> > org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.Log4jFactory
> > > > par:
> > > >
> > org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
> > > >
> > > > En espérant que ça aide
> > > > @+
> > > > Olviier
> > > >
> > > >
> > > >
> > > >
> > > > *"Pierre Goupil" <go...@gmail.com>*
> > > >
> > > > 22/11/2006 05:51
> > > >
> > > >         Pour :        java@u-strasbg.fr
> > > >         cc :
> > > >         Objet :        Tomcat et log4j
> > > >
> > > >
> > > >
> > > >
> > > > Bonjour la liste !
> > > >
> > > > J'avais un Tomcat 5.5 et un Eclipse 3.2 qui marchaient très bien,
> > puis...
> > > > le dur a crashé... Résultat des courses : aucune perte de données,
> > mais
> > > > impossible de démarrer Tomcat. La vue "serveur" d'Eclipse me renvoie
> > la
> > > > trace suivante :
> > > >
> > > > ********************************
> > > > Exception in thread "main" java.lang.ExceptionInInitializerError
> > > > Caused by:
> > com.sun.org.apache.commons.logging.LogConfigurationException:
> > > > com.sun.org.apache.commons.logging.LogConfigurationException :
> > > > java.lang.NullPointerException (Caused by
> > java.lang.NullPointerException)
> > > > (Caused by
> > com.sun.org.apache.commons.logging.LogConfigurationException:
> > > > java.lang.NullPointerException (Caused by
> > java.lang.NullPointerException))
> > > >    at
> > com.sun.org.apache.commons.logging.impl.LogFactoryImpl.newInstance(
> > > > LogFactoryImpl.java:543)
> > > >    at
> > com.sun.org.apache.commons.logging.impl.LogFactoryImpl.getInstance(
> > > > LogFactoryImpl.java:235)
> > > >    at
> > com.sun.org.apache.commons.logging.impl.LogFactoryImpl.getInstance (
> > > > LogFactoryImpl.java:209)
> > > >    at com.sun.org.apache.commons.logging.LogFactory.getLog(
> > LogFactory.java
> > > > :351)
> > > >    at org.apache.catalina.startup.Bootstrap.<clinit>(Bootstrap.java
> > :73)
> > > > Caused by:
> > com.sun.org.apache.commons.logging.LogConfigurationException :
> > > > java.lang.NullPointerException (Caused by
> > java.lang.NullPointerException)
> > > >    at
> > > >
> > com.sun.org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(
> > > > LogFactoryImpl.java:397)
> > > >    at
> > com.sun.org.apache.commons.logging.impl.LogFactoryImpl.newInstance (
> > > > LogFactoryImpl.java:529)
> > > >    ... 4 more
> > > > Caused by: java.lang.NullPointerException
> > > >    at
> > > >
> > com.sun.org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(
> > > > LogFactoryImpl.java:374)
> > > >    ... 5 more
> > > > ********************************
> > > >
> > > > Bon, en fait, je suis tombé dans l'enfer de la cohabitation entre
> > > > commons-loggging et log4j ! Perso, le système de log de ma servlet
> > (log4j)
> > > > ne veut plus marcher pas mais de toutes façons vu qu'elle ne se lance
> > pas,
> > > > je m'en fiche ! Par contre, la question de savoir comment relancer le
> > > > système de log de Tomcat (log4j + commons-logging !) est un
> > archi-classique
> > > > : des dizaines de gens en parlent. Mais impossible de trouver une
> > solution.
> > > > Ho bien sûr des tutos j'en ai trouvé des tas, mais bon...
> > > >
> > > > Il est évident que j'ai ré-installé tout mon poste de développement.
> > > >
> > > > Quant à lancer Tomcat via un autre plugin, j'ai essayé avec Sysdeo :
> > > > Tomcat se lance, il charge la servlet, mais il ne la démarre pas et
> > reste
> > > > silencieux. Ni log de ma servlet, ni exception, ni résultat.
> > > >
> > > > Si quelqu'un avait la réponse à cette question cent fois posée, ça me
> > > > dépannerait bien !
> > > >
> > > > Merci !
> > > >
> > > >
> > > > Pierre
> > > >
> > > >
> > > > --
> > > > "L'une des raisons pour lesquelles la vie est complexe
> > > > C'est qu'elle a une partie réelle et une partie imaginaire."
> > > >
> > >
> > >
> > >
> > > --
> > > "L'une des raisons pour lesquelles la vie est complexe
> > > C'est qu'elle a une partie réelle et une partie imaginaire."
> > >
> >
> > ---------------------------------------------------------------------
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >
>
>
> --
> "L'une des raisons pour lesquelles la vie est complexe
> C'est qu'elle a une partie réelle et une partie imaginaire."
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat et log4j

Posted by Pierre Goupil <go...@gmail.com>.
No, no way... I've put this in commons-logging.properties :

 org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger

org.apache.commons.logging.simplelog.log.org.apache.commons.digester.Digester=debug

org.apache.commons.logging.simplelog.log.org.apache.commons.digester.Digester.sax=info




and this in log4j.properties :

#définition du niveau et des Appender du rootLogger
log4j.rootLogger=WARN,monAppender

#configuration de "monAppender"
#nous allons envoyer les messages dans la console de Tomcat
log4j.appender.monAppender=org.apache.log4j.ConsoleAppender

#définition du Layout pour "monAppender"
log4j.appender.monAppender.layout=org.apache.log4j.PatternLayout

#définition du pattern d'affichage pour "monAppender"
#voici un exemple de sortie que l'on va obtenir : 2005-06-18 14:53:37 DEBUG
[Main] Hello World
log4j.appender.monAppender.layout.ConversionPattern=%d{MM-dd HH:mm:ss} %-5p
[%c{1}] %m%n


Is this correct ?

Regards,


Pierre




2006/11/22, Andrew Stepanenko <an...@gmail.com>:
>
> try putting log4j.properties in $CATALINA_HOME/common/classes
>
> Regards,
> Andrew Stepanenko
> http://unf.tane.edu.ua
>
> On 11/22/06, Pierre Goupil <go...@gmail.com> wrote:
> > Hi !
> >
> > 1) English
> >
> > 2) French
> >
> >
> > 1) I've just tried this. Tomcat's doc tells to put the file into the
> > classpath and I can't figure how to set this classpath. I've tried to
> give
> > an Eclipse Preferences / Build path / Classpath variable as well as
> using
> > the -cp option at server launch, but the machine doesn't seem to take it
> > into account. Or, at least, it doesn't change anything...
> >
> >
> > 2) Je viens d'essayer. La doc de Tomcat dit de mettre ce fichier dans le
> > classpath mais je n'arrive pas à le positionner. J'ai essayé avec les
> > Preferences d'Eclipse / Builpath / Classpath variable et aussi en
> utilisant
> > la commande -cp au lancement du serveur, mais Tomcat ne semble pas en
> tenir
> > compte. En tous cas, ça ne change rien...
> >
> >
> > Pierre
> >
> >
> >
> > Le 22/11/06, OBESSALEM@cps.pf <OB...@cps.pf> a écrit :
> > >
> > >
> > > Salut Pierre,
> > >
> > > J'ai déjà eu aussi un problème de compatibilité entre Commons-logging
> et
> > > Log4j. Je ne sais pas si c'est celui que tu rencontres mais sait-on
> > > jamais!!!!
> > >
> > > En fait mon fichier de configuration commons-logging.properties était
> > > incorrect car dans les version plus récente de commons-logging, la
> classe
> > > Log4jFactory n'existe plus;  je remplace alors cette ligne:
> > >
> > >
> org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.Log4jFactory
> > > par:
> > >
> org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
> > >
> > > En espérant que ça aide
> > > @+
> > > Olviier
> > >
> > >
> > >
> > >
> > > *"Pierre Goupil" <go...@gmail.com>*
> > >
> > > 22/11/2006 05:51
> > >
> > >         Pour :        java@u-strasbg.fr
> > >         cc :
> > >         Objet :        Tomcat et log4j
> > >
> > >
> > >
> > >
> > > Bonjour la liste !
> > >
> > > J'avais un Tomcat 5.5 et un Eclipse 3.2 qui marchaient très bien,
> puis...
> > > le dur a crashé... Résultat des courses : aucune perte de données,
> mais
> > > impossible de démarrer Tomcat. La vue "serveur" d'Eclipse me renvoie
> la
> > > trace suivante :
> > >
> > > ********************************
> > > Exception in thread "main" java.lang.ExceptionInInitializerError
> > > Caused by:
> com.sun.org.apache.commons.logging.LogConfigurationException:
> > > com.sun.org.apache.commons.logging.LogConfigurationException :
> > > java.lang.NullPointerException (Caused by
> java.lang.NullPointerException)
> > > (Caused by
> com.sun.org.apache.commons.logging.LogConfigurationException:
> > > java.lang.NullPointerException (Caused by
> java.lang.NullPointerException))
> > >    at
> com.sun.org.apache.commons.logging.impl.LogFactoryImpl.newInstance(
> > > LogFactoryImpl.java:543)
> > >    at
> com.sun.org.apache.commons.logging.impl.LogFactoryImpl.getInstance(
> > > LogFactoryImpl.java:235)
> > >    at
> com.sun.org.apache.commons.logging.impl.LogFactoryImpl.getInstance (
> > > LogFactoryImpl.java:209)
> > >    at com.sun.org.apache.commons.logging.LogFactory.getLog(
> LogFactory.java
> > > :351)
> > >    at org.apache.catalina.startup.Bootstrap.<clinit>(Bootstrap.java
> :73)
> > > Caused by:
> com.sun.org.apache.commons.logging.LogConfigurationException :
> > > java.lang.NullPointerException (Caused by
> java.lang.NullPointerException)
> > >    at
> > >
> com.sun.org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(
> > > LogFactoryImpl.java:397)
> > >    at
> com.sun.org.apache.commons.logging.impl.LogFactoryImpl.newInstance (
> > > LogFactoryImpl.java:529)
> > >    ... 4 more
> > > Caused by: java.lang.NullPointerException
> > >    at
> > >
> com.sun.org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(
> > > LogFactoryImpl.java:374)
> > >    ... 5 more
> > > ********************************
> > >
> > > Bon, en fait, je suis tombé dans l'enfer de la cohabitation entre
> > > commons-loggging et log4j ! Perso, le système de log de ma servlet
> (log4j)
> > > ne veut plus marcher pas mais de toutes façons vu qu'elle ne se lance
> pas,
> > > je m'en fiche ! Par contre, la question de savoir comment relancer le
> > > système de log de Tomcat (log4j + commons-logging !) est un
> archi-classique
> > > : des dizaines de gens en parlent. Mais impossible de trouver une
> solution.
> > > Ho bien sûr des tutos j'en ai trouvé des tas, mais bon...
> > >
> > > Il est évident que j'ai ré-installé tout mon poste de développement.
> > >
> > > Quant à lancer Tomcat via un autre plugin, j'ai essayé avec Sysdeo :
> > > Tomcat se lance, il charge la servlet, mais il ne la démarre pas et
> reste
> > > silencieux. Ni log de ma servlet, ni exception, ni résultat.
> > >
> > > Si quelqu'un avait la réponse à cette question cent fois posée, ça me
> > > dépannerait bien !
> > >
> > > Merci !
> > >
> > >
> > > Pierre
> > >
> > >
> > > --
> > > "L'une des raisons pour lesquelles la vie est complexe
> > > C'est qu'elle a une partie réelle et une partie imaginaire."
> > >
> >
> >
> >
> > --
> > "L'une des raisons pour lesquelles la vie est complexe
> > C'est qu'elle a une partie réelle et une partie imaginaire."
> >
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
"L'une des raisons pour lesquelles la vie est complexe
C'est qu'elle a une partie réelle et une partie imaginaire."

Re: Tomcat et log4j

Posted by Andrew Stepanenko <an...@gmail.com>.
try putting log4j.properties in $CATALINA_HOME/common/classes

Regards,
Andrew Stepanenko
http://unf.tane.edu.ua

On 11/22/06, Pierre Goupil <go...@gmail.com> wrote:
> Hi !
>
> 1) English
>
> 2) French
>
>
> 1) I've just tried this. Tomcat's doc tells to put the file into the
> classpath and I can't figure how to set this classpath. I've tried to give
> an Eclipse Preferences / Build path / Classpath variable as well as using
> the -cp option at server launch, but the machine doesn't seem to take it
> into account. Or, at least, it doesn't change anything...
>
>
> 2) Je viens d'essayer. La doc de Tomcat dit de mettre ce fichier dans le
> classpath mais je n'arrive pas à le positionner. J'ai essayé avec les
> Preferences d'Eclipse / Builpath / Classpath variable et aussi en utilisant
> la commande -cp au lancement du serveur, mais Tomcat ne semble pas en tenir
> compte. En tous cas, ça ne change rien...
>
>
> Pierre
>
>
>
> Le 22/11/06, OBESSALEM@cps.pf <OB...@cps.pf> a écrit :
> >
> >
> > Salut Pierre,
> >
> > J'ai déjà eu aussi un problème de compatibilité entre Commons-logging et
> > Log4j. Je ne sais pas si c'est celui que tu rencontres mais sait-on
> > jamais!!!!
> >
> > En fait mon fichier de configuration commons-logging.properties était
> > incorrect car dans les version plus récente de commons-logging, la classe
> > Log4jFactory n'existe plus;  je remplace alors cette ligne:
> >
> > org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.Log4jFactory
> > par:
> > org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
> >
> > En espérant que ça aide
> > @+
> > Olviier
> >
> >
> >
> >
> > *"Pierre Goupil" <go...@gmail.com>*
> >
> > 22/11/2006 05:51
> >
> >         Pour :        java@u-strasbg.fr
> >         cc :
> >         Objet :        Tomcat et log4j
> >
> >
> >
> >
> > Bonjour la liste !
> >
> > J'avais un Tomcat 5.5 et un Eclipse 3.2 qui marchaient très bien, puis...
> > le dur a crashé... Résultat des courses : aucune perte de données, mais
> > impossible de démarrer Tomcat. La vue "serveur" d'Eclipse me renvoie la
> > trace suivante :
> >
> > ********************************
> > Exception in thread "main" java.lang.ExceptionInInitializerError
> > Caused by: com.sun.org.apache.commons.logging.LogConfigurationException:
> > com.sun.org.apache.commons.logging.LogConfigurationException :
> > java.lang.NullPointerException (Caused by java.lang.NullPointerException)
> > (Caused by com.sun.org.apache.commons.logging.LogConfigurationException:
> > java.lang.NullPointerException (Caused by java.lang.NullPointerException))
> >    at com.sun.org.apache.commons.logging.impl.LogFactoryImpl.newInstance(
> > LogFactoryImpl.java:543)
> >    at com.sun.org.apache.commons.logging.impl.LogFactoryImpl.getInstance(
> > LogFactoryImpl.java:235)
> >    at com.sun.org.apache.commons.logging.impl.LogFactoryImpl.getInstance (
> > LogFactoryImpl.java:209)
> >    at com.sun.org.apache.commons.logging.LogFactory.getLog(LogFactory.java
> > :351)
> >    at org.apache.catalina.startup.Bootstrap.<clinit>(Bootstrap.java:73)
> > Caused by: com.sun.org.apache.commons.logging.LogConfigurationException :
> > java.lang.NullPointerException (Caused by java.lang.NullPointerException)
> >    at
> > com.sun.org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(
> > LogFactoryImpl.java:397)
> >    at com.sun.org.apache.commons.logging.impl.LogFactoryImpl.newInstance (
> > LogFactoryImpl.java:529)
> >    ... 4 more
> > Caused by: java.lang.NullPointerException
> >    at
> > com.sun.org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(
> > LogFactoryImpl.java:374)
> >    ... 5 more
> > ********************************
> >
> > Bon, en fait, je suis tombé dans l'enfer de la cohabitation entre
> > commons-loggging et log4j ! Perso, le système de log de ma servlet (log4j)
> > ne veut plus marcher pas mais de toutes façons vu qu'elle ne se lance pas,
> > je m'en fiche ! Par contre, la question de savoir comment relancer le
> > système de log de Tomcat (log4j + commons-logging !) est un archi-classique
> > : des dizaines de gens en parlent. Mais impossible de trouver une solution.
> > Ho bien sûr des tutos j'en ai trouvé des tas, mais bon...
> >
> > Il est évident que j'ai ré-installé tout mon poste de développement.
> >
> > Quant à lancer Tomcat via un autre plugin, j'ai essayé avec Sysdeo :
> > Tomcat se lance, il charge la servlet, mais il ne la démarre pas et reste
> > silencieux. Ni log de ma servlet, ni exception, ni résultat.
> >
> > Si quelqu'un avait la réponse à cette question cent fois posée, ça me
> > dépannerait bien !
> >
> > Merci !
> >
> >
> > Pierre
> >
> >
> > --
> > "L'une des raisons pour lesquelles la vie est complexe
> > C'est qu'elle a une partie réelle et une partie imaginaire."
> >
>
>
>
> --
> "L'une des raisons pour lesquelles la vie est complexe
> C'est qu'elle a une partie réelle et une partie imaginaire."
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org