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

Spring Java Discussion :

Exception lors du déploiement de petclinic


Sujet :

Spring Java

  1. #1
    Membre régulier
    Profil pro
    Inscrit en
    Novembre 2006
    Messages
    75
    Détails du profil
    Informations personnelles :
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Novembre 2006
    Messages : 75
    Points : 72
    Points
    72
    Par défaut Exception lors du déploiement de petclinic
    Voila, toute la journée pour déployer l'application petclinic mais sans résultat je suis vraiment mal


    Bonjour à tous,

    je n'ai fais que télécharger l'application, faire en sorte que toutes librairies sont présentes, je déploie et voila les exceptions que j'ai dans tomcat :

    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
    GRAVE: StandardWrapper.Throwable
    java.lang.IllegalStateException: Context attribute is not of type WebApplicationContext: org.springframework.web.context.support.XmlWebApplicationContext@169d75d: display name [Root WebApplicationContext]; startup date [Wed May 06 23:33:39 CEST 2009]; root of context hierarchy
    	at org.springframework.web.context.support.WebApplicationContextUtils.getWebApplicationContext(WebApplicationContextUtils.java:113)
    	at org.springframework.web.context.support.WebApplicationContextUtils.getWebApplicationContext(WebApplicationContextUtils.java:86)
    	at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:314)
    	at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:282)
    	at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:126)
    	at javax.servlet.GenericServlet.init(GenericServlet.java:212)
    	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1172)
    	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:992)
    	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4058)
    	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4371)
    	at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1116)
    	at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1214)
    	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)
    	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
    	at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)
    	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
    	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
    	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
    	at java.lang.Thread.run(Thread.java:619)
    6 mai 2009 23:33:39 org.apache.catalina.core.StandardContext loadOnStartup
    GRAVE: La servlet /petclinic a g�n�r� une exception "load()"
    java.lang.IllegalStateException: Context attribute is not of type WebApplicationContext: org.springframework.web.context.support.XmlWebApplicationContext@169d75d: display name [Root WebApplicationContext]; startup date [Wed May 06 23:33:39 CEST 2009]; root of context hierarchy
    	at org.springframework.web.context.support.WebApplicationContextUtils.getWebApplicationContext(WebApplicationContextUtils.java:113)
    	at org.springframework.web.context.support.WebApplicationContextUtils.getWebApplicationContext(WebApplicationContextUtils.java:86)
    	at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:314)
    	at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:282)
    	at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:126)
    	at javax.servlet.GenericServlet.init(GenericServlet.java:212)
    	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1172)
    	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:992)
    	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4058)
    	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4371)
    	at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1116)
    	at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1214)
    	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)
    	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
    	at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)
    	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
    	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
    	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
    	at java.lang.Thread.run(Thread.java:619)
    J'utilise spring 2.5
    J'ai des doutes sur le fichier web.xml plus exactement le mot clé webAppRootkey que j'arrive absolument pas à comprendre même depuis la javadoc ...

    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
     
    <web-app>
     
     
     
    	<display-name>Spring PetClinic</display-name>
     
     
     
    	<description>Spring PetClinic sample application</description>
     
     
     
    	<!--
     
    	  - Key of the system property that should specify the root directory of this
     
    	  - web app. Applied by WebAppRootListener or Log4jConfigListener.
     
    	  -->
     
    	<context-param>
     
    		<param-name>webAppRootKey</param-name>
     
    		<param-value>petclinic.root</param-value>
     
    	</context-param>
     
     
    	<!--
     
    	  - Location of the Log4J config file, for initialization and refresh checks.
     
    	  - Applied by Log4jConfigListener.
     
    	  -->
     
    	<context-param>
     
    		<param-name>log4jConfigLocation</param-name>
     
    		<param-value>/WEB-INF/log4j.properties</param-value>
     
    	</context-param>
    Faut-il changer quelque chose dans ce fichier? que veut dire petclinic.root

    Merci.

  2. #2
    Expert éminent
    Avatar de djo.mos
    Profil pro
    Inscrit en
    Octobre 2004
    Messages
    4 666
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2004
    Messages : 4 666
    Points : 7 679
    Points
    7 679
    Par défaut
    Salut,
    Est ce que ton web.xml contient la définition du ContextLoaderListener comme décrit dans la http://java.developpez.com/faq/sprin...ebconfigspring ?

  3. #3
    Membre régulier
    Profil pro
    Inscrit en
    Novembre 2006
    Messages
    75
    Détails du profil
    Informations personnelles :
    Localisation : France, Paris (Île de France)

    Informations forums :
    Inscription : Novembre 2006
    Messages : 75
    Points : 72
    Points
    72
    Par défaut
    Bonjour djo.mos et merci pour ta réponse.

    J'ai redéployé l'application aujourd'hui et par magie elle fonctionne. (Comme quoi, il est toujours bon de laisser le temps faire les choses )
    Je croix qu'entre temps, j'ai dû faire le ménage dans mes librairies.

    Pour répondre à ta question : Oui, mon web.xml contient la définition du ContextLoaderListener comme décrit dans la faq (d'ailleurs c'est ce qui est livré par défaut)

    Merci en tout cas

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

Discussions similaires

  1. [EJB3] EJB exception lors du déploiement
    Par gunzmokaz dans le forum Java EE
    Réponses: 21
    Dernier message: 11/03/2015, 09h49
  2. Exceptions lévée lors du déploiement sur GlassFish
    Par yannick midou dans le forum Glassfish et Payara
    Réponses: 2
    Dernier message: 14/11/2014, 11h26
  3. [EJB] Un exception incompréhensible lors du déploiement de mon EJB
    Par saveriu dans le forum Java EE
    Réponses: 14
    Dernier message: 04/01/2013, 04h27
  4. [Exception]Lors d'un validate sur un jframe
    Par cameleon2002 dans le forum Agents de placement/Fenêtres
    Réponses: 12
    Dernier message: 02/05/2005, 11h27
  5. [JDBC] SQL Exception lors d'une Query !
    Par Castagnems dans le forum JDBC
    Réponses: 5
    Dernier message: 30/04/2004, 12h00

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