myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jesse Collins (JIRA)" <>
Subject [jira] [Commented] (MYFACES-3104) MyFaces 2 with EL 2.2 in Websphere 7
Date Thu, 01 Nov 2012 19:57:12 GMT


Jesse Collins commented on MYFACES-3104:

Thanks Mark!

I'm sorry for the confusion.  I didn't mean to ask if resources should go through the whole
JSF lifecycle (validation, etc.) - I agree that doesn't make sense.  Rather I was trying to
ask why facelets.BUFFER_SIZE wasn't being used for the resources.

IBM was under the impression that the resources were not being handled by the MyFaces ResourceHandler
because of what they saw in the trace we sent.  So, to make sure the MyFaces ResourceHandler
is being used I added "<resource-handler>org.apache.myfaces.application.ResourceHandlerImpl</resource-handler>"
to my faces-config.xml:


But, I still have the same "WARNING: Cannot set header. Response already committed." message.

After looking at the code for org.apache.myfaces.application.ResourceHandlerImpl.handleResourceRequest(FacesContext
facesContext) I see that a static buffer size (_BUFFER_SIZE) of 2048 is used.

I then compared this to Mojarra's Resource Handler com.sun.faces.application.resource.ResourceHandlerImpl.handleResourceRequest(FacesContext
context) which sets the the buffer size to the value of the Web Context Parameter "com.sun.faces.resourceBufferSize"
which defaults to 2048.

A while back we were using Mojarra and we could prevent the "WARNING: Cannot set header. Response
already committed." message in our logs by setting the following:


So, I think that MyFaces should have something similar and allow the buffer size used for
resources to be overwritten from the default 2048.

If this sounds good, I can create another Jira Issue for this request (since this issue in
particular is outside of the original EL 2.2 issue on WebSphere 7) and the specifics can be
discussed (i.e. should the Web Context Parameter "facelets.BUFFER_SIZE" be used or should
another Web Context Parameter be added, etc.).

Please let me know.
> MyFaces 2 with EL 2.2 in Websphere 7
> ------------------------------------
>                 Key: MYFACES-3104
>                 URL:
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: General
>    Affects Versions: 2.0.4
>         Environment: WebSphere Platform
> Host Operating System is Windows XP, version 5.1 build 2600 Service Pack 3
> Java version = 1.6.0, Java Compiler = j9jit24, Java VM name = IBM J9 VM
> Servlet API : 2.5
> JSP API : 2.1
>            Reporter: mansour
>         Attachments:
> We have followed your documentation on the wiki in order to enable EL 2.2 (,
it doesn't work on Websphere 7. 
> - we have added the 2 jars (el-api-2.2.jar and el-impl-2.2.jar from Glassfish implementation)
in th classpath of the web application
> - we have configured the web.xml like this :
>           <context-param>
>               <param-name>org.apache.myfaces.EXPRESSION_FACTORY</param-name>
>               <param-value>com.sun.el.ExpressionFactoryImpl</param-value>
>           </context-param>
>           [...]
>           <listener>
>               <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
>           </listener>
> The web application starts without errors,
> Problem :
> 1) When the web application starts we have this first exception :
> [04/04/11 11:24:39:136 CEST] 0000000a DefaultFacesC I   Reading standard config META-INF/standard-faces-config.xml
> [04/04/11 11:24:39:277 CEST] 0000000a DefaultFacesC I   Reading config /WEB-INF/faces-config.xml
> [04/04/11 11:24:39:823 CEST] 0000000a ExternalSpeci I   MyFaces Bean Validation support
> [04/04/11 11:24:39:855 CEST] 0000000a ApplicationIm I   Couldn't discover the current
project stage, using Production
> [04/04/11 11:24:39:855 CEST] 0000000a FacesConfigur I   Serialization provider : class
> [04/04/11 11:24:39:855 CEST] 0000000a DefaultLifecy I   Using LifecycleProvider org.apache.myfaces.config.annotation.AllAnnotationLifecycleProvider
> [04/04/11 11:24:39:933 CEST] 0000000a FfdcProvider  W
logIncident FFDC1003I: Incident FFDC émis sur C:\IBM\SDP75\runtimes\base_v7\profiles\was70profile2\logs\ffdc\server1_48704870_11.04.04_11.24.39.8706071861720806063404.txt 1341
> [04/04/11 11:24:39:933 CEST] 0000000a webapp        E
notifyServletContextCreated SRVE0283E: Exception interceptée lors de l''initialisation du
contexte : {0}
>                                  java.lang.VerifyError: javax/servlet/jsp/JspApplicationContext.addELResolver(Ljavax/el/ELResolver;)V
> 	at org.apache.myfaces.webapp.Jsp21FacesInitializer.configureResolverForJSP(
> 	at org.apache.myfaces.webapp.Jsp21FacesInitializer.initContainerIntegration(
> 	at org.apache.myfaces.webapp.AbstractFacesInitializer.initFaces(
> 	at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(
> 	at
> 	at
> 	at
> 	at
> 	at
> 	at
> 	at
> 	at
> 	at
> 	at
> 	at
> 	at
> 	at
> 	at
> 	at
> 	at
> 	at
> 	at
> 	at$300(
> 	at$
> 	at$
> 	at$
> 2) This second exception appears in the log :
> [04/04/11 11:24:53:436 CEST] 00000018 webapp        E
notifyServletContextDestroyed SRVE0285E: Exception interceptée lors de la destruction du
contexte : {0}
>                                  java.lang.IllegalStateException: No Factories configured
for this Application. This happens if the faces-initialization does not work at all - make
sure that you properly include all configuration settings necessary for a basic faces application
and that all the necessary libs are included. Also check the logging output of your web application
and your container for any exceptions!
> If you did that and find nothing, the mistake might be due to the fact that you use some
special web-containers which do not support registering context-listeners via TLD files and
a context listener is not setup in your web.xml.
> A typical config looks like this;
> <listener>
>   <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
> </listener>
> 	at javax.faces.FactoryFinder.getFactory(
>         [...]
> So can you tell us please how to configure EL 2.2 on Websphere 7 ?

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message