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

JSF Java Discussion :

UnsupportedOperationException FacesContext.getELContext


Sujet :

JSF Java

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre averti
    Inscrit en
    Novembre 2007
    Messages
    28
    Détails du profil
    Informations forums :
    Inscription : Novembre 2007
    Messages : 28
    Par défaut UnsupportedOperationException FacesContext.getELContext
    Bonjour,

    Je contruit un environnement de développement comme suite :
    - Eclipse Ganymede Version: 3.4.1
    - JSF-Facelets 1.1.14
    - Tomcat 6.0.18

    Mon environnement ne semble pas correctement configurer et je ne trouve pas de solutions sur google.

    Mon 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
    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
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    	xmlns="http://java.sun.com/xml/ns/javaee" 
    	xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 
    	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 
    	id="WebApp_ID" 
    	version="2.5">
     
      <display-name>EasyBoxWebTestApache</display-name>
      <welcome-file-list>
        <welcome-file>default.jsf</welcome-file>
      </welcome-file-list>
     
    <!-- *** Context Parameters *** -->
     
       	<!-- JSF Sun -->
    	<context-param>
    		<param-name>com.sun.faces.validateXml</param-name>
    		<param-value>true</param-value>
    	</context-param>
     
      	<!-- JSF myfaces-impl (myfaces-all) -->
    	 <context-param>
    	  <param-name>org.apache.myfaces.RESOURCE_VIRTUAL_PATH</param-name>
    	  <param-value>/faces/myFacesExtensionResource</param-value>
    	</context-param>
    	<context-param>
    		<param-name>org.apache.myfaces.redirectTracker.POLICY</param-name>
    		<param-value>org.apache.myfaces.custom.redirectTracker.policy.NoopRedirectTrackPolicy</param-value>
    	</context-param>
    	<context-param>
    		<param-name>org.apache.myfaces.redirectTracker.MAX_REDIRECTS</param-name>
    		<param-value>20</param-value>
    	</context-param>
    	<context-param>
    		<param-name>org.apache.myfaces.READONLY_AS_DISABLED_FOR_SELECTS</param-name>
    		<param-value>true</param-value>
    	</context-param>
    	<context-param>
    		<param-name>org.apache.myfaces.RENDER_VIEWSTATE_ID</param-name>
    		<param-value>true</param-value>
    	</context-param>
    	<context-param>
    		<param-name>org.apache.myfaces.STRICT_XHTML_LINKS</param-name>
    		<param-value>true</param-value>
    	</context-param>
    	<context-param>
    		<param-name>org.apache.myfaces.CONFIG_REFRESH_PERIOD</param-name>
    		<param-value>2</param-value>
    	</context-param>
    	<context-param>
    		<param-name>org.apache.myfaces.SERIALIZE_STATE_IN_SESSION</param-name>
    		<param-value>true</param-value>
    	</context-param>
    	<context-param>
    		<param-name>org.apache.myfaces.COMPRESS_STATE_IN_SESSION</param-name>
    		<param-value>true</param-value>
    	</context-param>
    	<context-param>
    		<param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
    		<param-value>true</param-value>
    	</context-param>
    	<context-param>
    		<param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
    		<param-value>false</param-value>
    	</context-param>
    	<context-param>
    		<param-name>org.apache.myfaces.PRETTY_HTML</param-name>
    		<param-value>true</param-value>
    	</context-param>
    	<context-param>
    		<param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
    		<param-value>true</param-value>
    	</context-param>
    	<context-param>
    		<param-name>org.apache.myfaces.SECRET</param-name>
    		<param-value>NzY1NDMyMTA=</param-value>
    	</context-param>
    	<context-param>
    		<param-name>org.apache.myfaces.VALIDATE</param-name>
    		<param-value>true</param-value>
    	</context-param>
    	<context-param>
    		<param-name>org.apache.myfaces.ADD_RESOURCE_CLASS</param-name>
    		<param-value>org.apache.myfaces.component.html.util.StreamingAddResource</param-value>
    	</context-param>
    	<context-param>
    		<param-name>org.apache.myfaces.CHECK_EXTENSIONS_FILTER</param-name>
    		<param-value>true</param-value>
    	</context-param>
     
       	<!-- JSF myfaces-api (myfaces-all) -->
    	<context-param>
    		<param-name>javax.faces.PARTIAL_STATE_SAVING_METHOD</param-name>
    		<param-value>false</param-value>
    	</context-param>
    	<context-param>
    		<param-name>javax.faces.STATE_SAVING_METHOD</param-name> 
    		<param-value>client</param-value> 
    	</context-param>
    	<context-param>
    		<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
    		<param-value>.xhtml</param-value>
    	</context-param>
     
      	<!-- Facelets  -->
    	<context-param>
    		 <param-name>facelets.DEVELOPMENT</param-name> 
    		 <param-value>true</param-value> 
    	 </context-param>
    	<context-param>
    		<param-name>facelets.VIEW_MAPPINGS</param-name> 
    		<param-value>*.xhtml</param-value> 
    	</context-param>
     
    <!-- Filters  -->
    <!-- Tomahawk  -->
    <!-- <filter>
    		<filter-name>MyFacesExtensionsFilter</filter-name> 
    		<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class> 
    	</filter>
    	<filter-mapping>
    		<filter-name>MyFacesExtensionsFilter</filter-name> 
    		<url-pattern>*.jsf</url-pattern> 
    	</filter-mapping>
     -->
     
     
     <!-- *** Listeners *** -->
    	<!-- JSF myfaces-impl (myfaces-all)  -->
    	<listener>
    		<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class> 
    	</listener>
     
    <!-- *** Servlets *** -->
    	<!-- JSF  -->
    	<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>
     
    </web-app>
    Mon fichier faces-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
    <?xml version="1.0" encoding="UTF-8"?>
     
    <!DOCTYPE faces-config PUBLIC
        "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
        "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
     
    <faces-config>
     
    	<!-- Facelets -->
    	<application>
    		<view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
    	</application>
     
    </faces-config>
    Le fichier default.xhtml :
    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
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     
    <html xmlns="http://www.w3.org/1999/xhtml">
     
    	<head>
    		<title>Ma premiere page XHTML avec facelets</title>
    	</head>
     
    	<body>
    		Hello World
    	</body>
     
    </html>
    La log de démarrage du serveur :
    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
    26 févr. 2009 12:16:01 org.apache.tomcat.util.digester.SetPropertiesRule begin
    ATTENTION: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:EasyBoxWebTestApache' did not find a matching property.
    26 févr. 2009 12:16:01 org.apache.catalina.core.AprLifecycleListener init
    INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre6\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files/Java/jre6/bin/client;C:/Program Files/Java/jre6/bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Fichiers communs\Roxio Shared\DLLShared\;C:\Program Files\Fichiers communs\Roxio Shared\DLLShared\;C:\Program Files\Fichiers communs\Roxio Shared\9.0\DLLShared\;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\Subversion\bin
    26 févr. 2009 12:16:01 org.apache.coyote.http11.Http11Protocol init
    INFO: Initialisation de Coyote HTTP/1.1 sur http-8080
    26 févr. 2009 12:16:01 org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 405 ms
    26 févr. 2009 12:16:01 org.apache.catalina.core.StandardService start
    INFO: D�marrage du service Catalina
    26 févr. 2009 12:16:01 org.apache.catalina.core.StandardEngine start
    INFO: Starting Servlet Engine: Apache Tomcat/6.0.18
    26 févr. 2009 12:16:01 org.apache.catalina.loader.WebappClassLoader validateJarFile
    INFO: validateJarFile(E:\Solutions Eclipse\AQTECH\apache-tomcat-6.0.18\webapps\EasyBoxWebTestApache\WEB-INF\lib\servlet-api-2.4.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
    26 févr. 2009 12:16:01 org.apache.catalina.core.StandardContext addApplicationListener
    INFO: The listener "org.apache.myfaces.webapp.StartupServletContextListener" is already configured for this context. The duplicate definition has been ignored.
    26 févr. 2009 12:16:01 org.apache.myfaces.config.FacesConfigurator feedStandardConfig
    INFO: Reading standard config org/apache/myfaces/resource/standard-faces-config.xml
    26 févr. 2009 12:16:01 org.apache.myfaces.config.FacesConfigurator feedClassloaderConfigurations
    INFO: Reading config jar:file:/E:/Solutions%20Eclipse/AQTECH/apache-tomcat-6.0.18/webapps/EasyBoxWebTestApache/WEB-INF/lib/jsf-facelets.jar!/META-INF/faces-config.xml
    26 févr. 2009 12:16:01 org.apache.myfaces.config.FacesConfigurator feedWebAppConfig
    INFO: Reading config /WEB-INF/faces-config.xml
    26 févr. 2009 12:16:02 org.apache.myfaces.util.LocaleUtils toLocale
    GRAVE: Locale name null or empty, ignoring
    26 févr. 2009 12:16:02 org.apache.myfaces.webapp.StartupServletContextListener initFaces
    INFO: ServletContext 'E:\Solutions Eclipse\AQTECH\apache-tomcat-6.0.18\webapps\EasyBoxWebTestApache\' initialized.
    26 févr. 2009 12:16:02 org.apache.catalina.core.ApplicationContext log
    INFO: ContextListener: contextInitialized()
    26 févr. 2009 12:16:02 org.apache.catalina.core.ApplicationContext log
    INFO: SessionListener: contextInitialized()
    26 févr. 2009 12:16:02 org.apache.coyote.http11.Http11Protocol start
    INFO: D�marrage de Coyote HTTP/1.1 sur http-8080
    26 févr. 2009 12:16:02 org.apache.jk.common.ChannelSocket init
    INFO: JK: ajp13 listening on /0.0.0.0:8009
    26 févr. 2009 12:16:02 org.apache.jk.server.JkMain start
    INFO: Jk running ID=0 time=0/15  config=null
    26 févr. 2009 12:16:02 org.apache.catalina.startup.Catalina start
    INFO: Server startup in 1243 ms
    Le message d'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
    26 févr. 2009 12:17:48 org.apache.catalina.core.StandardWrapperValve invoke
    GRAVE: "Servlet.service()" pour la servlet Faces Servlet a g�n�r� une exception
    java.lang.UnsupportedOperationException
    	at javax.faces.context.FacesContext.getELContext(FacesContext.java:137)
    	at javax.faces.component.UIViewRoot.setLocale(UIViewRoot.java:888)
    	at org.apache.myfaces.application.jsp.JspViewHandlerImpl.createView(JspViewHandlerImpl.java:130)
    	at com.sun.facelets.FaceletViewHandler.createView(FaceletViewHandler.java:799)
    	at org.apache.myfaces.lifecycle.LifecycleImpl.restoreView(LifecycleImpl.java:116)
    	at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:66)
    	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
    	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
    	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
    	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    	at java.lang.Thread.run(Unknown Source)
    Un petit coup de pouce serait sympa ? svp

  2. #2
    Membre averti
    Inscrit en
    Novembre 2007
    Messages
    28
    Détails du profil
    Informations forums :
    Inscription : Novembre 2007
    Messages : 28
    Par défaut La solution est dans les jars
    Ca fonctionne mieux avec en respectant cette dépendance de JARs :

    commons-beanutils-1.7.0.jar
    commons-collections-3.2.jar
    commons-digester-1.8.jar
    commons-el.jar
    commons-logging-1.1.1.jar
    jsf-facelets.jar
    jstl.jar
    myfaces-api-1.2.6.jar
    myfaces-impl-1.2.6.jar
    standard.jar

  3. #3
    Membre averti
    Profil pro
    Développeur informatique
    Inscrit en
    Septembre 2007
    Messages
    31
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations professionnelles :
    Activité : Développeur informatique

    Informations forums :
    Inscription : Septembre 2007
    Messages : 31
    Par défaut
    facile de gerer ces gens de situations avec strutts

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

Discussions similaires

  1. Réponses: 16
    Dernier message: 25/10/2010, 13h31
  2. [JSF] mon premier JSF:Cannot find FacesContext
    Par anitshka dans le forum JSF
    Réponses: 15
    Dernier message: 24/08/2007, 18h19
  3. Cannot find FacesContext
    Par skanderb dans le forum JSF
    Réponses: 5
    Dernier message: 04/07/2007, 14h55
  4. erreur:Cannot find FacesContext
    Par oasma dans le forum JSF
    Réponses: 3
    Dernier message: 15/05/2007, 13h06
  5. Réponses: 23
    Dernier message: 17/03/2006, 21h11

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