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 1 Java Discussion :

Erreur de compilation dans Struts (Wsad/Eclips)


Sujet :

Struts 1 Java

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre confirmé
    Profil pro
    Inscrit en
    Septembre 2006
    Messages
    200
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Septembre 2006
    Messages : 200
    Par défaut Erreur de compilation dans Struts (Wsad/Eclips)
    Salut tous le monde,

    Si quelqu'un a une idée de l'erreur suivante ça sera tres apprecié.
    [7/24/07 14:27:44:922 EDT] 67c89218 RequestUtils E org.apache.struts.util.RequestUtils Error creating form bean of class ca.uottawa.faidselfserv.model.AddEditNoticeBean
    [7/24/07 14:27:44:938 EDT] 67c89218 RequestUtils E org.apache.struts.util.RequestUtils TRAS0014I: The following exception was logged java.lang.ClassNotFoundException: ca.uottawa.faidselfserv.model.AddEditNoticeBean
    voici la Bean ou le probleme reside:
    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
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    package ca.uottawa.faidselfserv.model;
     
    import javax.servlet.http.HttpServletRequest;
    import org.apache.struts.action.ActionError;
    import org.apache.struts.action.ActionErrors;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionMapping;
     
    /**
     * Form bean for a Struts application.
     * Users may access 5 fields on this form:
     * <ul>
     * <li>Start_Dt - [your comment here]
     * <li>English_Html - [your comment here]
     * <li>Notice_name - [your comment here]
     * <li>French_Html - [your comment here]
     * <li>End_Dt - [your comment here]
     * </ul>
     * @version     1.0
     * @author
     */
     
    public class AddEditNoticeBean extends ActionForm {
     
    	private String noticeName 	= null;
    	private String startDt 		= null;
    	private String endDt 		= null;
    	private String englishHtml 	= null;
    	private String frenchHtml 	= null;
    	private String updateTmst 	= null;
     
    	/*
    	 * null value constructor
    	 */
     
    	/*
    	 * student number constructor
    	 */ 
     
    	/** 
                    * Method validate
                    * @param ActionMapping mapping
                    * @param HttpServletRequest request
                    * @return ActionErrors
                    */
     
     
    		public ActionErrors validate(ActionMapping mapping,	HttpServletRequest request) {
    			//throw new UnsupportedOperationException("Generated method 'validate(...)'");
     
    			ActionErrors errors = new ActionErrors();
    			if(noticeName == null || noticeName.length()==0) {
    				errors.add("noticeName",new ActionError("error.noticeName.required"));
    			}
    			if(startDt == null || startDt.length()==0) {
    				errors.add("startDt",new ActionError("error.startDt.required"));
    			}
    			if(endDt == null || endDt.length()==0)	{
    				errors.add("endDt",new ActionError("error.endDt.required"));
    			}
     
    			return errors;
     
    		}
     
     
    	public AddEditNoticeBean() {
     
     
    		noticeName 	= "";
    		startDt 	= "";
    		endDt 		= "";
    		englishHtml = "";
    		frenchHtml 	= "";
    		updateTmst 	= "";
    	}
    	/**
             * Get Start_Dt
             * @return String
             */
    	public String getStartDt() {
    		return startDt;
    	}
     
    	/**
             * Set Start_Dt
             * @param <code>String</code>
             */
    	public void setStartDt(String s) {
    		this.startDt = s;
    	}
     
    	/**
             * Get Notice_name
             * @return String
             */
    	public String getNoticeName() {
    		return noticeName;
    	}
     
    	/**
             * Set Notice_name
             * @param <code>String</code>
             */
    	public void setNoticeName(String n) {
    		this.noticeName = n;
    	}
     
    	/**
             * Get English_Html
             * @return String
             */
    	public String getEnglishHtml() {
    		return englishHtml;
    	}
     
    	/**
             * Set English_Html
             * @param <code>String</code>
             */
    	public void setEnglishHtml(String e) {
    		this.englishHtml = e;
    	}
     
    	/**
             * Get End_Dt
             * @return String
             */
    	public String getEndDt() {
    		return endDt;
    	}
     
    	/**
             * Set End_Dt
             * @param <code>String</code>
             */
    	public void setEndDt(String e) {
    		this.endDt = e;
    	}
     
    	/**
             * Get French_Html
             * @return String
             */
    	public String getFrenchHtml() {
    		return frenchHtml;
    	}
     
    	/**
            * Set French_Html
            * @param <code>String</code>
            */
    	public void setFrenchHtml(String f) {
    		this.frenchHtml = f;
    	}
     
    	/**
            * Get update time stump
            * @return String
            */
    	public String getUpdateTmst() {
    		return updateTmst;
    	}
     
    	/**
            * Set French_Html
            * @param <code>String</code>
            */
    	public void setUpdateTmst(String t) {
    		this.updateTmst = t;
    	}
     
    }
    /**
     * date        sr#  user     
     * ----------- ---- -------- --------------------------------------------
     * 2005.Mar.31   na wwahl    
     * Created bean for FSMS Financial Aid Self Serve application
     */
    merci a vous.

  2. #2
    Expert confirmé

    Femme Profil pro
    Inscrit en
    Juillet 2005
    Messages
    5 793
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France

    Informations forums :
    Inscription : Juillet 2005
    Messages : 5 793
    Par défaut
    Peux-tu vérifier que tu as bien AddEditNoticeBean.class sous WEB-INF/classes/ca/uottawa/faidselfserv/model ?

  3. #3
    Membre confirmé
    Profil pro
    Inscrit en
    Septembre 2006
    Messages
    200
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Septembre 2006
    Messages : 200
    Par défaut
    Non!!! AddEditNoticeBean.class n'est pas sous WEB-INF/classes/ca/uottawa/faidselfserv/model
    par contre sous ca.uottawa.faidselfserv.model

    je pensais que c'etait pas indispensable de l'avoir en double dans deux folder differents.
    Je t'ai join une image (attachée) de mon project Navigator

    A+
    Fichiers attachés Fichiers attachés

  4. #4
    Expert confirmé

    Femme Profil pro
    Inscrit en
    Juillet 2005
    Messages
    5 793
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France

    Informations forums :
    Inscription : Juillet 2005
    Messages : 5 793
    Par défaut
    Je ne te parle pas du source de la classe, soit AddEditNoticeBean.java qui doit bien être sous ca.uottawa.faidselfserv.model, mais de la classe compilée, soit AddEditNoticeBean.class.

    Vu le message d'erreur, il ne trouve pas la classe AddEditNoticeBean, ce qui signifie qu'elle ne doit pas être compilée.

    C'est pour ça que je t'ai demandé de vérifier si le AddEditNoticeBean.class est bien sous WEB-INF/classes/ca/uottawa/faidselfserv/model.
    Si ce n'est pas le cas, cela signifie que tu as un problème au niveau de la compilation des classes.

    Pour info, tu ne verras les .class que si tu es en vue Resource et non en vue Java (enfin, c'est comme ça sous Eclipse).
    Sinon, regarde directement dans le workspace via l'explorateur de fichiers.

  5. #5
    Membre confirmé
    Profil pro
    Inscrit en
    Septembre 2006
    Messages
    200
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Septembre 2006
    Messages : 200
    Par défaut
    Oui effectivement je la vois bien via l'explorateur de fichiers
    le AddEditNoticeBean.class est bien sous le WEB-INF/classes/ca/uottawa/faidselfserv/model

    donc il ya un autre probleme......

  6. #6
    Expert confirmé

    Femme Profil pro
    Inscrit en
    Juillet 2005
    Messages
    5 793
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Localisation : France

    Informations forums :
    Inscription : Juillet 2005
    Messages : 5 793
    Par défaut
    Peux-tu montrer ton struts-config.xml ?

  7. #7
    Membre confirmé
    Profil pro
    Inscrit en
    Septembre 2006
    Messages
    200
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Septembre 2006
    Messages : 200
    Par défaut
    voici mon struts-config.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
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
                                   "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
     
    <struts-config>
     
    	<!-- Data Sources -->
    	<data-sources>
    	</data-sources>
     
    	<!-- Form Beans -->
    	<form-beans>
    		<form-bean name="frmnotice" type=" ca.uottawa.faidselfserv.model.AddEditNoticeBean"></form-bean>
    	</form-beans>
     
    	<!-- Global Exceptions -->
    	<global-exceptions>
    	</global-exceptions>
     
    	<!-- Global Forwards -->
    	<global-forwards>
    	</global-forwards>
     
    	<!-- Action Mappings -->
     
    	<!-- Message Resources -->
    	<action-mappings>
    		<action path="/switchLanguage" type="ca.uottawa.struts.SwitchLanguageAction">
    			<forward name="switch_language_page" path="/displayFinAid.do" redirect="true">
    			</forward>
    		</action>
     
    		<action path="/displayFinAid" type="ca.uottawa.faidselfserv.actions.DisplayFinAidAction">
    			<forward name="displayEmp" path="./display_fin_aid.jsp"></forward>
    			<forward name="error" path="./error.jsp"></forward>
    			<forward name="displayStud" path="./display_fin_aidGov.jsp" redirect="true"></forward>
    		</action>
     
    		<action path="/displayFinAidGov" type="ca.uottawa.faidselfserv.actions.DisplayFinAidActionGov">
    			<forward name="displayGov" path="./display_fin_aidGov.jsp">	</forward>
    			<forward name="error" path="./error.jsp">
    			</forward>
    		</action>
     
    		<action path="/displayNotice" type="ca.uottawa.faidselfserv.actions.DisplayNoticeAction">
    			<forward name="displayNoticejsp" path="./Notice.jsp">
    			</forward>
    		</action>
     
    		<action path="/addEditNotice" 
    				name="frmnotice"
    				validate="true" 
    				input="Notice.jsp" 				
    				type="ca.uottawa.faidselfserv.actions.AddEditNoticeAction" >
     
    			<forward name="addNotice" path="./Notice.jsp">	</forward>
    			<forward name="editNotice" path="./NoticeEdit.jsp"></forward>
    			<forward name="error" path="./error.jsp">	</forward> 
    		</action>
     
     
     
    	</action-mappings>
    	<message-resources parameter="resources.ApplicationResources"/>
     
    </struts-config>

Discussions similaires

  1. "Erreur de compilation dans le module caché:.."
    Par rsoul dans le forum Macros et VBA Excel
    Réponses: 3
    Dernier message: 09/06/2008, 10h51
  2. Erreur de compilation dans le module caché
    Par Kalvin_20 dans le forum VBA Access
    Réponses: 4
    Dernier message: 27/05/2008, 15h03
  3. erreur de compilation dans la création d'un crosstab
    Par longuele dans le forum iReport
    Réponses: 7
    Dernier message: 29/10/2007, 10h13
  4. [Simulink][Débutante] Erreur de compilation dans un code
    Par karamellati dans le forum MATLAB
    Réponses: 4
    Dernier message: 30/05/2007, 11h47
  5. [Servlet][Compilation] Erreur de compil dans code servlet
    Par gandalf_le_blanc dans le forum Servlets/JSP
    Réponses: 3
    Dernier message: 13/05/2004, 10h17

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