IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Logging Java Discussion :

[LOG4J][PROPERTIES] Erreur pas comprise?


Sujet :

Logging Java

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre Expert
    Avatar de fabszn
    Homme Profil pro
    Développeur Java
    Inscrit en
    Mars 2002
    Messages
    974
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Développeur Java

    Informations forums :
    Inscription : Mars 2002
    Messages : 974
    Par défaut [LOG4J][PROPERTIES] Erreur pas comprise?
    Hello,


    Je travaille sur le portail WPS 51 (Websphere Portal Serveur).

    J'ai un certain nombre de portlet deja deployées sur le serveur.
    Chaque Portlet utilise log4j pour journaliser les infos.

    Actuellement je suis en train d"ecrire une surcouche au driver JDBC de la Base (postgres).

    J'ai voulu integrer log4j pour journaliser des infos. Ce driver est contenu dans un Jar (forcement .. Wink ).
    J'ai placé dans le classpath du serveur le driver + la lib de log4j.
    Jusque la pas de probleme. J'ai parametré mon fichier de propriete log4j.properties, afin que la journalisation se fasse dans un fichier à part.
    J'ai mis le fichier dans le jar de mon driver...

    (J'ai testé en local mon fichier: il fonctionne)

    Par contre lorsque je deploie mon driver sur le serveur et que celui est sollicité.J'ai ce message d'erreur :

    Citation:

    [1/4/06 16:35:09:939 CET] 534bdca5 SystemErr R log4j:ERROR A "org.apache.log4j.DailyRollingFileAppender" object is not assignable to a "org.apache.log4j.Appender" variable.
    [1/4/06 16:35:09:939 CET] 534bdca5 SystemErr R log4j:ERROR The class "org.apache.log4j.Appender" was loaded by
    [1/4/06 16:35:09:939 CET] 534bdca5 SystemErr R log4j:ERROR [com.ibm.ws.bootstrap.ExtClassLoader@76561cfa] whereas object of type
    [1/4/06 16:35:09:940 CET] 534bdca5 SystemErr R log4j:ERROR "org.apache.log4j.DailyRollingFileAppender" was loaded by [com.ibm.ws.classloader.ExtJarClassLoader@407903483 Local ClassPath: /applis/WebSphere/PortalServer5/shared/app:/applis/WebSphere/PortalServer5/shared/app/commres.jar:/applis/WebSphere/PortalServer5/shared/app/cs.jar:/applis/WebSphere/PortalServer5/shared/app/kdsapi.jar:/applis/WebSphere/PortalServer5/shared/app/KDSW.jar:/applis/WebSphere/PortalServer5/shared/app/stcommsrvrtk.jar:/applis/WebSphere/PortalServer5/shared/app/juru.jar:/applis/WebSphere/PortalServer5/shared/app/portlet.jar:/applis/WebSphere/PortalServer5/shared/app/CatSum.jar:/applis/WebSphere/PortalServer5/shared/app/cas_utils.jar:/applis/WebSphere/PortalServer5/shared/app/eTracer.jar:/applis/WebSphere/PortalServer5/shared/app/WebScanner.jar:/applis/WebSphere/PortalServer5/shared/app/wps.jar:/applis/WebSphere/PortalServer5/shared/app/activation.jar:/applis/WebSphere/PortalServer5/shared/app/jlog.jar:/applis/WebSphere/PortalServer5/shared/app/pdAdmin.jar:/applis/WebSphere/PortalServer5/shared/app/jakarta-regexp-1.2.jar:/applis/WebSphere/PortalServer5/shared/app/portlet-api.jar:/applis/WebSphere/PortalServer5/shared/app/wpproduct.jar:/applis/WebSphere/PortalServer5/shared/app/wpsportlets.jar:/applis/WebSphere/PortalServer5/shared/app/cas.jar:/applis/WebSphere/PortalServer5/shared/app/wcl.jar:/applis/WebSphere/PortalServer5/shared/app/treeview.jar:/applis/WebSphere/PortalServer5/shared/app/categorizer.jar:/applis/WebSphere/PortalServer5/shared/app/xincluder.jar:/applis/WebSphere/PortalServer5/shared/app/catUtil.jar:/applis/WebSphere/PortalServer5/shared/app/sumIt.jar:/applis/WebSphere/PortalServer5/shared/app/jlog-2.2.1.jar:/applis/WebSphere/PortalServer5/shared/app/ssl.jar:/applis/WebSphere/PortalServer5/shared/app/admin.jar:/applis/WebSphere/PortalServer5/shared/app/uima.jar:/applis/WebSphere/PortalServer5/shared/app/Sindex.jar:/applis/WebSphere/PortalServer5/shared/app/jaas-proxy.jar:/applis/WebSphere/PortalServer5/shared/app/jakarta-oro-2.0.7.jar:/applis/WebSphere/PortalServer5/shared/app/watsonUtil.jar:/applis/WebSphere/PortalServer5/shared/app/pdm.jar:/applis/WebSphere/PortalServer5/shared/app/pcm.jar:/applis/WebSphere/PortalServer5/shared/app/xpath.jar:/applis/WebSphere/PortalServer5/shared/app/wtpadmin.jar:/applis/WebSphere/PortalServer5/shared/app/wts.jar:/applis/WebSphere/PortalServer5/shared/app/bsf.jar:/applis/WebSphere/PortalServer5/shared/app/HTMLParse.zip:/applis/WebSphere/PortalServer5/shared/app/transcoding.jar:/applis/WebSphere/PortalServer5/shared/app/jt400.jar:/applis/WebSphere/PortalServer5/shared/app/htmltemplate.jar:/applis/WebSphere/PortalServer5/shared/app/JavaProlog.jar:/applis/WebSphere/PortalServer5/shared/app/wtpserver.jar:/applis/WebSphere/PortalServer5/shared/app/wtpcommon.jar:/applis/WebSphere/PortalServer5/shared/app/jakarta-oro-2.0.4.jar:/applis/WebSphere/PortalServer5/shared/app/wmmencryption.jar:/applis/WebSphere/PortalServer5/shared/app/wcl_alllang.jar:/applis/WebSphere/PortalServer5/shared/app/DocEditor.jar:/applis/WebSphere/PortalServer5/shared/app/epi-portlet.jar:/applis/WebSphere/PortalServer5/shared/app/lwotypes.jar:/applis/WebSphere/PortalServer5/shared/app/odc-util.jar:/applis/WebSphere/PortalServer5/shared/app/PortalStrutsBase.jar:/applis/WebSphere/PortalServer5/shared/app/strutsfilters.jar:/applis/WebSphere/PortalServer5/shared/app/convertors.jar:/applis/WebSphere/PortalServer5/shared/app/Export.jar:/applis/WebSphere/PortalServer5/shared/app/jakarta-poi.jar:/applis/WebSphere/PortalServer5/shared/app/NCSO.jar:/applis/WebSphere/PortalServer5/shared/app/log4j-1.2.8.jar:/applis/WebSphere/PortalServer5/shared/app/CallJava.jar:/applis/WebSphere/PortalServer5/shared/app/casTutorial.jar:/applis/WebSphere/PortalServer5/shared/app/IBMJCEfw.jar:/applis/WebSphere/PortalServer5/shared/app/IBMJCEProvider.jar:/applis/WebSphere/PortalServer5/shared/app/JediiTreeViewer.jar:/applis/WebSphere/PortalServer5/shared/app/local_policy.jar:/applis/WebSphere/PortalServer5/shared/app/log4j-1.2.7.jar:/applis/WebSphere/PortalServer5/shared/app/mail.jar:/applis/WebSphere/PortalServer5/shared/app/mainJavadoc.jar:/applis/WebSphere/PortalServer5/shared/app/RegEx_TAE.jar:/applis/WebSphere/PortalServer5/shared/app/uddi4j.jar:/applis/WebSphere/PortalServer5/shared/app/uimaExamples.jar:/applis/WebSphere/PortalServer5/shared/app/uimaJedII.jar:/applis/WebSphere/PortalServer5/shared/app/US_export_policy.jar:/applis/WebSphere/PortalServer5/shared/app/wsdl4jpbext.jar:/applis/WebSphere/PortalServer5/shared/app/xsdbeans.jar:/applis/WebSphere/PortalServer5/wpcp/v5.0/runtime/lib:/applis/WebSphere/PortalServer5/wpcp/v5.0/runtime/lib/feedbacklm.jar:/applis/WebSphere/PortalServer5/wpcp/v5.0/runtime/lib/wpcpruntime.jar:/applis/WebSphere/PortalServer5/wpcp/v5.0/runtime/lib/feedbackilm.jar:/applis/WebSphere/PortalServer5/wpcp/v5.0/runtime/lib/wpcpresources.jar:/applis/WebSphere/PortalServer5/wpcp/v5.0/runtime/lib/wpcpquery.jar:/applis/WebSphere/PortalServer5/wpcp/v5.0/runtime/lib/jcchart450K.jar:/applis/WebSphere/PortalServer5/wpcp/v5.0/runtime/lib/wpcpruntimecommon.jar:/applis/WebSphere/PortalServer5/wpcp/v5.0/runtime/lib/PznBeans.jar:/applis/WebSphere/PortalServer5/wpcp/v5.0/runtime/lib/BRBeans.jar:/applis/WebSphere/PortalServer5/wpcp/v5.0/runtime/lib/wpcpconfig.jar:/applis/WebSphere/PortalServer5/wpcp/v5.0/author/lib/wsWF.jar:/applis/WebSphere/PortalServer5/wpcp/v5.0/author/lib/fwcommon.jar:/applis/WebSphere/PortalServer5/wpcp/v5.0/author/lib/wpcpauthor.jar:/applis/WebSphere/PortalServer5/wpcp/v5.0/author/lib/LWFJavaAPI.jar:/applis/WebSphere/PortalServer5/wpcp/v5.0/author/lib/activation.jar:/applis/WebSphere/PortalServer5/wpcp/v5.0/author/lib/ibm-jsw.jar:/applis/WebSphere/PortalServer5/wpcp/v5.0/author/lib/persmigration.jar:/applis/WebSphere/PortalServer5/wpcp/v5.0/author/lib/wpcpauthorjdbc.jar:/applis/WebSphere/PortalServer5/wpcp/v5.0/author/lib/crawler.jar:/applis/WebSphere/PortalServer5/wpcp/v5.0/author/lib/liteWF.jar:/applis/WebSphere/PortalServer5/wpcp/v5.0/author/lib/availcommon.jar:/applis/WebSphere/PortalServer5/wpcp/v5.0/author/lib/mail.jar:/applis/WebSphere/PortalServer5/shared/app/cloudscape/db2j.jar:/applis/WebSphere/PortalServer5/shared/app/cloudscape/db2jcc.jar:/applis/WebSphere/PortalServer5/shared/app/cloudscape/db2jcview.jar:/applis/WebSphere/PortalServer5/shared/app/cloudscape/db2jnet.jar:/applis/WebSphere/PortalServer5/shared/app/cloudscape/db2jtools.jar:/applis/WebSphere/PortalServer5/shared/app/cloudscape/jh.jar:/applis/WebSphere/PortalServer5/shared/app/lotusworkplacelib/people.jar:/applis/WebSphere/PortalServer5/shared/app/lotusworkplacelib/lwputil.jar:/applis/WebSphere/PortalServer5/shared/app/lotusworkplacelib/wmmdelegate.jar:/applis/WebSphere/PortalServer5/shared/app/lotusworkplacelib/servicelocator.jar:/applis/WebSphere/PortalServer5/shared/app/lotusworkplacelib/hlcore.jar:/applis/WebSphere/PortalServer5/shared/app/lotusworkplacelib/jstl.jar:/applis/WebSphere/PortalServer5/shared/app/lotusworkplacelib/standard.jar:/applis/WebSphere/PortalServer5/shared/app/lotusworkplacelib/struts.jar:/applis/WebSphere/PortalServer5/shared/app/lotusworkplacelib/PortalStruts.jar:/applis/WebSphere/PortalServer5/shared/app/lotusworkplacelib/PortalStrutsCommon.jar:/applis/WebSphere/PortalServer5/shared/app/lotusworkplacelib/PortalStrutsTags.jar:/applis/WebSphere/PortalServer5/shared/app/lotusworkplacelib/StrutsUpdateForPortal.jar:/applis/WebSphere/PortalServer5/shared/app/lotusworkplacelib/commons-beanutils.jar:/applis/WebSphere/PortalServer5/shared/app/lotusworkplacelib/commons-collections.jar:/applis/WebSphere/PortalServer5/shared/app/lotusworkplacelib/commons-dbcp.jar:/applis/WebSphere/PortalServer5/shared/app/lotusworkplacelib/commons-digester.jar:/applis/WebSphere/PortalServer5/shared/app/lotusworkplacelib/commons-fileupload.jar:/applis/WebSphere/PortalServer5/shared/app/lotusworkplacelib/commons-lang.jar:/applis/WebSphere/PortalServer5/shared/app/lotusworkplacelib/commons-logging.jar:/applis/WebSphere/PortalServer5/shared/app/lotusworkplacelib/commons-pool.jar:/applis/WebSphere/PortalServer5/shared/app/lotusworkplacelib/commons-resources.jar:/applis/WebSphere/PortalServer5/shared/app/lotusworkplacelib/commons-services.jar:/applis/WebSphere/PortalServer5/shared/app/lotusworkplacelib/commons-validator.jar:/applis/WebSphere/PortalServer5/shared/app/lotusworkplacelib/jakarta-oro.jar:/applis/WebSphere/PortalServer5/shared/app/lotusworkplacelib/PortalStrutsBase.jar:/applis/WebSphere/PortalServer5/shared/app/lotusworkplacelib/xercesImpl.jar:/applis/WebSphere/PortalServer5/shared/app/lotusworkplacelib/jaxen-full.jar:/applis/WebSphere/PortalServer5/shared/app/lotusworkplacelib/jaxp-api.jar:/applis/WebSphere/PortalServer5/shared/app/lotusworkplacelib/sax.jar:/applis/WebSphere/PortalServer5/shared/app/lotusworkplacelib/saxpath.jar:/applis/WebSphere/PortalServer5/shared/app/lotusworkplacelib/log4j.jar: Delegation Mode: PARENT_LAST].
    [1/4/06 16:35:09:940 CET] 534bdca5 SystemErr R log4j:ERROR Could not instantiate appender named "DAILYROL".
    [1/4/06 16:35:10:562 CET] 534bdca5 SystemErr R log4j:WARN No appenders could be found for logger (org.postgresql.jdbc2.ConnectionPerso).
    [1/4/06 16:35:10:563 CET] 534bdca5 SystemErr R log4j:WARN Please initialize the log4j system properly.


    Je n comprend pas pourquoi cela ne fonctionne pas... et j'ai aussi l'impression qu'il charge un autre fichier de log4j.properties car j'ai modifié le nom de l'appender et il n'en tient pas compte !

    Est ce que quelqu'un aurait une idée sur la raison de ce message d'erreur et et aussi pourquoi il charge un autre fichier log4j.properties que celui qui est dans mon archive de driver.

    Merci d'avance pour votre aide!

  2. #2
    Membre chevronné
    Profil pro
    Inscrit en
    Juillet 2005
    Messages
    274
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2005
    Messages : 274
    Par défaut
    Bonjour,

    a priori ton erreur est due au fait qu'il y ait deux librairies log4j différentes sur ton serveur d'application.

  3. #3
    Membre Expert
    Avatar de fabszn
    Homme Profil pro
    Développeur Java
    Inscrit en
    Mars 2002
    Messages
    974
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Développeur Java

    Informations forums :
    Inscription : Mars 2002
    Messages : 974
    Par défaut
    Hello,

    Merci pour ta reponse!

    Par contre qu'est qui t'a permis d'identifier cela?

    Merci d'avance!

  4. #4
    Membre chevronné
    Profil pro
    Inscrit en
    Juillet 2005
    Messages
    274
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juillet 2005
    Messages : 274
    Par défaut
    il a l'air d'être catégorique :

    http://mail-archives.apache.org/mod_mbox/logging-log4j-user/200207.mbox/%3c5.1.0.14.0.20020713234441.02742ea0@mail.qos.ch%3e

  5. #5
    Membre Expert
    Avatar de fabszn
    Homme Profil pro
    Développeur Java
    Inscrit en
    Mars 2002
    Messages
    974
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Développeur Java

    Informations forums :
    Inscription : Mars 2002
    Messages : 974
    Par défaut
    Hello,

    Merci pour l'info!

    Je vais regarder dans ce sens là!

  6. #6
    Membre Expert
    Avatar de fabszn
    Homme Profil pro
    Développeur Java
    Inscrit en
    Mars 2002
    Messages
    974
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Développeur Java

    Informations forums :
    Inscription : Mars 2002
    Messages : 974
    Par défaut
    Hello,

    Effectivement j'ai fait un tour sur l'ensemble des repertoires succeptible de contenir des libs log4j et j'ai trouvé des versions différentes voir des versions identiques à des endroits differents!

    Par contre, le fichier de proprieté que j'ai mis dans mon jar.. n'est pas pris en compte! J'imagine que l'instance dans le classloader est deja configuré donc il ne cherche pas mon fichier de config personnalisé pour mon driver!
    Ce n'est pas tres grave n l'important est que je retrouve bien mes logs dans un fichier autre que le SystemOut.log

    Merci encore pour ton aide!


+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Problème erreur pas comprise en c
    Par janor dans le forum C
    Réponses: 7
    Dernier message: 15/12/2008, 11h18
  2. ERREUR PAS COMPRISE
    Par realkilla dans le forum ASP
    Réponses: 4
    Dernier message: 22/07/2008, 22h22
  3. Réponses: 4
    Dernier message: 29/12/2007, 11h53
  4. [syntaxe] erreur de compilation pas comprise
    Par mamelouk dans le forum C++
    Réponses: 20
    Dernier message: 20/08/2007, 11h44
  5. erreur que j ai pas comprise ds mon pg informix
    Par zineb dans le forum Informix
    Réponses: 2
    Dernier message: 16/07/2003, 13h53

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo