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

Servlets/JSP Java Discussion :

Allocation de la servlet


Sujet :

Servlets/JSP Java

  1. #1
    Candidat au Club
    Profil pro
    Inscrit en
    Février 2007
    Messages
    5
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2007
    Messages : 5
    Points : 2
    Points
    2
    Par défaut Allocation de la servlet
    Bonjour à tous,

    je developpe une application web avec eclipse et tomcat utilisant le framework hibernate pour la persistance et Hsqldb comme SGBD.

    j'ai un pb au niveau du chargement de mon application web cad lorsque je veux charger ma page d'acceuil."Exception lors de l'allocation pour la servlet {0}
    javax.servlet.ServletException: "Servlet.init()" pour la servlet serveur a généré une exception.

    la trace complete est la suivante:

    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
    ERROR [http-8080-Processor25] - StandardWrapper.Throwable
    java.lang.NoSuchMethodError: org.springframework.web.context.WebApplicationContext.getAutowireCapableBeanFactory()Lorg/springframework/beans/factory/config/AutowireCapableBeanFactory;
    	at org.springframework.web.servlet.DispatcherServlet.createDefaultStrategy(DispatcherServlet.java:689)
    	at org.springframework.web.servlet.DispatcherServlet.getDefaultStrategies(DispatcherServlet.java:664)
    	at org.springframework.web.servlet.DispatcherServlet.getDefaultStrategy(DispatcherServlet.java:637)
    	at org.springframework.web.servlet.DispatcherServlet.initLocaleResolver(DispatcherServlet.java:417)
    	at org.springframework.web.servlet.DispatcherServlet.initFrameworkServlet(DispatcherServlet.java:370)
    	at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:222)
    	at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:114)
    	at javax.servlet.GenericServlet.init(GenericServlet.java:211)
    	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1053)
    	at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:711)
    	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:131)
    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825)
    	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:731)
    	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:526)
    	at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
    	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    	at java.lang.Thread.run(Thread.java:595)
    ERROR [http-8080-Processor25] - Exception lors de lallocation pour la servlet {0}
    javax.servlet.ServletException: "Servlet.init()" pour la servlet serveur a généré une exception
    	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1095)
    	at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:711)
    	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:131)
    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825)
    	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:731)
    	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:526)
    	at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
    	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    	at java.lang.Thread.run(Thread.java:595)

  2. #2
    Candidat au Club
    Profil pro
    Inscrit en
    Février 2007
    Messages
    5
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2007
    Messages : 5
    Points : 2
    Points
    2
    Par défaut
    merci pour votre aide

  3. #3
    Inactif  
    Profil pro
    Inscrit en
    Mai 2006
    Messages
    2 189
    Détails du profil
    Informations personnelles :
    Âge : 43
    Localisation : Suisse

    Informations forums :
    Inscription : Mai 2006
    Messages : 2 189
    Points : 2 336
    Points
    2 336
    Par défaut
    faudrait voir comment tu as définit ton web.xml à première vue tu utilises également Spring

  4. #4
    Candidat au Club
    Profil pro
    Inscrit en
    Février 2007
    Messages
    5
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2007
    Messages : 5
    Points : 2
    Points
    2
    Par défaut
    mon web.xml est le suivant et j'utilise bien spring:
    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
    <?xml version="1.0" encoding="ISO-8859-1"?>
     
    <!DOCTYPE web-app PUBLIC
    "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
     
    	<web-app>
     
    	<!-- Define the basename for a resource bundle for I18N -->
    	<context-param>
    		<param-name>
    			javax.servlet.jsp.jstl.fmt.localizationContext
    		</param-name>
    		<param-value>messages</param-value>
    	</context-param>
     
    	<context-param>
    		<param-name>contextConfigLocation</param-name>
    		<param-value>/WEB-INF/applicationContext*.xml</param-value>
    	</context-param>
     
    	<filter>
            <filter-name>Acegi Security Filter</filter-name>
            <filter-class>net.sf.acegisecurity.util.FilterToBeanProxy</filter-class>
            <init-param>
                <param-name>targetClass</param-name>
                <param-value>net.sf.acegisecurity.util.FilterChainProxy</param-value>
            </init-param>
        </filter>
     
     
    	<filter>
    		<filter-name>Hibernate Session In View Filter</filter-name>
    		<filter-class>
    			org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
    		</filter-class>
    	</filter>
     
        <!-- Spring/Hibernate filter mappings -->
    	  <filter-mapping>
    		<filter-name>Hibernate Session In View Filter</filter-name>
    		<url-pattern>*.serveur</url-pattern>
    	</filter-mapping>
     
    	<filter-mapping>
    		<filter-name>Hibernate Session In View Filter</filter-name>
    		<url-pattern>/j_acegi_security_check</url-pattern>
    	</filter-mapping>
     
        <!-- Acegi Security filters mappings -->
    	<filter-mapping>
    		<filter-name>Acegi Security Filter</filter-name>
    		<url-pattern>/*</url-pattern>
    	</filter-mapping>
     
     
    		<!-- le chargeur du contexte spring de l'application -->
    		<listener>
    			<listener-class>
    			org.springframework.web.context.ContextLoaderListener</listener-class>
    		</listener>
     
    		<!-- la servlet -->
    		<servlet>
    			<servlet-name>serveur</servlet-name>
    			<servlet-class>
    			org.springframework.web.servlet.DispatcherServlet</servlet-class>
     
    		</servlet>
     
    		<!-- le mapping des url -->
    		<servlet-mapping>
    			<servlet-name>serveur</servlet-name>
    			<url-pattern>*.html</url-pattern>
    		</servlet-mapping>
     
    		<!-- le document d'entrée -->
    		<welcome-file-list>
    			<welcome-file>index.jsp</welcome-file>
    		</welcome-file-list>
     
     
    	</web-app>

  5. #5
    Rédacteur
    Avatar de _Mac_
    Profil pro
    Inscrit en
    Août 2005
    Messages
    9 601
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Août 2005
    Messages : 9 601
    Points : 12 977
    Points
    12 977
    Par défaut
    Je ne connais pas du tout Spring, mais ça ressemble à une erreur de config Spring ou de version de librairies. Tu utilises en dev les mêmes JAR qu'en runtime ?

    Du détail, du détail, du détail !!!
    Revenons à la source : lisons la documentation et les fichiers de trace, la réponse à notre problème s'y trouve sans doute

  6. #6
    Candidat au Club
    Profil pro
    Inscrit en
    Février 2007
    Messages
    5
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2007
    Messages : 5
    Points : 2
    Points
    2
    Par défaut
    oui normallement ..

  7. #7
    Membre habitué
    Profil pro
    Inscrit en
    Octobre 2006
    Messages
    145
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2006
    Messages : 145
    Points : 125
    Points
    125
    Par défaut
    salut,

    la méthode getAutowireCapableBeanFactory() de la classe org.springframework.web.context.WebApplicationContext n'est pas trouvée. Retrouve déjà dans ton classpath cette classe, puis décompile là pour voir si la méthode existe. Comme dit _Mac_, tu dois utiliser une version de la classe Spring org.springframework.web.context.WebApplicationContext qui ne contient pas la méthode. Peut-être as-tu 2 jars spring dans le classpath?

  8. #8
    Candidat au Club
    Profil pro
    Inscrit en
    Février 2007
    Messages
    5
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2007
    Messages : 5
    Points : 2
    Points
    2
    Par défaut
    Merci les gars
    c'était bien ça mac :le spring-context.jar était présent sous le dossier lib sous eclipse mais malheureusement abscent du repertoire de l'application

    j'ai du le virer sans que je me rendre compte...

    merci

  9. #9
    Rédacteur
    Avatar de _Mac_
    Profil pro
    Inscrit en
    Août 2005
    Messages
    9 601
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Août 2005
    Messages : 9 601
    Points : 12 977
    Points
    12 977
    Par défaut
    OK, pas de pb. Pense au bouton

    Du détail, du détail, du détail !!!
    Revenons à la source : lisons la documentation et les fichiers de trace, la réponse à notre problème s'y trouve sans doute

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

Discussions similaires

  1. Exception lors de l'allocation pour la servlet
    Par birt1976 dans le forum Servlets/JSP
    Réponses: 1
    Dernier message: 17/11/2008, 11h26
  2. Allocation dynamique de mémoire en asm
    Par narmataru dans le forum Assembleur
    Réponses: 7
    Dernier message: 17/12/2002, 22h31
  3. Réponses: 4
    Dernier message: 03/12/2002, 16h47
  4. [Turbo Pascal] Allocation et désallocation de pointeurs dans une fonction
    Par neird dans le forum Turbo Pascal
    Réponses: 13
    Dernier message: 17/11/2002, 20h14
  5. Allocation de ressources
    Par Eric Pasquier dans le forum Algorithmes et structures de données
    Réponses: 4
    Dernier message: 08/10/2002, 09h19

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