Hi, Thanks Harald for pointing that out!
There already have been some related issues to that: see https://issues.apache.org/jira/browse/MYFACES-2434 for details. In the JIRA issue Leonardo wrote »[...] and contain some dummy methods to make it work. Note RI uses some classes that return null, 0 or empty list/collection when initialization occur. For now, I'll commit only the ones I need. [ Show » <https://issues.apache.org/jira/browse/MYFACES-2434> ] Leonardo Uribe<https://issues.apache.org/jira/secure/ViewProfile.jspa?name=lu4242>added a comment - 04/Dec/09 11:01 PM I have this bugs when orchestra for jsf 2.0 is used: java.lang.UnsupportedOperationException: This request class is an empty placehol der at org.apache.myfaces.application._SystemEventServletRequest$1.invoke(_SystemEventServletRequest.java:55) at $Proxy34.getServletPath(Unknown Source) at javax.servlet.http.HttpServletRequestWrapper.getServletPath(HttpServletRequestWrapper.java:218) at org.apache.myfaces.context.servlet.ServletExternalContextImpl.<init>(ServletExternalContextImpl.java:117) at org.apache.myfaces.context.ExternalContextFactoryImpl.getExternalContext(ExternalContextFactoryImpl.java:61) at org.apache.myfaces.context.FacesContextFactoryImpl.getFacesContext(FacesContextFactoryImpl.java:130) at org.apache.myfaces.webapp.filter.TomahawkFacesContextFactory.getFacesContext(TomahawkFacesContextFactory.java:107) at org.apache.myfaces.orchestra.lib.jsf.OrchestraFacesContextFactory.getFacesContext(OrchestraFacesContextFactory.java:70) at org.apache.myfaces.orchestra.requestParameterProvider.jsf.RequestParameterFacesContextFactory.getFacesContext(RequestParameterFacesContextFactory.java:93) at org.apache.myfaces.webapp.AbstractFacesInitializer.dispatchInitDestroyEvent(AbstractFacesInitializer.java:140) at org.apache.myfaces.webapp.AbstractFacesInitializer.initFaces(AbstractFacesInitializer.java:109) at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:138) at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548) GRAVE: An error occured while initializing MyFaces: This request class is an emp ty placeholder java.lang.UnsupportedOperationException: This request class is an empty placeholder at org.apache.myfaces.application._SystemEventServletRequest$1.invoke(_SystemEventServletRequest.java:55) at $Proxy34.getPathInfo(Unknown Source) at javax.servlet.http.HttpServletRequestWrapper.getPathInfo(HttpServletRequestWrapper.java:133) at org.apache.myfaces.context.servlet.ServletExternalContextImpl.<init>(ServletExternalContextImpl.java:118) at org.apache.myfaces.context.ExternalContextFactoryImpl.getExternalContext(ExternalContextFactoryImpl.java:61) at org.apache.myfaces.context.FacesContextFactoryImpl.getFacesContext(FacesContextFactoryImpl.java:130) at org.apache.myfaces.webapp.filter.TomahawkFacesContextFactory.getFacesContext(TomahawkFacesContextFactory.java:107) at org.apache.myfaces.orchestra.lib.jsf.OrchestraFacesContextFactory.getFacesContext(OrchestraFacesContextFactory.java:70) at org.apache.myfaces.orchestra.requestParameterProvider.jsf.RequestParameterFacesContextFactory.getFacesContext(RequestParameterFacesContextFactory.jav a:93) at org.apache.myfaces.webapp.AbstractFacesInitializer.dispatchInitDestroyEvent(AbstractFacesInitializer.java:140) at org.apache.myfaces.webapp.AbstractFacesInitializer.initFaces(AbstractFacesInitializer.java:109) at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:138) at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548) at org.mortbay.jetty.servlet.Context.startContext(Context.java:136) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250) 2009-12-04 14:47:28,234 ERROR org.apache.myfaces.orchestra.lib.jsf.OrchestraFace sContextFactory - Problem initialising RequestHandler java.lang.UnsupportedOperationException: This request class is an empty placeholder at org.apache.myfaces.application._SystemEventServletRequest$1.invoke(_SystemEventServletRequest.java:55) at $Proxy34.getSession(Unknown Source) at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:227) at org.apache.myfaces.context.servlet.SessionMap.getSession(SessionMap.java:79) at org.apache.myfaces.context.servlet.SessionMap.getAttribute(SessionMap.java:49) at org.apache.myfaces.util.AbstractAttributeMap.get(AbstractAttributeMap.java:94) at org.apache.myfaces.orchestra.frameworkAdapter.jsf.JsfFrameworkAdapter.getSessionAttribute(JsfFrameworkAdapter.java:129) at org.apache.myfaces.orchestra.conversation.ConversationManager.getInstance(ConversationManager.java:127) at org.apache.myfaces.orchestra.lib.jsf.ContextLockRequestHandler.init(ContextLockRequestHandler.java:68) at org.apache.myfaces.orchestra.lib.jsf.OrchestraFacesContextFactory$1.<init>(OrchestraFacesContextFactory.java:122) at org.apache.myfaces.orchestra.lib.jsf.OrchestraFacesContextFactory.getFacesContext(OrchestraFacesContextFactory.java:103) at org.apache.myfaces.orchestra.requestParameterProvider.jsf.RequestParameterFacesContextFactory.getFacesContext(RequestParameterFacesContextFactory.java:93) at org.apache.myfaces.webapp.AbstractFacesInitializer.dispatchInitDestroyEvent(AbstractFacesInitializer.java:140) at org.apache.myfaces.webapp.AbstractFacesInitializer.initFaces(AbstractFacesInitializer.java:109) at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:138) at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:548) at org.mortbay.jetty.servlet.Context.startContext(Context.java:136) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250) java.lang.NullPointerException at org.apache.myfaces.el.unified.resolver.ManagedBeanResolver.getValue(ManagedBeanResolver.java:183) at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:175) at org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:140) at org.apache.myfaces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:64) at org.apache.myfaces.orchestra.viewController.jsf.ViewControllerVariableResolver.resolveVariable(ViewControllerVariableResolver.java:51) at org.springframework.web.jsf.DelegatingVariableResolver.resolveOriginal(DelegatingVariableResolver.java:123) at org.springframework.web.jsf.DelegatingVariableResolver.resolveVariable(DelegatingVariableResolver.java:105) at org.apache.myfaces.el.convert.VariableResolverToELResolver.getValue(VariableResolverToELResolver.java:96) at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:175) at org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:140) at org.apache.myfaces.el.VariableResolverToApplicationELResolverAdapter.resolveVariable(VariableResolverToApplicationELResolverAdapter.java:45) at org.apache.myfaces.orchestra.frameworkAdapter.jsf.JsfFrameworkAdapter.getBean(JsfFrameworkAdapter.java:177) at org.apache.myfaces.orchestra.FactoryFinder.getConversationManagerFactory(FactoryFinder.java:66) at org.apache.myfaces.orchestra.conversation.ConversationManager.getInstance(ConversationManager.java:144) at org.apache.myfaces.orchestra.conversation.ConversationManager.getInstance(ConversationManager.java:99) at org.apache.myfaces.orchestra.lib.jsf.ConversationManagerRequestHandler.init(ConversationManagerRequestHandler.java:43) at org.apache.myfaces.orchestra.lib.jsf.OrchestraFacesContextFactory$1.(OrchestraFacesContextFactory.java:122) at org.apache.myfaces.orchestra.lib.jsf.OrchestraFacesContextFactory.getFacesContext(OrchestraFacesContextFactory.java:103) at org.apache.myfaces.orchestra.requestParameterProvider.jsf.RequestParameterFacesContextFactory.getFacesContext(RequestParameterFacesContextFactory.java:93) at javax.faces.webapp.FacesServlet.prepareFacesContext(FacesServlet.java:500) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:189) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166) at org.apache.myfaces.examples.filter.RequestEncodingFilter.doFilter(RequestEncodingFilter.java:41) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:341) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:536) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:915) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:405) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582) In few words, the wrappers should use HttpServletXXX for create the proxy (because ServletExternalContextImpl check for it) and contains some dummy methods to make it work. Note RI uses some classes that return null, 0 or empty list/collection when initialization occur. For now, I'll commit only the ones I need. « Now the question is: Should we change _SystemEventServletRequest to return an emty List for the headers or should we change this behavior in Trinidad. Im not that familiar with Trinidad, so please Matthias or someone else from the "Trinidad team" please take a look at this. Thanks! Regards, Jakob 2010/1/21 Kuhn, Harald <[email protected]> > Hi Matthias, hi Edmond, > > I was facing the same error (during initialization of Trinidad) when I > tried a simple example last weekend. > I could track it down to the following: > > During Context-Initialization (ContextServletListener) MyFaces uses a fake > Proxy (org.apache.myfaces.application._SystemEventServletRequest) for > HttpRequest. > This proxy returns > java.lang.UnsupportedOperationException: This request class is an empty > placeholder > regardless which method is invoked. > > On the other hand Trinidad tries to detect if this request is a partial > request. > This detection wants to read request header "Tr-XHR-Message". > > > org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderKit.isAjaxRequest(CoreRenderKit.java:148) > at > org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderKit.isPartialRequest(CoreRenderKit.java:163) > at > org.apache.myfaces.trinidadinternal.config.xmlHttp.XmlHttpConfigurator.getExternalContext(XmlHttpConfigurator.java:61) > at > org.apache.myfaces.trinidadinternal.config.GlobalConfiguratorImpl.getExternalContext(GlobalConfiguratorImpl.java:351) > at > org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$CacheRenderKit.<init>(FacesContextFactoryImpl.java:90) > > I don’t really know who is using the wrong assumptions. > Should the MyFaces HttpRequest-Proxy allow method invocations like > request.getHeader("Tr-XHR-Message ")? > Or should Trinidad not try to read any request values, headers, attributes, > etc. during initialization? > > Hopefully this could point you in the right direction. > > Regards > > Harald > > > Harald Kuhn > AirPlus International > Business Information Services > Dornhofstr. 36 > 63263 Neu-Isenburg > T +49 (0) 61 02. 2 04 - 8 21 > F +49 (0) 61 02. 2 04 - 77 8 21 > [email protected] > www.airplus.com > > > > Lufthansa AirPlus Servicekarten GmbH · Hans-Böckler-Straße 7 · 63263 > Neu-Isenburg · Germany · Geschäftsführer: Patrick W. Diemer (Vorsitz), Klaus > Busch · Vorsitzender des Aufsichtsrates: Stephan Gemkow · Handelsregister: > Amtsgericht Offenbach/Main, HRB 8119 > > > -----Original Message----- > From: [email protected] [mailto:[email protected]] On Behalf Of > Matthias Wessendorf > Sent: Thursday, January 21, 2010 1:07 PM > To: MyFaces Discussion; [email protected] > Subject: Re: problem using myfaces-core-2.0.0-SNAPSHOT + > myfaces-orchestra20-1.5-SNAPSHOT > > ok, I asked as it looks like a myfaces2 bug.. > > On Thu, Jan 21, 2010 at 11:43 AM, Edmond B. Mulemangabo > <[email protected]> wrote: > > On 01/21/2010 09:53 AM, Matthias Wessendorf wrote: > >> > >> Quick follow-up: Does it work with the RI/Mojarra ? > > > > I haven't given RI/Mojarra a try yet. I've never used RI/Mojarra; I hope > > I'll be able to set it up and give it a try. > > > > > >> If so, do you mind to create a JIRA ticket against MyFaces2 ? > >> > >> -Matthias > >> > >> On Wed, Jan 20, 2010 at 11:29 PM, Edmond B. Mulemangabo > >> <[email protected]> wrote: > >>> > >>> On 01/20/2010 11:46 AM, Matthias Wessendorf wrote: > >>>> > >>>> Hello Edmond, > >>>> > >>>> I see you are using Trinidad; Did you give the 2.0.0-alpha a try ? > >>> > >>> Yes I did. The demo package of Trinidad 2.0.0-alpha is working. The > >>> application that is failing is using Myfaces-2.0.0-alpha, > >>> Trinidad-2.0.0-alpha, Orchestra20.1-5, Spring 2.5, OpenJPA-1.2 , > Tomahawk > >>> and Tomcat-6 > >>> > >>> regards. > > > > Edmond/ > > > > > > -- > Matthias Wessendorf > > blog: http://matthiaswessendorf.wordpress.com/ > sessions: http://www.slideshare.net/mwessendorf > twitter: http://twitter.com/mwessendorf >

