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

javax faces el.EvaluationException


Sujet :

Spring Web Java

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre confirmé
    Inscrit en
    Mai 2008
    Messages
    183
    Détails du profil
    Informations forums :
    Inscription : Mai 2008
    Messages : 183
    Par défaut javax faces el.EvaluationException
    Bonjour tout le monde,

    j'ai une application en jsf, spring et hibernate mon fichier web.xml est comme ceci:
    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
     
    <?xml version="1.0"?>
    <!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>
     
     
      	<!-- Spring context Configuration Begins-->
    	<context-param>
    		<param-name>log4jConfigLocation</param-name>
    		<param-value>/WEB-INF/log4j.properties</param-value>
    	</context-param>
     
    	<context-param>
    		<param-name>contextConfigLocation</param-name>
    		<param-value>/WEB-INF/applicationContext-hibernate.xml</param-value>
    	</context-param>
    <!--
    	<listener>
    			<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    	</listener>
    -->
     
    <!--
    	<listener>
            <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
      	</listener> 
    -->
    	 <listener>
    		 <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
    	 </listener> 
     
     
    	<!-- Configuration for older version of the Servlet API that doesn't support listeners
    	<servlet>
    	  <servlet-name>context</servlet-name>
    	  <servlet-class>
    		 org.springframework.web.context.ContextLoaderServlet
    	  </servlet-class>
    	<load-on-startup>1</load-on-startup>
    	</servlet>
    	-->
       <!--End Spring configuration -->
     
     
    	<context-param>
            <param-name>javax.faces.CONFIG_FILES</param-name>
            <param-value>
                /WEB-INF/faces-config.xml
            </param-value>
        </context-param>
     
        <context-param>
            <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
            <param-value>client</param-value>
        </context-param>
     
     
     
     
       <!-- Extensions Filter -->
        <filter>
            <filter-name>extensionsFilter</filter-name>
            <filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filter-class>
            <init-param>
                <param-name>uploadMaxFileSize</param-name>
                <param-value>100m</param-value>
                <description>Set the size limit for uploaded files.
                    Format: 10 - 10 bytes
                            10k - 10 KB
                            10m - 10 MB
                            1g - 1 GB
                </description>
            </init-param>
            <init-param>
                <param-name>uploadThresholdSize</param-name>
                <param-value>100k</param-value>
                <description>Set the threshold size - files
                        below this limit are stored in memory, files above
                        this limit are stored on disk.
     
                    Format: 10 - 10 bytes
                            10k - 10 KB
                            10m - 10 MB
                            1g - 1 GB
                </description>
            </init-param>
     
        </filter>
     
        <filter-mapping>
            <filter-name>extensionsFilter</filter-name>
            <url-pattern>*.jsf</url-pattern>
        </filter-mapping>
        <filter-mapping>
            <filter-name>extensionsFilter</filter-name>
            <url-pattern>/faces/*</url-pattern>
        </filter-mapping>
     
        <servlet>
            <servlet-name>Faces Servlet</servlet-name>
            <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
            <load-on-startup>1</load-on-startup>
        </servlet>
     
       <servlet-mapping>
            <servlet-name>Faces Servlet</servlet-name>
            <url-pattern>*.jsf</url-pattern>
        </servlet-mapping>
    	<welcome-file-list>
    		 <welcome-file>index.jsp</welcome-file>
        </welcome-file-list>
     
    </web-app>
    et le fichier de configuration de spring est :

    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
     
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
     
    <!--
      - Application context definition for MyFaces, Hibernate and Spring Integration application.
    	-->
    <beans>
     
    	<!-- ========================= RESOURCE DEFINITIONS ========================= -->
     
    	<!-- Configurer that replaces ${...} placeholders with values from a properties file -->
    	<!-- (in this case, JDBC-related settings for the dataSource definition below) -->
    	<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
    		<property name="location"><value>/WEB-INF/jdbc.properties</value></property>
    	</bean>
     
    	<!-- Local DataSource that works in any environment -->
    	<!-- Note that DriverManagerDataSource does not pool; it is not intended for production -->
     
    	<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
    		<property name="driverClassName"><value>${jdbc.driverClassName}</value></property>
    		<property name="url"><value>${jdbc.url}</value></property>
    		<property name="username"><value>${jdbc.username}</value></property>
    		<property name="password"><value>${jdbc.password}</value></property>
     
    	</bean>
     
     
    	<!-- JNDI DataSource for J2EE environments -->
    	<!--
    	<bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
    		<property name="jndiName"><value>java:comp/env/jdbc/roseindiaDB_local</value></property>
    	</bean>
    	-->
    	<!-- Hibernate SessionFactory -->
    	<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
    		<property name="dataSource"><ref local="dataSource"/></property>
    		<property name="mappingResources">
    		<list>
    			<value>/net/roseindia/dao/hibernate/User.hbm.xml</value>
    			<value>/net/roseindia/dao/hibernate/Ticket.hbm.xml</value>
    		</list>
    		</property>
    		<property name="hibernateProperties">
    			<props>
    				<prop key="hibernate.dialect">${hibernate.dialect}</prop>
    				<prop key="hibernate.show_sql">true</prop>
    			</props>
    		</property>
    	</bean>
     
     
    	<!-- Transaction manager for a single Hibernate SessionFactory (alternative to JTA) -->
    	<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
    		<property name="sessionFactory"><ref local="sessionFactory"/></property>
    	</bean>
     
     
    	<!-- ========================= BUSINESS OBJECT DEFINITIONS ========================= -->
     
    	<!--
    	 Data access object: Hibernate implementation.
        -->
     
    	<bean id="UserDaoTarget" class="net.roseindia.dao.UserDAOImpl">
    		<property name="sessionFactory"><ref local="sessionFactory"/></property>
    	</bean>
     
    	<bean id="TicketDaoTarget" class="net.roseindia.dao.TicketDAOImpl">
    		<property name="sessionFactory"><ref local="sessionFactory"/></property>
    	</bean>
     
    	<!--
    		- Transactional proxy for Application's central data access object.
    		-
    		- Defines specific transaction attributes with "readOnly" markers,
    		- which is an optimization that is particularly valuable with Hibernate
    		- (to suppress unnecessary flush attempts for read-only operations).
    		-
    		- Note that in a real-life app with multiple transaction proxies,
    		- you will probably want to use parent and child bean definitions
    		- as described in the manual, to reduce duplication.
        -->
     
    	<bean id="UserDao" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
    		<property name="transactionManager"><ref local="transactionManager"/></property>
    		<property name="target"><ref local="UserDaoTarget"/></property>
    		<property name="transactionAttributes">
    			<props>
    				<prop key="get*">PROPAGATION_REQUIRED,readOnly</prop>
    				<prop key="find*">PROPAGATION_REQUIRED,readOnly</prop>
    				<prop key="load*">PROPAGATION_REQUIRED,readOnly</prop>
    				<prop key="store*">PROPAGATION_REQUIRED</prop>
    				<prop key="add*">PROPAGATION_REQUIRED</prop>
    			</props>
    		</property>
    	</bean>
     
    	<bean id="TicketDao" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
    		<property name="transactionManager"><ref local="transactionManager"/></property>
    		<property name="target"><ref local="TicketDaoTarget"/></property>
    		<property name="transactionAttributes">
    			<props>
    				<prop key="get*">PROPAGATION_REQUIRED,readOnly</prop>
    				<prop key="find*">PROPAGATION_REQUIRED,readOnly</prop>
    				<prop key="load*">PROPAGATION_REQUIRED,readOnly</prop>
    				<prop key="store*">PROPAGATION_REQUIRED</prop>
    				<prop key="add*">PROPAGATION_REQUIRED</prop>
    			</props>
    		</property>
    	</bean>
     
     
    </beans>
    mon probleme c'est que lors du login (authentification de l'utilisateur) j'ai le msg d'erreur suivant:

    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
     
    type Rapport d'exception
     
    message
     
    description Le serveur a rencontré une erreur interne () qui l'a empêché de satisfaire la requête.
     
    exception
     
    javax.servlet.ServletException: Error calling action method of component with id _idJsp10:_idJsp26
    	javax.faces.webapp.FacesServlet.service(FacesServlet.java:154)
    	org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
     
    cause mère
     
    javax.faces.FacesException: Error calling action method of component with id _idJsp10:_idJsp26
    	org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
    	javax.faces.component.UICommand.broadcast(UICommand.java:109)
    	javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
    	javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:171)
    	org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
    	org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
    	org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
    	javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
    	org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
     
    cause mère
     
    javax.faces.el.EvaluationException: Exception while invoking expression #{CheckValidUser.checkUser}
    	org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:156)
    	org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:61)
    	javax.faces.component.UICommand.broadcast(UICommand.java:109)
    	javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
    	javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:171)
    	org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
    	org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
    	org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
    	javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
    	org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
     
    cause mère
     
    java.lang.NullPointerException
    	net.roseindia.web.common.ServiceFinder.findBean(ServiceFinder.java:31)
    	net.roseindia.web.ui.CheckValidUser.checkUser(CheckValidUser.java:36)
    	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    	sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    	java.lang.reflect.Method.invoke(Unknown Source)
    	org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132)
    	org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:61)
    	javax.faces.component.UICommand.broadcast(UICommand.java:109)
    	javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
    	javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:171)
    	org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
    	org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
    	org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
    	javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
    	org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
     
    note La trace complète de la cause mère de cette erreur est disponible dans les fichiers journaux de Apache Tomcat/5.5.28.
    si qlq'un avait deja rencontré ce probleme.

    merci par avance de votre aide.

  2. #2
    Invité de passage
    Inscrit en
    Avril 2009
    Messages
    1
    Détails du profil
    Informations forums :
    Inscription : Avril 2009
    Messages : 1
    Par défaut warning
    salut tout le monde, je suis débutante dans le développement J2EE,
    je vous conseille de ne jamais utiliser un code du site <<http://www.roseindia.net/jsf/myfacesspring/index.shtml>>>
    c'set jamais de le corriger car c'est un code manquant
    meci

Discussions similaires

  1. Réponses: 0
    Dernier message: 13/01/2009, 19h15
  2. Réponses: 1
    Dernier message: 02/10/2008, 14h04
  3. Réponses: 3
    Dernier message: 30/09/2008, 16h46
  4. Réponses: 2
    Dernier message: 06/05/2007, 15h56
  5. Réponses: 2
    Dernier message: 30/06/2006, 15h18

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