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

Struts 2 Java Discussion :

Tomcat 5.5 + Struts2 : Erreur lancement Application Web


Sujet :

Struts 2 Java

  1. #1
    Futur Membre du Club
    Profil pro
    Inscrit en
    Octobre 2006
    Messages
    4
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Octobre 2006
    Messages : 4
    Par défaut Tomcat 5.5 + Struts2 : Erreur lancement Application Web
    Bonjour,

    Contexte :
    Après installation de tomcat 5.5 et le déploiement de mon application Web, je rencontre une erreur suivante dès le lancement de l'application...
    Il semble que l'action "init" ne soit pas trouvée mais après une multitude de tests suite à des conseils sur des forums, je n'en suis même plus sûr

    En faisant les mêmes tests sous Windows (déploiement du même .war sous une version tomcat5.5 ), l'application se lance correctement...même chose sous windows pour une version tomcat6...
    Je commence à désespérer :-(

    version des outils :
    Debian 5.0.3
    Tomcat 5.5
    Struts 2.0.14

    fichier struts.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
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE struts PUBLIC
        "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
        "http://struts.apache.org/dtds/struts-2.0.dtd">
    
    <struts>
       <include file="struts-default.xml"/>
    
         <package name="default" extends="struts-default">
    
                    <action name="carteConcept" class="action.ConceptAction">
                            <result type="xslt" name="successConcept">
                                    <param name="stylesheetLocation">/xsl/Concept.xsl</param>
                    </result>
                            <result type="xslt" name="successEntity">
                                    <param name="stylesheetLocation">/xsl/Entity.xsl</param>
                    </result>
            </action>
    
    
            <action name="notice" class="action.NoticeAction">
                <result name="success">Notice.jsp</result>
            </action>
    
            <action name="param" class="action.ParametrageAction" method="save"/>
            <action name="paramAv" class="action.ParametrageAvAction" method="save">
                <result name="success" type="redirect-action">init</result>
            </action>
            <action name="init" class="action.ChargementParamAction">
                <result name="success">treenavig.jsp</result>
            </action>
    .........
    ........
    fichier 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
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app id="WebApp_9" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    
        <display-name>Struts2CRUD</display-name>
    
        <filter>
            <filter-name>struts2</filter-name>
            <!--filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class-->
            <filter-class>actionDispatcherFilter.Struts2Dispatcher</filter-class>
    
        </filter>
    
        <filter-mapping>
            <filter-name>struts2</filter-name>
            <url-pattern>/*</url-pattern>
        </filter-mapping>
    
        <servlet>
            <servlet-name>HelloServlet</servlet-name>
            <servlet-class>action.HelloServlet</servlet-class>
        </servlet>
    
        <servlet-mapping>
            <servlet-name>HelloServlet</servlet-name>
            <url-pattern>/HelloServlet</url-pattern>
        </servlet-mapping>
    
     <servlet>
        <servlet-name>Servlet_File</servlet-name>
        <servlet-class>utils.servlet.Servlet_File</servlet-class>
      </servlet>
    
     <servlet-mapping>
        <servlet-name>Servlet_File</servlet-name>
        <url-pattern>/servlet/utils.servlet.Servlet_File</url-pattern>
      </servlet-mapping>
    
        <welcome-file-list>
            <welcome-file>navigation.jsp</welcome-file>
        </welcome-file-list>
        <error-page>
            <error-code>404</error-code>
            <location>/pagenotfound.jsp</location>
         </error-page>
         <error-page>
            <exception-type>java.lang.Exception</exception-type>
            <location>/error.jsp</location>
        </error-page>
    </web-app>
    fichier de lancement : navigation.jsp
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    <%@ page language="java" contentType="text/html; charset=utf-8" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <%@ taglib prefix="s" uri="/struts-tags" %>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Portail Navigation</title>
    </head>
    <body>
    <s:action name="init" executeResult="true"></s:action>
    </body>
    </html>

    erreur :

    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
    25 janv. 2010 15:08:49 org.apache.struts2.components.ActionComponent executeAction
    GRAVE: Could not execute action: /init
    java.lang.NullPointerException
            at action.ChargementParamAction.execute(ChargementParamAction.java:66)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:597)
            at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:404)
            at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:267)
            at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:229)
            at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:221)
            at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
            at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
            at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
            at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
            at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
            at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:150)
            at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:48)
            at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
            at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
            at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
            at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
            at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
            at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:123)
            at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
            at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
            at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
            at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
            at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:184)
            at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
            at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
            at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
            at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
            at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
            at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:105)
            at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
            at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
            at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
            at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
            at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:83)
            at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
    J'ai testé des versions plus récentes de la librairie xwork et rien n'y fait...
    HELP Please!!

  2. #2
    Membre confirmé Avatar de Altenide
    Homme Profil pro
    Formateur en technologies web
    Inscrit en
    Décembre 2008
    Messages
    129
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 53
    Localisation : France, Ille et Vilaine (Bretagne)

    Informations professionnelles :
    Activité : Formateur en technologies web
    Secteur : Enseignement

    Informations forums :
    Inscription : Décembre 2008
    Messages : 129
    Par défaut
    peux tu nous donner le contenu de ta classe ChargementParamAction ?

  3. #3
    Membre confirmé
    Profil pro
    Inscrit en
    Décembre 2005
    Messages
    92
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Décembre 2005
    Messages : 92
    Par défaut
    Citation Envoyé par Altenide Voir le message
    peux tu nous donner le contenu de ta classe ChargementParamAction ?
    ainsi que la suite de la StackTrace stp

Discussions similaires

  1. Tomcat dans Eclipse Luna : erreur au lancement de l'application
    Par CinePhil dans le forum Tomcat et TomEE
    Réponses: 6
    Dernier message: 18/09/2014, 14h20
  2. Tomcat 5.5 + Struts2 : Erreur lancement Application Web
    Par canardo972 dans le forum Tomcat et TomEE
    Réponses: 0
    Dernier message: 25/01/2010, 15h50
  3. [Tomcat+JSP+Eclipse]Débogage d'une application web
    Par sg.forums dans le forum Servlets/JSP
    Réponses: 6
    Dernier message: 06/11/2006, 16h02
  4. [batch] erreur lancement application
    Par Adren dans le forum Windows
    Réponses: 2
    Dernier message: 10/08/2006, 08h51
  5. [TOMCAT]pas d'images pour mon applications web
    Par mamiberkof dans le forum Tomcat et TomEE
    Réponses: 4
    Dernier message: 23/04/2006, 16h41

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