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

Tomcat et TomEE Java Discussion :

Message DEBUG intempestifs


Sujet :

Tomcat et TomEE Java

  1. #21
    Membre à l'essai
    Profil pro
    Inscrit en
    Février 2007
    Messages
    28
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2007
    Messages : 28
    Points : 14
    Points
    14
    Par défaut
    J'ai supprimé le jar de spring-test, toujours même problème.
    J'ai supprimé slf4j, mais il me sort une erreur lors du chargement du contexte:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    22 nov. 2012 00:31:12 org.apache.catalina.core.AprLifecycleListener init
    INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: .:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
    22 nov. 2012 00:31:12 org.apache.tomcat.util.digester.SetPropertiesRule begin
    ATTENTION: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:monapp' did not find a matching property.
    22 nov. 2012 00:31:13 org.apache.coyote.AbstractProtocol init
    INFO: Initializing ProtocolHandler ["http-bio-8080"]
    22 nov. 2012 00:31:13 org.apache.coyote.AbstractProtocol init
    INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
    22 nov. 2012 00:31:13 org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 1320 ms
    22 nov. 2012 00:31:13 org.apache.catalina.core.StandardService startInternal
    INFO: Démarrage du service Catalina
    22 nov. 2012 00:31:13 org.apache.catalina.core.StandardEngine startInternal
    INFO: Starting Servlet Engine: Apache Tomcat/7.0.32
    22 nov. 2012 00:31:18 org.apache.catalina.startup.TaglibUriRule body
    INFO: TLD skipped. URI: http://java.sun.com/jstl/core_rt is already defined
    22 nov. 2012 00:31:18 org.apache.catalina.startup.TaglibUriRule body
    INFO: TLD skipped. URI: http://java.sun.com/jstl/core is already defined
    22 nov. 2012 00:31:18 org.apache.catalina.startup.TaglibUriRule body
    INFO: TLD skipped. URI: http://java.sun.com/jstl/fmt_rt is already defined
    22 nov. 2012 00:31:18 org.apache.catalina.startup.TaglibUriRule body
    INFO: TLD skipped. URI: http://java.sun.com/jstl/fmt is already defined
    22 nov. 2012 00:31:18 org.apache.catalina.startup.TaglibUriRule body
    INFO: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/permittedTaglibs is already defined
    22 nov. 2012 00:31:18 org.apache.catalina.startup.TaglibUriRule body
    INFO: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/scriptfree is already defined
    22 nov. 2012 00:31:18 org.apache.catalina.startup.TaglibUriRule body
    INFO: TLD skipped. URI: http://java.sun.com/jstl/sql_rt is already defined
    22 nov. 2012 00:31:18 org.apache.catalina.startup.TaglibUriRule body
    INFO: TLD skipped. URI: http://java.sun.com/jstl/sql is already defined
    22 nov. 2012 00:31:18 org.apache.catalina.startup.TaglibUriRule body
    INFO: TLD skipped. URI: http://java.sun.com/jstl/xml_rt is already defined
    22 nov. 2012 00:31:18 org.apache.catalina.startup.TaglibUriRule body
    INFO: TLD skipped. URI: http://java.sun.com/jstl/xml is already defined
    22 nov. 2012 00:31:19 org.apache.catalina.core.ApplicationContext log
    INFO: No Spring WebApplicationInitializer types detected on classpath
    22 nov. 2012 00:31:19 org.apache.catalina.core.StandardContext listenerStart
    GRAVE: Exception lors de l'envoi de l'évènement contexte initialisé (context initialized) à l'instance de classe d'écoute (listener) org.springframework.web.context.ContextLoaderListener
    java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
    	at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:156)
    	at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:132)
    	at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
    	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:270)
    	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
    	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791)
    	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285)
    	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
    	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
    	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    	at java.lang.Thread.run(Thread.java:680)
    Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
    	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
    	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
    	... 15 more
    22 nov. 2012 00:31:19 org.apache.catalina.core.StandardContext startInternal
    GRAVE: Error listenerStart
    22 nov. 2012 00:31:19 org.apache.catalina.core.StandardContext startInternal
    GRAVE: Erreur de démarrage du contexte [/monapp] suite aux erreurs précédentes
    22 nov. 2012 00:31:19 org.apache.catalina.core.ApplicationContext log
    INFO: Closing Spring root WebApplicationContext
    22 nov. 2012 00:31:19 org.apache.catalina.core.StandardContext listenerStop
    GRAVE: Exception lors de l'envoi de l'évènement contexte détruit (context destroyed) à l'instance de classe d'écoute org.springframework.web.context.ContextLoaderListener
    java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
    	at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:156)
    	at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:132)
    	at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
    	at org.springframework.web.context.ContextCleanupListener.<clinit>(ContextCleanupListener.java:43)
    	at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:144)
    	at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4831)
    	at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5478)
    	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
    	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160)
    	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
    	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
    	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    	at java.lang.Thread.run(Thread.java:680)
    22 nov. 2012 00:31:19 org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Déploiement du répertoire /Users/anas/Repository/server/apache-tomcat-7.0.32-default/webapps/ROOT de l'application web
    22 nov. 2012 00:31:19 org.apache.coyote.AbstractProtocol start
    INFO: Starting ProtocolHandler ["http-bio-8080"]
    22 nov. 2012 00:31:19 org.apache.coyote.AbstractProtocol start
    INFO: Starting ProtocolHandler ["ajp-bio-8009"]
    22 nov. 2012 00:31:19 org.apache.catalina.startup.Catalina start
    INFO: Server startup in 6348 ms
    Le slf4j est fourni avec une webapp d'exemple de Spring dont j'ai copié les jar.
    Bon, vu que slf4j est visiblement indispensable je vais regarder du coté de la conf slf4j.

  2. #22
    Membre chevronné
    Avatar de fxrobin
    Homme Profil pro
    Architecte SI, Java Fan, API Manager
    Inscrit en
    Novembre 2007
    Messages
    875
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Ille et Vilaine (Bretagne)

    Informations professionnelles :
    Activité : Architecte SI, Java Fan, API Manager
    Secteur : Aéronautique - Marine - Espace - Armement

    Informations forums :
    Inscription : Novembre 2007
    Messages : 875
    Points : 2 112
    Points
    2 112
    Par défaut
    Citation Envoyé par fxrobin Voir le message
    On dirait que c'est dès que Spring se lance.
    Tu peux montrer ton web.xml ? pour voir si tu n'as pas un "lo4gjlistener" pour
    Je ré-itère ma demande
    Moins on code, moins il y a de bug ... et vice-versa ainsi qu'inversement ...

  3. #23
    Membre à l'essai
    Profil pro
    Inscrit en
    Février 2007
    Messages
    28
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2007
    Messages : 28
    Points : 14
    Points
    14
    Par défaut
    J'ai enlevé spring-test, les log intempestif sont toujours là.
    J'ai ensuite enlevé slf4j.jar et là j'ai l'erreur suivante:
    java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory

    Log de la console:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    24 nov. 2012 12:47:51 org.apache.catalina.core.AprLifecycleListener init
    INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: .:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
    24 nov. 2012 12:47:51 org.apache.tomcat.util.digester.SetPropertiesRule begin
    ATTENTION: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:monapp' did not find a matching property.
    24 nov. 2012 12:47:52 org.apache.coyote.AbstractProtocol init
    INFO: Initializing ProtocolHandler ["http-bio-8080"]
    24 nov. 2012 12:47:52 org.apache.coyote.AbstractProtocol init
    INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
    24 nov. 2012 12:47:52 org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 2804 ms
    24 nov. 2012 12:47:52 org.apache.catalina.core.StandardService startInternal
    INFO: Démarrage du service Catalina
    24 nov. 2012 12:47:52 org.apache.catalina.core.StandardEngine startInternal
    INFO: Starting Servlet Engine: Apache Tomcat/7.0.32
    24 nov. 2012 12:48:00 org.apache.catalina.startup.TaglibUriRule body
    INFO: TLD skipped. URI: http://java.sun.com/jstl/core_rt is already defined
    24 nov. 2012 12:48:00 org.apache.catalina.startup.TaglibUriRule body
    INFO: TLD skipped. URI: http://java.sun.com/jstl/core is already defined
    24 nov. 2012 12:48:00 org.apache.catalina.startup.TaglibUriRule body
    INFO: TLD skipped. URI: http://java.sun.com/jstl/fmt_rt is already defined
    24 nov. 2012 12:48:00 org.apache.catalina.startup.TaglibUriRule body
    INFO: TLD skipped. URI: http://java.sun.com/jstl/fmt is already defined
    24 nov. 2012 12:48:00 org.apache.catalina.startup.TaglibUriRule body
    INFO: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/permittedTaglibs is already defined
    24 nov. 2012 12:48:00 org.apache.catalina.startup.TaglibUriRule body
    INFO: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/scriptfree is already defined
    24 nov. 2012 12:48:00 org.apache.catalina.startup.TaglibUriRule body
    INFO: TLD skipped. URI: http://java.sun.com/jstl/sql_rt is already defined
    24 nov. 2012 12:48:00 org.apache.catalina.startup.TaglibUriRule body
    INFO: TLD skipped. URI: http://java.sun.com/jstl/sql is already defined
    24 nov. 2012 12:48:00 org.apache.catalina.startup.TaglibUriRule body
    INFO: TLD skipped. URI: http://java.sun.com/jstl/xml_rt is already defined
    24 nov. 2012 12:48:00 org.apache.catalina.startup.TaglibUriRule body
    INFO: TLD skipped. URI: http://java.sun.com/jstl/xml is already defined
    24 nov. 2012 12:48:01 org.apache.catalina.core.ApplicationContext log
    INFO: No Spring WebApplicationInitializer types detected on classpath
    24 nov. 2012 12:48:01 org.apache.catalina.core.StandardContext listenerStart
    GRAVE: Exception lors de l'envoi de l'évènement contexte initialisé (context initialized) à l'instance de classe d'écoute (listener) org.springframework.web.context.ContextLoaderListener
    java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
    	at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:156)
    	at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:132)
    	at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
    	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:270)
    	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
    	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791)
    	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285)
    	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
    	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
    	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    	at java.lang.Thread.run(Thread.java:680)
    Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
    	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
    	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
    	... 15 more
    24 nov. 2012 12:48:01 org.apache.catalina.core.StandardContext startInternal
    GRAVE: Error listenerStart
    24 nov. 2012 12:48:01 org.apache.catalina.core.StandardContext startInternal
    GRAVE: Erreur de démarrage du contexte [/monapp] suite aux erreurs précédentes
    24 nov. 2012 12:48:01 org.apache.catalina.core.ApplicationContext log
    INFO: Closing Spring root WebApplicationContext
    24 nov. 2012 12:48:01 org.apache.catalina.core.StandardContext listenerStop
    GRAVE: Exception lors de l'envoi de l'évènement contexte détruit (context destroyed) à l'instance de classe d'écoute org.springframework.web.context.ContextLoaderListener
    java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
    	at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:156)
    	at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:132)
    	at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
    	at org.springframework.web.context.ContextCleanupListener.<clinit>(ContextCleanupListener.java:43)
    	at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:144)
    	at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4831)
    	at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5478)
    	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
    	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160)
    	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
    	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
    	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    	at java.lang.Thread.run(Thread.java:680)
    24 nov. 2012 12:48:01 org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Déploiement du répertoire /Users/anas/Repository/server/apache-tomcat-7.0.32-default/webapps/ROOT de l'application web
    24 nov. 2012 12:48:01 org.apache.coyote.AbstractProtocol start
    INFO: Starting ProtocolHandler ["http-bio-8080"]
    24 nov. 2012 12:48:01 org.apache.coyote.AbstractProtocol start
    INFO: Starting ProtocolHandler ["ajp-bio-8009"]
    24 nov. 2012 12:48:01 org.apache.catalina.startup.Catalina start
    INFO: Server startup in 9028 ms
    Selon la doc spring, slf4j n'est ps indispensable, il est possible d'utiliser uniquement log4j et c'est ce que je voudrais, j'ai pas le temps de me documenter sur slf4j.

  4. #24
    Membre chevronné
    Avatar de fxrobin
    Homme Profil pro
    Architecte SI, Java Fan, API Manager
    Inscrit en
    Novembre 2007
    Messages
    875
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Ille et Vilaine (Bretagne)

    Informations professionnelles :
    Activité : Architecte SI, Java Fan, API Manager
    Secteur : Aéronautique - Marine - Espace - Armement

    Informations forums :
    Inscription : Novembre 2007
    Messages : 875
    Points : 2 112
    Points
    2 112
    Par défaut
    as-tu dézippé tous tes jars pour tenter d'y chercher un fichier "log4j.properties" ou "log4j.xml" comme je te l'ai suggéré ?

    et tu n'as toujours pas montré ton fichier web.xml ...
    Moins on code, moins il y a de bug ... et vice-versa ainsi qu'inversement ...

  5. #25
    Membre à l'essai
    Profil pro
    Inscrit en
    Février 2007
    Messages
    28
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2007
    Messages : 28
    Points : 14
    Points
    14
    Par défaut
    Le web.xml:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
      <display-name>Myapp application</display-name>
      <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>
                /WEB-INF/applicationContext-*.xml
            </param-value>
      </context-param>
      <filter>
        <filter-name>springSecurityFilterChain</filter-name>
        <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
      </filter>
      <filter-mapping>
        <filter-name>springSecurityFilterChain</filter-name>
        <url-pattern>/*</url-pattern>
      </filter-mapping>
      <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
      </listener>
      <listener>
        <listener-class>org.springframework.security.web.session.HttpSessionEventPublisher</listener-class>
      </listener>
      <servlet>
        <servlet-name>action</servlet-name>
        <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
        <init-param>
          <param-name>config</param-name>
          <param-value>/WEB-INF/struts-config.xml</param-value>
        </init-param>
        <init-param>
          <param-name>debug</param-name>
          <param-value>2</param-value>
        </init-param>
        <init-param>
          <param-name>detail</param-name>
          <param-value>2</param-value>
        </init-param>
        <load-on-startup>2</load-on-startup>
      </servlet>
      <servlet-mapping>
        <servlet-name>action</servlet-name>
        <url-pattern>*.action</url-pattern>
      </servlet-mapping>
      <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
        <welcome-file>index.html</welcome-file>
      </welcome-file-list>
      <error-page>
        <error-code>403</error-code>
        <location>/error.jsp</location>
      </error-page>
      <error-page>
        <error-code>404</error-code>
        <location>/error.jsp</location>
      </error-page>
      <error-page>
        <error-code>500</error-code>
        <location>/error.jsp</location>
      </error-page>
      <resource-ref>
        <description>Source de donnees locale monapp</description>
        <res-ref-name>jdbc/monapp</res-ref-name>
        <res-type>javax.sql.DataSource</res-type>
        <res-auth>Container</res-auth>
        <res-sharing-scope>Shareable</res-sharing-scope>
      </resource-ref>
      <resource-env-ref>
        <description>Host du serveur mail</description>
        <resource-env-ref-name>mail/host</resource-env-ref-name>
        <resource-env-ref-type>java.lang.String</resource-env-ref-type>
      </resource-env-ref>
      <resource-env-ref>
        <description>User technique du serveur mail</description>
        <resource-env-ref-name>mail/user</resource-env-ref-name>
        <resource-env-ref-type>java.lang.String</resource-env-ref-type>
      </resource-env-ref>
      <resource-env-ref>
        <description>Mot de passe du user technique du serveur mail</description>
        <resource-env-ref-name>mail/password</resource-env-ref-name>
        <resource-env-ref-type>java.lang.String</resource-env-ref-type>
      </resource-env-ref>
      <resource-env-ref>
        <description>Host du serveur mail</description>
        <resource-env-ref-name>mail/from</resource-env-ref-name>
        <resource-env-ref-type>java.lang.String</resource-env-ref-type>
      </resource-env-ref>
    </web-app>

  6. #26
    Membre chevronné
    Avatar de fxrobin
    Homme Profil pro
    Architecte SI, Java Fan, API Manager
    Inscrit en
    Novembre 2007
    Messages
    875
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Ille et Vilaine (Bretagne)

    Informations professionnelles :
    Activité : Architecte SI, Java Fan, API Manager
    Secteur : Aéronautique - Marine - Espace - Armement

    Informations forums :
    Inscription : Novembre 2007
    Messages : 875
    Points : 2 112
    Points
    2 112
    Par défaut
    peux-tu maintenant montrer tous tes fichiers de configuration Spring ?

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    applicationContext-*.xml
    Moins on code, moins il y a de bug ... et vice-versa ainsi qu'inversement ...

  7. #27
    Membre averti
    Homme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Février 2005
    Messages
    241
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 41
    Localisation : France, Haute Garonne (Midi Pyrénées)

    Informations professionnelles :
    Activité : Ingénieur développement logiciels
    Secteur : Aéronautique - Marine - Espace - Armement

    Informations forums :
    Inscription : Février 2005
    Messages : 241
    Points : 399
    Points
    399
    Par défaut
    Bonjour,

    le format des messages de logs en DEBUG me fait plutôt penser à du SLF4J/logback-classic.

    Regarde du côté d'un fichier logback.xml et/ou logback-test.xml.

    Cordialement,
    Sébastien

  8. #28
    Membre à l'essai
    Profil pro
    Inscrit en
    Février 2007
    Messages
    28
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2007
    Messages : 28
    Points : 14
    Points
    14
    Par défaut
    J'ai pas de fichier logback.xml dans mon projet, j'ai pris celui des exemples spring pour voir ce que ça donne et je n'ai pus de DEBUG intempestifs.

    Visiblement Slf4j fait du DEBUG par défaut. Vu que le contexte Spring ne peut pas se charger sans Slf4j (cf. message précédent java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory), je vais me dépatouiller avec Slf4j.

    Cela dit, j'aurais préféré utiliser log4j que je connais mieux. Dans la doc Spring, Slf4j n'est pas indispensable. Si qq'un a une idée du pourquoi spring m'blige à utiliser Slf4j, je suis preneur.

  9. #29
    Membre chevronné
    Avatar de fxrobin
    Homme Profil pro
    Architecte SI, Java Fan, API Manager
    Inscrit en
    Novembre 2007
    Messages
    875
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Ille et Vilaine (Bretagne)

    Informations professionnelles :
    Activité : Architecte SI, Java Fan, API Manager
    Secteur : Aéronautique - Marine - Espace - Armement

    Informations forums :
    Inscription : Novembre 2007
    Messages : 875
    Points : 2 112
    Points
    2 112
    Par défaut
    si tu montres pas ton fichier de conf spring, on va avoir du mal à t'aider ... donc je ré-itère ma demande à ce sujet ...
    Moins on code, moins il y a de bug ... et vice-versa ainsi qu'inversement ...

  10. #30
    Membre à l'essai
    Profil pro
    Inscrit en
    Février 2007
    Messages
    28
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2007
    Messages : 28
    Points : 14
    Points
    14
    Par défaut
    Voila m'siou robin des bois:

    applicationContext-dao.xml
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    <?xml version="1.0" encoding="UTF-8"?>
     
    <beans 	xmlns="http://www.springframework.org/schema/beans"
    		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    		xmlns:aop="http://www.springframework.org/schema/aop" 
    		xmlns:tx="http://www.springframework.org/schema/tx"
    		xsi:schemaLocation="
    			http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd 
    			http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
    			http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">  
     
    	<!--############################ Source de données JDBC via JNDI ##################################-->
    	<bean id="businessDataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
    		<property name="jndiName" value="java:comp/env/jdbc/monapp" />
    	</bean>
     
    	<!--############################ AOP  #############################################################-->
    	<bean id="txManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
    		<property name="dataSource" ref="businessDataSource" />
    	</bean>
    	<tx:advice id="txAdvice" transaction-manager="txManager">
    		<tx:attributes>
    			<tx:method name="lire*" 		read-only="true"/>
    			<tx:method name="rechercher*" 	read-only="true"/>
    			<tx:method name="*" 			rollback-for="Throwable" />
    		</tx:attributes>
    	</tx:advice>	
    	<aop:config>
    	  <aop:pointcut id="daoPointcut" expression="execution(* com.monapp.dao.impl.*DaoJdbc.*(..))"/>
    	  <aop:advisor advice-ref="txAdvice" pointcut-ref="daoPointcut"/>
    	</aop:config>
     
    	<!--############################ DAOs ##############################################################-->	
    	<bean id="utilisateurDAO" 	class="com.monapp.dao.impl.UtilisateurDaoPrestashop" >	
    		<property name="restTemplate" ref="restTemplate" />
    		<property name="backOfficeUrlJndiName" value="java:comp/env/backoffice/url" />
    		<property name="passwordEncoder" ref="md5passwordEncoder" />
    		<property name="saltSource" ref="usernameSaltSource" />
    		<property name="dateFormater" ref="dateFormater" />
    		<property name="birthDatePattern" value="yyyy-MM-dd" />
    	</bean>		
    </beans>
    applicationContext-security.xml
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    <?xml version="1.0" encoding="UTF-8"?>
     
    <beans 	xmlns="http://www.springframework.org/schema/beans" 
    		xmlns:security="http://www.springframework.org/schema/security" 
    		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    		xsi:schemaLocation="
    			http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd 
    			http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd">
     
    	<security:http pattern="/public/**" security="none"/>
     
    	<security:http>
        	<security:intercept-url	pattern="/prive/**" 
        							access="ROLE_USER" 
        							requires-channel="http"/>
        	<security:form-login 	login-page="/public/login.action?method=afficher"	
        							authentication-failure-url="/public/login.action?method=erreurAuthentification"
        							default-target-url="/prive/routage.action?method=router" 
        							always-use-default-target="true"/>		
        	<security:logout		logout-url="/prive/logout.action"	
        							invalidate-session="true" 
        							logout-success-url="/public/home.action?method=afficher"
        							delete-cookies="JSESSIONID"/>
        	<security:session-management 
        							invalid-session-url="/public/login.action?method=erreurSessionInvalide">
        		<security:concurrency-control 	
        							max-sessions="1"  
        							error-if-maximum-exceeded="true" 
        							expired-url="/public/login.action?method=erreurSessionMaximum"/>
        	</security:session-management>
       	</security:http>	
     
       	<security:authentication-manager alias="authenticationManager"/>
     
       	<bean id="authenticationManager" class="org.springframework.security.providers.ProviderManager">
    		<property name="providers"> 
    			<list>
    				<ref local="daoAuthenticationProvider"/> 
    			</list>
    		</property> 
    	</bean>
    	<bean id="daoAuthenticationProvider" class="org.springframework.security.authentication.dao.DaoAuthenticationProvider">
    		<property name="userDetailsService" ref="utilisateurDAO"/> 
    		<property name="saltSource" 		ref="usernameSaltSource"/> 
    		<property name="passwordEncoder" 	ref="md5passwordEncoder"/>
    		<property name="userCache" 			ref="ehCache"/>
    	</bean>
    	<bean id="usernameSaltSource" class="org.springframework.security.authentication.dao.ReflectionSaltSource">
    		<property name="userPropertyToUse" value="username"/>
    	</bean>
    	<bean id="md5passwordEncoder" class="org.springframework.security.authentication.encoding.Md5PasswordEncoder">
    	</bean>
    	<bean id="ehCache" class="org.springframework.security.core.userdetails.cache.EhCacheBasedUserCache">
    		<property name="cache" ref="ehCacheBackend"/>
    	</bean>
    	<bean id="ehCacheBackend" class="org.springframework.cache.ehcache.EhCacheFactoryBean"> 
    		<property name="cacheManager" ref="ehCacheManager"/>
    		<property name="cacheName" value="ehCache"/>
    	</bean>
    	<bean id="ehCacheManager" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
    		<property name="configLocation" value="classpath:/ehcache-failsafe.xml"/>
    	</bean>	
    </beans>
    applicationContext-service.xml
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    	xmlns:aop="http://www.springframework.org/schema/aop"
    	xmlns:tx="http://www.springframework.org/schema/tx"
    	xsi:schemaLocation="
          http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
    	  http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
    	  http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">
     
    	<!-- ############################################################################################ -->
    	<bean name="/public/login" class="com.monapp.web.action.LoginAction">
    		<property name="jetonService">
    			<ref bean="jetonService" />		
    		</property>
    		<property name="utilisateurService">
    			<ref bean="utilisateurService" />
    		</property>
    	</bean>
    	<bean name="/public/home" class="com.monapp.web.action.HomeAction">
    	</bean>
    	<bean name="/prive/tableaudebord" class="com.monapp.web.action.HomeAction">
    	</bean>
     
    	<!-- ############################################################################################ -->
    	<bean id="utilisateurService" class="com.monapp.service.impl.UtilisateurServiceImpl">
    		<property name="utilisateurDAO">
    			<ref bean="utilisateurDAO" />
    		</property>
    		<property name="mailService">
    			<ref bean="mailService" />
    		</property>
    		<property name="passwordEncoder">
    			<ref bean="md5passwordEncoder" />
    		</property> 
    		<property name="saltSource">
    			<ref bean="usernameSaltSource" />
    		</property> 
    	</bean>
    </beans>
    applicationContext-utils.xml
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    <?xml version="1.0" encoding="UTF-8"?>
     
    <beans xmlns="http://www.springframework.org/schema/beans"
    	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    	xmlns:aop="http://www.springframework.org/schema/aop"
    	xmlns:tx="http://www.springframework.org/schema/tx"
    	xsi:schemaLocation="
          http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
    	  http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
    	  http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">
     
    	<bean id="mailService" class="com.monapp.service.commun.impl.MailServiceImpl">
    		<property name="messagesResource">
    			<bean class="org.springframework.context.support.ResourceBundleMessageSource">
        			<property name="basename" value="com/monapp/i18n/MailServiceResource" />
    			</bean>			
    		</property>		
    	</bean>	
     
    	<bean id="jetonService" class="com.monapp.service.commun.impl.JetonServiceHttpServlet">
    		<property name="dureeMinimaleDeValidation" value="10" /> <!-- en secondes -->
    	</bean>
     
    	<bean id="namedTemplate" class="org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate">
    	  <constructor-arg index="0" ref="businessDataSource"/>   
    	</bean>
     
    	<bean id="messagesResource" class="org.springframework.context.support.ResourceBundleMessageSource">
        	<property name="basename" value="com/monapp/i18n/ModelResources" />
    	</bean>		
     
    	<bean id="restTemplate" class="org.springframework.web.client.RestTemplate">
    	    <property name="messageConverters">
    	    <list>
    	      <bean id="messageConverter" class="org.springframework.http.converter.xml.MarshallingHttpMessageConverter">
    	        <property name="marshaller" ref="xstreamMarshaller" />
    	        <property name="unmarshaller" ref="xstreamMarshaller" />
    	      </bean>
    	    </list>
        	</property>
      	</bean>
     
      	<bean id="xstreamMarshaller" class="org.springframework.oxm.xstream.XStreamMarshaller">
    	    <property name="aliases">
    		    <props>
    		      <prop key="customer">com.monapp.dao.impl.UtilisateurDaoPrestashop.Customer</prop>
    		    </props>
    	    </property>
      	</bean>	
      	<bean id="dateFormater" class="java.text.SimpleDateFormat" />		
    </beans>

Discussions similaires

  1. Réponses: 2
    Dernier message: 28/08/2009, 15h20
  2. Affichage les messages debug
    Par Esil2008 dans le forum Logging
    Réponses: 1
    Dernier message: 04/07/2009, 09h15
  3. Debug intempestif au démarrage
    Par sergio86 dans le forum Ubuntu
    Réponses: 3
    Dernier message: 20/09/2008, 18h09
  4. message .xla intempestif
    Par ouioui_cmoi dans le forum Macros et VBA Excel
    Réponses: 0
    Dernier message: 28/03/2008, 18h13
  5. [API] Codage d'un moniteur de messages debug
    Par Pierre Castelain dans le forum API, COM et SDKs
    Réponses: 3
    Dernier message: 15/01/2004, 19h47

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